Skip to content

Commit

Permalink
drm/amd/pm: Fix an error handling path in vega10_enable_se_edc_force_…
Browse files Browse the repository at this point in the history
…stall_config()

In case of error after a amdgpu_gfx_rlc_enter_safe_mode() call, it is not
balanced by a corresponding amdgpu_gfx_rlc_exit_safe_mode() call.

Add the missing call.

Fixes: 9b7b815 ("drm/amd/powerplay: added didt support for vega10")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Christophe JAILLET authored and Alex Deucher committed Dec 10, 2024
1 parent fcb600b commit a330078
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_powertune.c
Original file line number Diff line number Diff line change
Expand Up @@ -1120,13 +1120,14 @@ static int vega10_enable_se_edc_force_stall_config(struct pp_hwmgr *hwmgr)
result = vega10_program_didt_config_registers(hwmgr, SEEDCForceStallPatternConfig_Vega10, VEGA10_CONFIGREG_DIDT);
result |= vega10_program_didt_config_registers(hwmgr, SEEDCCtrlForceStallConfig_Vega10, VEGA10_CONFIGREG_DIDT);
if (0 != result)
return result;
goto exit_safe_mode;

vega10_didt_set_mask(hwmgr, false);

exit_safe_mode:
amdgpu_gfx_rlc_exit_safe_mode(adev, 0);

return 0;
return result;
}

static int vega10_disable_se_edc_force_stall_config(struct pp_hwmgr *hwmgr)
Expand Down

0 comments on commit a330078

Please sign in to comment.