drm/amdgpu: add a compute pipe reset for SR-IOV
Subsystems (2)
PATCH 3/6 drm/amdgpu: add a compute pipe reset for SR-IOV
[Why]
Under SR-IOV, we are not sure whether pipe status is good or not when doing initialization. The compute engine maybe fail to bringup if pipe status is bad.
[How]
For SR-IOV, disable the compute engine to do a pipe reset before we do initialization.
Signed-off-by Horace Chen <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +15 -0
@@ -2754,6 +2754,21 @@ static void gfx_v11_0_config_gfx_rs64(struct amdgpu_device *adev) mec_hdr->ucode_start_addr_hi >> 2); }soc21_grbm_select (adev,0 ,0 ,0 ,0 ); + +/* reset mec pipe */ + tmp =RREG32_SOC15 (GC ,0 , regCP_MEC_RS64_CNTL); + tmp =REG_SET_FIELD (tmp,CP_MEC_RS64_CNTL ,MEC_PIPE0_RESET ,1 ); + tmp =REG_SET_FIELD (tmp,CP_MEC_RS64_CNTL ,MEC_PIPE1_RESET ,1 ); + tmp =REG_SET_FIELD (tmp,CP_MEC_RS64_CNTL ,MEC_PIPE2_RESET ,1 ); + tmp =REG_SET_FIELD (tmp,CP_MEC_RS64_CNTL ,MEC_PIPE3_RESET ,1 ); +WREG32_SOC15 (GC ,0 , regCP_MEC_RS64_CNTL, tmp); + +/* clear mec pipe reset */ + tmp =REG_SET_FIELD (tmp,CP_MEC_RS64_CNTL ,MEC_PIPE0_RESET ,0 ); + tmp =REG_SET_FIELD (tmp,CP_MEC_RS64_CNTL ,MEC_PIPE1_RESET ,0 ); + tmp =REG_SET_FIELD (tmp,CP_MEC_RS64_CNTL ,MEC_PIPE2_RESET ,0 ); + tmp =REG_SET_FIELD (tmp,CP_MEC_RS64_CNTL ,MEC_PIPE3_RESET ,0 ); +WREG32_SOC15 (GC ,0 , regCP_MEC_RS64_CNTL, tmp); }static int gfx_v11_0_wait_for_rlc_autoload_complete (struct amdgpu_device *adev)
Signature · 1 line
2.25.1