[PATCH] drm/amdgpu: add VM update fences back to the root PD

2020-02-19 Thread Christian König
Add update fences to the root PD while mapping BOs. Otherwise PDs freed during the mapping won't wait for updates to finish and can cause corruptions. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-)

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD

2020-02-19 Thread Tom St Denis
This doesn't apply on top of 7fd3b632e17e55c5ffd008f9f025754e7daa1b66 which is the tip of drm-next Tom On 2020-02-19 9:20 a.m., Christian König wrote: Add update fences to the root PD while mapping BOs. Otherwise PDs freed during the mapping won't wait for updates to finish and can cause cor

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD

2020-02-19 Thread Christian König
Well it should apply on top of amd-staging-drm-next. But I haven't fetched that today yet. Give me a minute to rebase. Christian. Am 19.02.20 um 15:27 schrieb Tom St Denis: This doesn't apply on top of 7fd3b632e17e55c5ffd008f9f025754e7daa1b66 which is the tip of drm-next Tom On 2020-02-19

[PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-19 Thread Christian König
Add update fences to the root PD while mapping BOs. Otherwise PDs freed during the mapping won't wait for updates to finish and can cause corruptions. v2: rebased on drm-misc-next Signed-off-by: Christian König Fixes: 90b69cdc5f159 drm/amdgpu: stop adding VM updates fences to the resv obj ---

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD

2020-02-19 Thread Luben Tuikov
On 2020-02-19 9:44 a.m., Christian König wrote: > Well it should apply on top of amd-staging-drm-next. But I haven't > fetched that today yet. > > Give me a minute to rebase. This patch seems to have fixed the regression we saw yesterday. It applies to amd-staging-drm-next with a small jitter:

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD

2020-02-19 Thread Luben Tuikov
New developments: Running "amdgpu_test -s 1 -t 4" causes timeouts and koops. Attached is the system log, tested Navi 10: [ 144.484547] [drm:amdgpu_dm_atomic_commit_tail [amdgpu]] *ERROR* Waiting for fences timed out! [ 149.604641] [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx_0.0.0 time

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD

2020-02-19 Thread Luben Tuikov
I was able to bisect it to this commit: $git bisect good 6643ba1ff05d252e451bada9443759edb95eab3b is the first bad commit commit 6643ba1ff05d252e451bada9443759edb95eab3b Author: Luben Tuikov Date: Mon Feb 10 18:16:45 2020 -0500 drm/amdgpu: Move to a per-IB secure flag (TMZ) Move f

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-19 Thread Tom St Denis
I get this conflict on top of drm-next ++<<< HEAD  +  r = vm->update_funcs->prepare(¶ms, resv, sync_mode); ++=== +   if (flags & AMDGPU_PTE_VALID) { +   struct amdgpu_bo *root = vm->root.base.bo; + +   if (!dma_fence_is_signaled(vm->last_direct)) + 

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-19 Thread Tom St Denis
Ignore that my brain wasn't engaged in the process.  It's clear where you wanted the prepare call. Tom On 2020-02-19 10:06 a.m., Tom St Denis wrote: I get this conflict on top of drm-next ++<<< HEAD  +  r = vm->update_funcs->prepare(¶ms, resv, sync_mode); ++=== +   if (flags

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-19 Thread Tom St Denis
Doesn't build even with conflict resolved: [root@raven linux]# make   CALL    scripts/checksyscalls.sh   CALL    scripts/atomic/check-atomics.sh   DESCEND  objtool   CHK include/generated/compile.h   CC [M]  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.o drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c: In fun

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-19 Thread Christian König
Well what branch are you trying to merge that into? The conflict resolution should be simple, just keep the vm->update_funcs->prepare(...) line as it is in your branch. When you get those errors then something went wrong in your rebase. Christian. Am 19.02.20 um 16:14 schrieb Tom St Denis:

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-19 Thread Tom St Denis
The tip of origin/amd-staging-drm-next for me is: commit 7fd3b632e17e55c5ffd008f9f025754e7daa1b66 Refs: {origin/amd-staging-drm-next}, v5.4-rc7-2847-g7fd3b632e17e Author: Monk Liu AuthorDate: Thu Feb 6 23:55:58 2020 +0800 Commit: Monk Liu CommitDate: Wed Feb 19 13:33:02 2020 +0800    

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-19 Thread Christian König
For amd-staging-drm-next you need the first version of the patch. For drm-misc-next or drm-next you need the second version of the patch. We probably need to merge the patch through drm-misc-next anyway since there is also the patch which causes the problems. Christian. Am 19.02.20 um 16:47

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-25 Thread Christian König
Am 19.02.20 um 16:02 schrieb Christian König: Add update fences to the root PD while mapping BOs. Otherwise PDs freed during the mapping won't wait for updates to finish and can cause corruptions. v2: rebased on drm-misc-next Signed-off-by: Christian König Fixes: 90b69cdc5f159 drm/amdgpu: sto

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-25 Thread Pan, Xinhui
Reviewed-by: xinhui pan > 2020年2月25日 20:45,Christian König 写道: > > Am 19.02.20 um 16:02 schrieb Christian König: >> Add update fences to the root PD while mapping BOs. >> >> Otherwise PDs freed during the mapping won't wait for >> updates to finish and can cause corruptions. >> >> v2: rebased

Re: [PATCH] drm/amdgpu: add VM update fences back to the root PD v2

2020-02-25 Thread Felix Kuehling
On 2020-02-19 10:02, Christian König wrote: Add update fences to the root PD while mapping BOs. Otherwise PDs freed during the mapping won't wait for updates to finish and can cause corruptions. v2: rebased on drm-misc-next Signed-off-by: Christian König Fixes: 90b69cdc5f159 drm/amdgpu: stop