Re: [PATCH 7/7] drm/ttm: enable swapout of per VM BOs during allocation and allows reaping of deleted BOs

2017-12-20 Thread Thomas Hellstrom
What about "Enable recursive locking at swapout time to make it possible to swap out BOs that share the same reservation object." Is "per VM BOs" an AMD specific name?  In that case, I'd avoid using it in the TTM code since most people have no idea what they are and why the need specific tre

Re: [PATCH 1/7] drm/ttm: call ttm_bo_swapout directly when ttm shrink

2017-12-20 Thread Thomas Hellstrom
Roger, 5 out of 7 patches in this series are completely lacking a commit log message, and thats not OK. Really. https://www.kernel.org/doc/html/v4.12/process/submitting-patches.html#describe-your-changes I'll review these, but IIRC the no_wait in the memory accounting code is different in th

RE: [PATCH 3/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc_page

2017-12-20 Thread He, Roger
-Original Message- From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] Sent: Wednesday, December 20, 2017 9:36 PM To: He, Roger ; amd-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org Subject: Re: [PATCH 3/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc_p

Re: [PATCH 5/5] drm/amdgpu: drop client_id from VM

2017-12-20 Thread Chunming Zhou
I agree using fence_context is same efficiency with original client id, since vm only has one sdma entity. But PASID seems be more proper with per-VM-per-process concept, the comment also said that. Regards, David Zhou On 2017年12月20日 21:21, Christian König wrote: Use the fence context from t

RE: [PATCH 4/5] drm/amdgpu: rename vm_id to vmid

2017-12-20 Thread Zhou, David(ChunMing)
Reviewed-by: Chunming Zhou -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Wednesday, December 20, 2017 9:21 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH 4/5] drm/amdgpu: rename vm_id to vmid sed -i "s/vm_id/vmid

RE: [PATCH 3/5] drm/amdgpu: separate VMID and PASID handling

2017-12-20 Thread Zhou, David(ChunMing)
Looks very good, Reviewed-by: Chunming Zhou -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Christian K?nig Sent: Wednesday, December 20, 2017 9:21 PM To: amd-gfx@lists.freedesktop.org Subject: [PATCH 3/5] drm/amdgpu: separate VMID and PASID h

[pull] amdgpu, radeon, and ttm drm-next-4.16

2017-12-20 Thread Alex Deucher
Hi Dave, More stuff for 4.16: - Further radeon cleanup after dropping kfd support - Fix S3 on raven - Further GPU reset clean ups and fixes - Move the amd gpu scheduler into common code so it can be shared with other drivers, notably etnaviv - Various ttm fixes - Support for 2+1 level GPU page t

Re: [PATCH 1/3] drm/prime: forward begin_cpu_access callback to drivers

2017-12-20 Thread Christian König
Am 20.12.2017 um 20:43 schrieb Daniel Vetter: On Wed, Dec 20, 2017 at 6:20 PM, Li, Samuel wrote: Ping... can someone please review this patch? Might be simpler to implement your own dma-buf backend instead of going through the drm_prime midlayer. That was mostly written to give nvidia a set of

Re: [PATCH 1/3] drm/prime: forward begin_cpu_access callback to drivers

2017-12-20 Thread Daniel Vetter
On Wed, Dec 20, 2017 at 6:20 PM, Li, Samuel wrote: > Ping... can someone please review this patch? Might be simpler to implement your own dma-buf backend instead of going through the drm_prime midlayer. That was mostly written to give nvidia a set of non-EXPORT_GPL symbols to support dma-buf. Or

RE: [PATCH 1/3] drm/prime: forward begin_cpu_access callback to drivers

2017-12-20 Thread Li, Samuel
Ping... can someone please review this patch? Samuel Li > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Samuel Li > Sent: Friday, December 15, 2017 11:28 AM > To: dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org > Cc: Koen

Re: [PATCH 1/5] swiotlb: suppress warning when __GFP_NOWARN is set.

2017-12-20 Thread Michel Dänzer
On 2017-12-20 03:49 PM, Christian König wrote: > Am 20.12.2017 um 15:41 schrieb Michel Dänzer: >> On 2017-12-20 02:21 PM, Christian König wrote: >>> TTM tries to allocate coherent memory in chunks of 2MB first to improve >>> TLB efficiency and falls back to allocating 4K pages if that fails. >>> >>

Re: [PATCH 1/5] swiotlb: suppress warning when __GFP_NOWARN is set.

2017-12-20 Thread Christian König
Am 20.12.2017 um 15:41 schrieb Michel Dänzer: On 2017-12-20 02:21 PM, Christian König wrote: TTM tries to allocate coherent memory in chunks of 2MB first to improve TLB efficiency and falls back to allocating 4K pages if that fails. Suppress the warning when the 2MB allocations fails since ther

Re: [PATCH 1/5] swiotlb: suppress warning when __GFP_NOWARN is set.

2017-12-20 Thread Michel Dänzer
On 2017-12-20 02:21 PM, Christian König wrote: > TTM tries to allocate coherent memory in chunks of 2MB first to improve > TLB efficiency and falls back to allocating 4K pages if that fails. > > Suppress the warning when the 2MB allocations fails since there is a > valid fall back path. > > Signe

Re: [PATCH 2/5] drm/amdgpu: fix test for shadow page tables

2017-12-20 Thread Michel Dänzer
On 2017-12-20 02:21 PM, Christian König wrote: > They don't work 100% correctly at the moment. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ob

Re: [PATCH 4/7] drm/ttm: use an operation ctx for ttm_tt_populate in ttm_bo_driver

2017-12-20 Thread Christian König
Am 20.12.2017 um 11:34 schrieb Roger He: Change-Id: I803ea52d11e5c06add0dffab836c3aecc00b56dd Signed-off-by: Roger He Commit message! And please double check the coding style of ast_ttm_tt_populate. With that fixed that patch is Reviewed-by: Christian König . Regards, Christian. ---

[PATCH] drm/radeon: fix sparse warning: Should it be static?

2017-12-20 Thread Dmitry Rozhkov
Impact: make symbol static. Fix this sparse warning: drivers/gpu/drm/radeon/radeon_dp_mst.c:332:38: warning: symbol 'mst_cbs' was not declared. Should it be static? Signed-off-by: Dmitry Rozhkov --- drivers/gpu/drm/radeon/radeon_dp_mst.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH 3/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc_page

2017-12-20 Thread Christian König
Commit message! Am 20.12.2017 um 11:34 schrieb Roger He: Change-Id: I4104a12e09a374b6477a0dd5a8fce26dce27a746 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 15 --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 +- drivers/gpu/drm/ttm/ttm_page_alloc_d

Re: [PATCH 2/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc

2017-12-20 Thread Christian König
Commit message needed! Something like: Forward the operation context to ttm_mem_global_alloc as well. Am 20.12.2017 um 11:34 schrieb Roger He: Change-Id: I5279b5cd3560c4082b00f822219575a5f9c3808a Signed-off-by: Roger He With the commit message fixed, patch is Reviewed-by: Christian König .

Re: [PATCH 1/7] drm/ttm: call ttm_bo_swapout directly when ttm shrink

2017-12-20 Thread Christian König
Am 20.12.2017 um 11:34 schrieb Roger He: then remove superfluous functions We need a better commit message. Something like: Remove the extra indirection, cause we have only one implementation anyway. Change-Id: Iea020f0e30a239e0265e7a1500168c7d7f819bd9 Signed-off-by: Roger He With the co

[PATCH 2/5] drm/amdgpu: fix test for shadow page tables

2017-12-20 Thread Christian König
They don't work 100% correctly at the moment. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index 4fee

[PATCH 5/5] drm/amdgpu: drop client_id from VM

2017-12-20 Thread Christian König
Use the fence context from the scheduler entity. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 3 files changed, 4 insertions(+), 10 deletions(-) diff --gi

[PATCH 4/5] drm/amdgpu: rename vm_id to vmid

2017-12-20 Thread Christian König
sed -i "s/vm_id/vmid/g" drivers/gpu/drm/amd/amdgpu/*.c sed -i "s/vm_id/vmid/g" drivers/gpu/drm/amd/amdgpu/*.h Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c| 8 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c

[PATCH 3/5] drm/amdgpu: separate VMID and PASID handling

2017-12-20 Thread Christian König
Move both into the new files amdgpu_ids.[ch]. No functional change. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/Makefile | 3 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 4 +- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c | 4 +- drivers/gpu/d

[PATCH 1/5] swiotlb: suppress warning when __GFP_NOWARN is set.

2017-12-20 Thread Christian König
TTM tries to allocate coherent memory in chunks of 2MB first to improve TLB efficiency and falls back to allocating 4K pages if that fails. Suppress the warning when the 2MB allocations fails since there is a valid fall back path. Signed-off-by: Christian König --- lib/swiotlb.c | 8 +--- 1

[PATCH 6/7] drm/ttm: add ttm_bo_evict_swapout_allowable to check bo is allowable to evict or swapout

2017-12-20 Thread Roger He
extract this function since eviction and swapout share same logic Change-Id: I80a475a93fceed8d66d74a1832c815a0756341ac Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo.c | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/ttm/

[PATCH 7/7] drm/ttm: enable swapout of per VM BOs during allocation and allows reaping of deleted BOs

2017-12-20 Thread Roger He
Change-Id: I1e87954564f38ad298bf6e4ff88c9f26f291a62d Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo.c | 15 +++ drivers/gpu/drm/ttm/ttm_memory.c | 12 include/drm/ttm/ttm_bo_api.h | 3 ++- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/dr

[PATCH 5/7] drm/ttm: use an operation ctx for ttm_tt_bind

2017-12-20 Thread Roger He
Change-Id: I42a7df8c50e1ce3b527ee9cb78809f8e58136f07 Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c| 2 +- drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- drivers/gpu/drm/ttm/ttm_bo.c| 2 +- drivers/gpu/drm/ttm/ttm_

[PATCH 4/7] drm/ttm: use an operation ctx for ttm_tt_populate in ttm_bo_driver

2017-12-20 Thread Roger He
Change-Id: I803ea52d11e5c06add0dffab836c3aecc00b56dd Signed-off-by: Roger He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 --- drivers/gpu/drm/ast/ast_ttm.c| 5 +++-- drivers/gpu/drm/cirrus/cirrus_ttm.c | 5 +++-- drivers/gpu/drm/nouveau/nouveau_bo.c | 8

[PATCH 3/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc_page

2017-12-20 Thread Roger He
Change-Id: I4104a12e09a374b6477a0dd5a8fce26dce27a746 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_memory.c | 15 --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 +- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 8 ++-- include/drm/ttm/ttm_memory.h |

[PATCH 1/7] drm/ttm: call ttm_bo_swapout directly when ttm shrink

2017-12-20 Thread Roger He
then remove superfluous functions Change-Id: Iea020f0e30a239e0265e7a1500168c7d7f819bd9 Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo.c | 21 +++- drivers/gpu/drm/ttm/ttm_memory.c | 12 ++- include/drm/ttm/ttm_bo_api.h | 1 + include/drm/ttm/ttm_bo_driver.h | 1 -

[PATCH 2/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc

2017-12-20 Thread Roger He
Change-Id: I5279b5cd3560c4082b00f822219575a5f9c3808a Signed-off-by: Roger He --- drivers/gpu/drm/ttm/ttm_bo.c| 2 +- drivers/gpu/drm/ttm/ttm_memory.c| 15 +-- drivers/gpu/drm/ttm/ttm_object.c| 13 ++--- drivers/gpu/drm/vmwgf

Re: [PATCH] Release the mutex hold before backtracing for not supported mxgpu.

2017-12-20 Thread Christian König
Am 20.12.2017 um 03:44 schrieb Yu, Xiangliang: This patch releases the mutex held soon before entering the initialization function in case the device doesn't support mxgpu. Signed-off-by: José Pekkarinen --- drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c | 1 + 1 file changed, 1 insertion(+) diff --