drm/amdgpu/gfx9.4.3: set additional bits on MEC halt
Subsystems (2)
Alex Deucher
maintainerPATCH 1/1 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).
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +9 -1
@@ -1703,7 +1703,15 @@ static void gfx_v9_4_3_xcc_cp_compute_enable(struct amdgpu_device *adev,dev_info (adev->dev,"GRBM_STATUS=0x%08X on unhalt\n" , tmp); }else {WREG32_SOC15_RLC (GC ,GET_INST (GC , xcc_id), regCP_MEC_CNTL, - (CP_MEC_CNTL__MEC_ME1_HALT_MASK |CP_MEC_CNTL__MEC_ME2_HALT_MASK )); + (CP_MEC_CNTL__MEC_INVALIDATE_ICACHE_MASK | +CP_MEC_CNTL__MEC_ME1_PIPE0_RESET_MASK | +CP_MEC_CNTL__MEC_ME1_PIPE1_RESET_MASK | +CP_MEC_CNTL__MEC_ME1_PIPE2_RESET_MASK | +CP_MEC_CNTL__MEC_ME1_PIPE3_RESET_MASK | +CP_MEC_CNTL__MEC_ME2_PIPE0_RESET_MASK | +CP_MEC_CNTL__MEC_ME2_PIPE1_RESET_MASK | +CP_MEC_CNTL__MEC_ME1_HALT_MASK | +CP_MEC_CNTL__MEC_ME2_HALT_MASK )); adev->gfx.kiq[xcc_id].ring.sched.ready = false;dev_info (adev->dev,"GRBM_STATUS=0x%08X on halt\n" , tmp); }
Signature · 1 line
2.46.0
Tested-by Amber Lin <[email protected]>
Reviewed-by Amber Lin <[email protected]>
Regards,
Amber
Quoted 30 lines · Alex Deucher
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).
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +9
-1@@ -1703,7 +1703,15 @@ static void gfx_v9_4_3_xcc_cp_compute_enable(struct amdgpu_device *adev,dev_info (adev->dev,"GRBM_STATUS=0x%08X on unhalt\n" , tmp); }else {WREG32_SOC15_RLC (GC ,GET_INST (GC , xcc_id), regCP_MEC_CNTL, - (CP_MEC_CNTL__MEC_ME1_HALT_MASK |CP_MEC_CNTL__MEC_ME2_HALT_MASK )); + (CP_MEC_CNTL__MEC_INVALIDATE_ICACHE_MASK | +CP_MEC_CNTL__MEC_ME1_PIPE0_RESET_MASK | +CP_MEC_CNTL__MEC_ME1_PIPE1_RESET_MASK | +CP_MEC_CNTL__MEC_ME1_PIPE2_RESET_MASK | +CP_MEC_CNTL__MEC_ME1_PIPE3_RESET_MASK | +CP_MEC_CNTL__MEC_ME2_PIPE0_RESET_MASK | +CP_MEC_CNTL__MEC_ME2_PIPE1_RESET_MASK | +CP_MEC_CNTL__MEC_ME1_HALT_MASK | +CP_MEC_CNTL__MEC_ME2_HALT_MASK )); adev->gfx.kiq[xcc_id].ring.sched.ready = false;dev_info (adev->dev,"GRBM_STATUS=0x%08X on halt\n" , tmp); }