Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <David1.Zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org

authored by

Monk Liu and committed by
Alex Deucher
794ff571 f0f3a8fb

+5 -7
+5 -7
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c
··· 163 163 amdgpu_ring_undo(ring); 164 164 return r; 165 165 } 166 - 167 - if (ring->funcs->emit_hdp_flush) 168 - amdgpu_ring_emit_hdp_flush(ring); 169 166 } 167 + 168 + if (ring->funcs->emit_hdp_flush) 169 + amdgpu_ring_emit_hdp_flush(ring); 170 170 171 171 /* always set cond_exec_polling to CONTINUE */ 172 172 *ring->cond_exe_cpu_addr = 1; ··· 178 178 ring->current_ctx = ctx; 179 179 } 180 180 181 - if (vm) { 182 - if (ring->funcs->emit_hdp_invalidate) 183 - amdgpu_ring_emit_hdp_invalidate(ring); 184 - } 181 + if (ring->funcs->emit_hdp_invalidate) 182 + amdgpu_ring_emit_hdp_invalidate(ring); 185 183 186 184 r = amdgpu_fence_emit(ring, &hwf); 187 185 if (r) {