* [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
@ 2020-07-28 18:27 Felix Kuehling
2020-07-29 8:08 ` Christian König
0 siblings, 1 reply; 8+ messages in thread
From: Felix Kuehling @ 2020-07-28 18:27 UTC (permalink / raw)
To: dri-devel, amd-gfx; +Cc: laurent.morichetti
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@amd.com>
Tested-by: Laurent Morichetti <laurent.morichetti@amd.com>
---
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)
--
2.17.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
2020-07-28 18:27 [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access Felix Kuehling
@ 2020-07-29 8:08 ` Christian König
2020-07-29 14:15 ` Felix Kuehling
0 siblings, 1 reply; 8+ messages in thread
From: Christian König @ 2020-07-29 8:08 UTC (permalink / raw)
To: Felix Kuehling, dri-devel, amd-gfx; +Cc: laurent.morichetti
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@amd.com>
> Tested-by: Laurent Morichetti <laurent.morichetti@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Going to pick that up for inclusion in drm-misc-next.
> ---
> 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
2020-07-29 8:08 ` Christian König
@ 2020-07-29 14:15 ` Felix Kuehling
2020-07-29 15:30 ` Deucher, Alexander
0 siblings, 1 reply; 8+ messages in thread
From: Felix Kuehling @ 2020-07-29 14:15 UTC (permalink / raw)
To: christian.koenig, dri-devel, amd-gfx, Alex Deucher; +Cc: laurent.morichetti
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@amd.com>
>> Tested-by: Laurent Morichetti <laurent.morichetti@amd.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
2020-07-29 14:15 ` Felix Kuehling
@ 2020-07-29 15:30 ` Deucher, Alexander
2020-07-29 15:33 ` Koenig, Christian
0 siblings, 1 reply; 8+ messages in thread
From: Deucher, Alexander @ 2020-07-29 15:30 UTC (permalink / raw)
To: Kuehling, Felix, Koenig, Christian, dri-devel, amd-gfx
Cc: Morichetti, Laurent
[-- Attachment #1.1: Type: text/plain, Size: 2225 bytes --]
[AMD Public Use]
Christian, Can you cc stable when you apply it to drm-misc?
Alex
________________________________
From: Kuehling, Felix <Felix.Kuehling@amd.com>
Sent: Wednesday, July 29, 2020 10:15 AM
To: Koenig, Christian <Christian.Koenig@amd.com>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: Morichetti, Laurent <Laurent.Morichetti@amd.com>
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@amd.com>
>> Tested-by: Laurent Morichetti <laurent.morichetti@amd.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> 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)
>
[-- Attachment #1.2: Type: text/html, Size: 4018 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
2020-07-29 15:30 ` Deucher, Alexander
@ 2020-07-29 15:33 ` Koenig, Christian
2020-07-30 11:40 ` Daniel Vetter
0 siblings, 1 reply; 8+ messages in thread
From: Koenig, Christian @ 2020-07-29 15:33 UTC (permalink / raw)
To: Deucher, Alexander
Cc: Kuehling, Felix, Morichetti, Laurent, amd-gfx, dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 2329 bytes --]
Sure.
Christian.
Am 29.07.2020 17:30 schrieb "Deucher, Alexander" <Alexander.Deucher@amd.com>:
[AMD Public Use]
Christian, Can you cc stable when you apply it to drm-misc?
Alex
________________________________
From: Kuehling, Felix <Felix.Kuehling@amd.com>
Sent: Wednesday, July 29, 2020 10:15 AM
To: Koenig, Christian <Christian.Koenig@amd.com>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
Cc: Morichetti, Laurent <Laurent.Morichetti@amd.com>
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@amd.com>
>> Tested-by: Laurent Morichetti <laurent.morichetti@amd.com>
>
> Reviewed-by: Christian König <christian.koenig@amd.com>
>
> 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)
>
[-- Attachment #1.2: Type: text/html, Size: 4357 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
2020-07-29 15:33 ` Koenig, Christian
@ 2020-07-30 11:40 ` Daniel Vetter
2020-07-30 11:50 ` Christian König
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Vetter @ 2020-07-30 11:40 UTC (permalink / raw)
To: Koenig, Christian
Cc: Deucher, Alexander, Kuehling, Felix, dri-devel, amd-gfx,
Morichetti, Laurent
On Wed, Jul 29, 2020 at 5:34 PM Koenig, Christian
<Christian.Koenig@amd.com> 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@amd.com>:
>
> [AMD Public Use]
>
>
> Christian, Can you cc stable when you apply it to drm-misc?
>
> Alex
> ________________________________
> From: Kuehling, Felix <Felix.Kuehling@amd.com>
> Sent: Wednesday, July 29, 2020 10:15 AM
> To: Koenig, Christian <Christian.Koenig@amd.com>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
> Cc: Morichetti, Laurent <Laurent.Morichetti@amd.com>
> 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@amd.com>
> >> Tested-by: Laurent Morichetti <laurent.morichetti@amd.com>
> >
> > Reviewed-by: Christian König <christian.koenig@amd.com>
> >
> > 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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
2020-07-30 11:40 ` Daniel Vetter
@ 2020-07-30 11:50 ` Christian König
2020-07-30 11:59 ` Christian König
0 siblings, 1 reply; 8+ messages in thread
From: Christian König @ 2020-07-30 11:50 UTC (permalink / raw)
To: Daniel Vetter, Koenig, Christian
Cc: Deucher, Alexander, Kuehling, Felix, Morichetti, Laurent,
amd-gfx, dri-devel
Am 30.07.20 um 13:40 schrieb Daniel Vetter:
> On Wed, Jul 29, 2020 at 5:34 PM Koenig, Christian
> <Christian.Koenig@amd.com> 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
So this should go into drm-misc-fixes? The bug is there for quite a while.
Christian.
>
> Just to avoid confusion and needless cherrypicking across branches.
> -Daniel
>
>> Christian.
>>
>> Am 29.07.2020 17:30 schrieb "Deucher, Alexander" <Alexander.Deucher@amd.com>:
>>
>> [AMD Public Use]
>>
>>
>> Christian, Can you cc stable when you apply it to drm-misc?
>>
>> Alex
>> ________________________________
>> From: Kuehling, Felix <Felix.Kuehling@amd.com>
>> Sent: Wednesday, July 29, 2020 10:15 AM
>> To: Koenig, Christian <Christian.Koenig@amd.com>; dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
>> Cc: Morichetti, Laurent <Laurent.Morichetti@amd.com>
>> 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@amd.com>
>>>> Tested-by: Laurent Morichetti <laurent.morichetti@amd.com>
>>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>>
>>> 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@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
2020-07-30 11:50 ` Christian König
@ 2020-07-30 11:59 ` Christian König
0 siblings, 0 replies; 8+ messages in thread
From: Christian König @ 2020-07-30 11:59 UTC (permalink / raw)
To: Daniel Vetter, Koenig, Christian
Cc: Deucher, Alexander, Kuehling, Felix, Morichetti, Laurent,
amd-gfx, dri-devel
Am 30.07.20 um 13:50 schrieb Christian König:
> Am 30.07.20 um 13:40 schrieb Daniel Vetter:
>> On Wed, Jul 29, 2020 at 5:34 PM Koenig, Christian
>> <Christian.Koenig@amd.com> wrote:
>>> Sure.
>> Note that drm-misc-next isn't the right branch for cc: stable stuff, see
>>
>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrm.pages.freedesktop.org%2Fmaintainer-tools%2Fcommitter-drm-misc.html%23where-do-i-apply-my-patch&data=02%7C01%7CChristian.Koenig%40amd.com%7Cfdb80f31688743c1279f08d8347ece50%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637317066517801827&sdata=gKCTEgJLaP9f96f3wJUGu0yfaV%2FyG3U3WvXDJ5%2FYrOc%3D&reserved=0
>>
>
> So this should go into drm-misc-fixes? The bug is there for quite a
> while.
Ok, so I pushed this to drm-misc-fixes, but forgot to add the CC stable tag.
To much to do and not enough time,
Christian.
>
> Christian.
>
>>
>> Just to avoid confusion and needless cherrypicking across branches.
>> -Daniel
>>
>>> Christian.
>>>
>>> Am 29.07.2020 17:30 schrieb "Deucher, Alexander"
>>> <Alexander.Deucher@amd.com>:
>>>
>>> [AMD Public Use]
>>>
>>>
>>> Christian, Can you cc stable when you apply it to drm-misc?
>>>
>>> Alex
>>> ________________________________
>>> From: Kuehling, Felix <Felix.Kuehling@amd.com>
>>> Sent: Wednesday, July 29, 2020 10:15 AM
>>> To: Koenig, Christian <Christian.Koenig@amd.com>;
>>> dri-devel@lists.freedesktop.org <dri-devel@lists.freedesktop.org>;
>>> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>;
>>> Deucher, Alexander <Alexander.Deucher@amd.com>
>>> Cc: Morichetti, Laurent <Laurent.Morichetti@amd.com>
>>> 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@amd.com>
>>>>> Tested-by: Laurent Morichetti <laurent.morichetti@amd.com>
>>>> Reviewed-by: Christian König <christian.koenig@amd.com>
>>>>
>>>> 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@lists.freedesktop.org
>>> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fdri-devel&data=02%7C01%7CChristian.Koenig%40amd.com%7Cfdb80f31688743c1279f08d8347ece50%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637317066517801827&sdata=ZQofPqGAHNmglMcDPQzjpq0AzGbzaUx5RAfwr9zfJ%2FQ%3D&reserved=0
>>>
>>
>>
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-07-30 11:59 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-28 18:27 [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access Felix Kuehling
2020-07-29 8:08 ` Christian König
2020-07-29 14:15 ` Felix Kuehling
2020-07-29 15:30 ` Deucher, Alexander
2020-07-29 15:33 ` Koenig, Christian
2020-07-30 11:40 ` Daniel Vetter
2020-07-30 11:50 ` Christian König
2020-07-30 11:59 ` Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).