Commit 794ff571 authored by Monk Liu's avatar Monk Liu Committed by Alex Deucher

drm/amdgpu: hdp flush&inval should always do

This fixes Tonga vm-fault issue when running disaster
(a multiple context GL heavy tests),
We should always flush & invalidate hdp no matter vm
used or not.
Signed-off-by: default avatarMonk Liu <Monk.Liu@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarChunming Zhou <David1.Zhou@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent f0f3a8fb
...@@ -163,11 +163,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, ...@@ -163,11 +163,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
amdgpu_ring_undo(ring); amdgpu_ring_undo(ring);
return r; return r;
} }
if (ring->funcs->emit_hdp_flush)
amdgpu_ring_emit_hdp_flush(ring);
} }
if (ring->funcs->emit_hdp_flush)
amdgpu_ring_emit_hdp_flush(ring);
/* always set cond_exec_polling to CONTINUE */ /* always set cond_exec_polling to CONTINUE */
*ring->cond_exe_cpu_addr = 1; *ring->cond_exe_cpu_addr = 1;
...@@ -178,10 +178,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, ...@@ -178,10 +178,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
ring->current_ctx = ctx; ring->current_ctx = ctx;
} }
if (vm) { if (ring->funcs->emit_hdp_invalidate)
if (ring->funcs->emit_hdp_invalidate) amdgpu_ring_emit_hdp_invalidate(ring);
amdgpu_ring_emit_hdp_invalidate(ring);
}
r = amdgpu_fence_emit(ring, &hwf); r = amdgpu_fence_emit(ring, &hwf);
if (r) { if (r) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment