diff options
author | Lijo Lazar <[email protected]> | 2023-03-24 15:21:30 +0530 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2023-06-09 09:58:41 -0400 |
commit | 00e1ab02c2ba31b2bd446979949193eb3ca2561c (patch) | |
tree | 587125a8b6edb8e4f93d8ed89f6ee01481ac0abf | |
parent | 1e91a5f79110b96baf7ad21d3c7b5c3e18cdf2a5 (diff) |
drm/amdgpu: Skip halting RLC on GFX v9.4.3
RLC-PMFW handshake happens periodically when GFXCLK DPM is enabled and
halting RLC may cause unexpected results. Avoid halting RLC from driver
side.
Signed-off-by: Lijo Lazar <[email protected]>
Reviewed-by: Le Ma <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c index 7ef2c9b515ef..6cde05421a10 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c @@ -1256,21 +1256,20 @@ static int gfx_v9_4_3_xcc_rlc_resume(struct amdgpu_device *adev, int xcc_id) { int r; - gfx_v9_4_3_xcc_rlc_stop(adev, xcc_id); - - /* disable CG */ - WREG32_SOC15(GC, GET_INST(GC, xcc_id), regRLC_CGCG_CGLS_CTRL, 0); - - gfx_v9_4_3_xcc_init_pg(adev, xcc_id); - if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) { + gfx_v9_4_3_xcc_rlc_stop(adev, xcc_id); /* legacy rlc firmware loading */ r = gfx_v9_4_3_xcc_rlc_load_microcode(adev, xcc_id); if (r) return r; + gfx_v9_4_3_xcc_rlc_start(adev, xcc_id); } - gfx_v9_4_3_xcc_rlc_start(adev, xcc_id); + amdgpu_gfx_rlc_enter_safe_mode(adev, xcc_id); + /* disable CG */ + WREG32_SOC15(GC, GET_INST(GC, xcc_id), regRLC_CGCG_CGLS_CTRL, 0); + gfx_v9_4_3_xcc_init_pg(adev, xcc_id); + amdgpu_gfx_rlc_exit_safe_mode(adev, xcc_id); return 0; } @@ -1967,14 +1966,6 @@ static void gfx_v9_4_3_xcc_fini(struct amdgpu_device *adev, int xcc_id) gfx_v9_4_3_xcc_kcq_fini_register(adev, xcc_id); gfx_v9_4_3_xcc_cp_enable(adev, false, xcc_id); - - /* Skip suspend with A+A reset */ - if (adev->gmc.xgmi.connected_to_cpu && amdgpu_in_reset(adev)) { - dev_dbg(adev->dev, "Device in reset. Skipping RLC halt\n"); - return; - } - - gfx_v9_4_3_xcc_rlc_stop(adev, xcc_id); } static int gfx_v9_4_3_hw_init(void *handle) |