Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 29, 2020 at 5:34 PM Koenig, Christian
<Christian.Koenig@xxxxxxx> wrote:
>
> Sure.

Note that drm-misc-next isn't the right branch for cc: stable stuff, see

https://drm.pages.freedesktop.org/maintainer-tools/committer-drm-misc.html#where-do-i-apply-my-patch

Just to avoid confusion and needless cherrypicking across branches.
-Daniel

>
> Christian.
>
> Am 29.07.2020 17:30 schrieb "Deucher, Alexander" <Alexander.Deucher@xxxxxxx>:
>
> [AMD Public Use]
>
>
> Christian, Can you cc stable when you apply it to drm-misc?
>
> Alex
> ________________________________
> From: Kuehling, Felix <Felix.Kuehling@xxxxxxx>
> Sent: Wednesday, July 29, 2020 10:15 AM
> To: Koenig, Christian <Christian.Koenig@xxxxxxx>; dri-devel@xxxxxxxxxxxxxxxxxxxxx <dri-devel@xxxxxxxxxxxxxxxxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>; Deucher, Alexander <Alexander.Deucher@xxxxxxx>
> Cc: Morichetti, Laurent <Laurent.Morichetti@xxxxxxx>
> Subject: Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
>
> Am 2020-07-29 um 4:08 a.m. schrieb Christian König:
> > Am 28.07.20 um 20:27 schrieb Felix Kuehling:
> >> VMAs with a pg_offs that's offset from the start of the vma_node need
> >> to adjust the offset within the BO accordingly. This matches the
> >> offset calculation in ttm_bo_vm_fault_reserved.
> >>
> >> Signed-off-by: Felix Kuehling <Felix.Kuehling@xxxxxxx>
> >> Tested-by: Laurent Morichetti <laurent.morichetti@xxxxxxx>
> >
> > Reviewed-by: Christian König <christian.koenig@xxxxxxx>
> >
> > Going to pick that up for inclusion in drm-misc-next.
>
> Thanks. I'll submit it to amd-staging-drm-next so it makes its way into
> our DKMS branch quickly.
>
> Alex, would you push this to drm-fixes?
>
> Regards,
>   Felix
>
>
> >
> >> ---
> >>   drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 +++-
> >>   1 file changed, 3 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c
> >> b/drivers/gpu/drm/ttm/ttm_bo_vm.c
> >> index 389128b8c4dd..60b41447bec8 100644
> >> --- a/drivers/gpu/drm/ttm/ttm_bo_vm.c
> >> +++ b/drivers/gpu/drm/ttm/ttm_bo_vm.c
> >> @@ -405,8 +405,10 @@ static int ttm_bo_vm_access_kmap(struct
> >> ttm_buffer_object *bo,
> >>   int ttm_bo_vm_access(struct vm_area_struct *vma, unsigned long addr,
> >>                void *buf, int len, int write)
> >>   {
> >> -    unsigned long offset = (addr) - vma->vm_start;
> >>       struct ttm_buffer_object *bo = vma->vm_private_data;
> >> +    unsigned long offset = (addr) - vma->vm_start +
> >> +        ((vma->vm_pgoff - drm_vma_node_start(&bo->base.vma_node))
> >> +         << PAGE_SHIFT);
> >>       int ret;
> >>         if (len < 1 || (offset + len) >> PAGE_SHIFT > bo->num_pages)
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux