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

drm/amdgpu/gfx9.4.3: set additional bits on MEC halt

Need to set the pipe reset and cache invalidation bits
on halt otherwise we can get stale state if the CP firmware
changes (e.g., on module unload and reload).

Tested-by: Amber Lin <Amber.Lin@amd.com>
Reviewed-by: Amber Lin <Amber.Lin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+9 -1
+9 -1
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
··· 1701 1701 WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_MEC_CNTL, 0); 1702 1702 } else { 1703 1703 WREG32_SOC15_RLC(GC, GET_INST(GC, xcc_id), regCP_MEC_CNTL, 1704 - (CP_MEC_CNTL__MEC_ME1_HALT_MASK | CP_MEC_CNTL__MEC_ME2_HALT_MASK)); 1704 + (CP_MEC_CNTL__MEC_INVALIDATE_ICACHE_MASK | 1705 + CP_MEC_CNTL__MEC_ME1_PIPE0_RESET_MASK | 1706 + CP_MEC_CNTL__MEC_ME1_PIPE1_RESET_MASK | 1707 + CP_MEC_CNTL__MEC_ME1_PIPE2_RESET_MASK | 1708 + CP_MEC_CNTL__MEC_ME1_PIPE3_RESET_MASK | 1709 + CP_MEC_CNTL__MEC_ME2_PIPE0_RESET_MASK | 1710 + CP_MEC_CNTL__MEC_ME2_PIPE1_RESET_MASK | 1711 + CP_MEC_CNTL__MEC_ME1_HALT_MASK | 1712 + CP_MEC_CNTL__MEC_ME2_HALT_MASK)); 1705 1713 adev->gfx.kiq[xcc_id].ring.sched.ready = false; 1706 1714 } 1707 1715 udelay(50);