dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Koenig, Christian" <Christian.Koenig@amd.com>
To: "Deucher, Alexander" <Alexander.Deucher@amd.com>
Cc: "Kuehling, Felix" <Felix.Kuehling@amd.com>,
	"Morichetti, Laurent" <Laurent.Morichetti@amd.com>,
	"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/1] drm/ttm: fix offset in VMAs with a pg_offs in ttm_bo_vm_access
Date: Wed, 29 Jul 2020 15:33:58 +0000	[thread overview]
Message-ID: <9b384c46-ec71-46be-ac60-1335e9682c05@email.android.com> (raw)
In-Reply-To: <MW3PR12MB4491D68CC4AEC80F9B724E46F7700@MW3PR12MB4491.namprd12.prod.outlook.com>


[-- 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

  reply	other threads:[~2020-07-29 15:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2020-07-30 11:40         ` Daniel Vetter
2020-07-30 11:50           ` Christian König
2020-07-30 11:59             ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9b384c46-ec71-46be-ac60-1335e9682c05@email.android.com \
    --to=christian.koenig@amd.com \
    --cc=Alexander.Deucher@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=Laurent.Morichetti@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox