From: Monk Liu Date: Wed, 4 May 2016 08:27:41 +0000 (+0800) Subject: drm/amdgpu: hdp flush&inval should always do X-Git-Tag: MMI-PSA29.97-13-9~7809^2~1^2~52 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=794ff5710eb1d8bea4acc79cd005f6342623ec46;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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: Monk Liu Reviewed-by: Christian König Reviewed-by: Chunming Zhou Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index 0ed643036361..89f33d5e8731 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c @@ -163,11 +163,11 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, amdgpu_ring_undo(ring); 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 */ *ring->cond_exe_cpu_addr = 1; @@ -178,10 +178,8 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs, ring->current_ctx = ctx; } - if (vm) { - if (ring->funcs->emit_hdp_invalidate) - amdgpu_ring_emit_hdp_invalidate(ring); - } + if (ring->funcs->emit_hdp_invalidate) + amdgpu_ring_emit_hdp_invalidate(ring); r = amdgpu_fence_emit(ring, &hwf); if (r) {