: Thursday, September 21, 2017 3:39 AM
To: Li, Samuel <samuel...@amd.com>; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support
Am 20.09.2017 um 22:31 schrieb Li, Samuel:
The waiting done here is only for the shared fence to switch from
expl
freedesktop.org
Subject: Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support
Am 20.09.2017 um 19:47 schrieb Li, Samuel:
No that isn't correct. Pinning just notes that the BO shouldn't be
moved any more. It doesn't wait for anything.
It does. The following is from amdgpu_gem_prime_pin(),
91
> -Original Message-
> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf
> Of Li, Samuel
> Sent: Wednesday, September 20, 2017 11:44 AM
> To: Koenig, Christian; amd-gfx@lists.freedesktop.org
> Subject: RE: [PATCH v2 1/1] drm/amdgpu: Add gem_
7 1:38 PM
To: Li, Samuel <samuel...@amd.com>; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support
Am 20.09.2017 um 19:34 schrieb Li, Samuel:
If that is what this callback should do then this implementation
would be incorrect. Pinning doesn't wait
rect. Pinning doesn't wait for any GPU operation to finish.
Regards,
Christian.
Sam
-Original Message-
From: Koenig, Christian
Sent: Wednesday, September 20, 2017 2:58 AM
To: Li, Samuel <samuel...@amd.com>; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/1] drm/amdgpu: A
Sent: Wednesday, September 20, 2017 12:21 PM
> To: Li, Samuel <samuel...@amd.com>; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support
>
> Am 20.09.2017 um 17:44 schrieb Li, Samuel:
> >> What happens when another
ptember 20, 2017 2:58 AM
> To: Li, Samuel <samuel...@amd.com>; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support
>
> > What do you mean "This isn't race free"?
>
> Take a look at the code again:
> > +dma_buf =
>> +vma->vm_pgoff = amdgpu_bo_mmap_offset(bo) >> PAGE_SHIFT;
> Maybe better use "vma->vm_pgoff += amdgpu_bo_mmap_offset(bo) >> PAGE_SHIFT;",
> but I'm not sure.
> How other drivers handle this?
This is a good catch. Looks like pgoff is honored during prime mmap, not a fake
offset here.
>> +
Am 14.09.2017 um 00:39 schrieb Samuel Li:
v2: drop hdp invalidate/flush.
Signed-off-by: Samuel Li
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 77