Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-21 Thread Christian König
: 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

Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-21 Thread Christian König
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

RE: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-21 Thread Deucher, Alexander
> -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_

Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-20 Thread Christian König
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

Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-20 Thread Christian König
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

RE: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-20 Thread Li, Samuel
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

RE: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-20 Thread Li, Samuel
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 =

Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-19 Thread Samuel Li
>> +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. >> +

Re: [PATCH v2 1/1] drm/amdgpu: Add gem_prime_mmap support

2017-09-15 Thread Christian König
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