Commit 789fd60f authored by Eric Huang's avatar Eric Huang Committed by Alex Deucher

drm/amd/powerplay: reapply power profile when force dpm level to auto

Signed-off-by: default avatarEric Huang <JinHuiEric.Huang@amd.com>
Acked-by: default avatarRex Zhu <Rex.Zhu@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 34bb2734
...@@ -146,12 +146,28 @@ int phm_disable_dynamic_state_management(struct pp_hwmgr *hwmgr) ...@@ -146,12 +146,28 @@ int phm_disable_dynamic_state_management(struct pp_hwmgr *hwmgr)
int phm_force_dpm_levels(struct pp_hwmgr *hwmgr, enum amd_dpm_forced_level level) int phm_force_dpm_levels(struct pp_hwmgr *hwmgr, enum amd_dpm_forced_level level)
{ {
int ret = 0;
PHM_FUNC_CHECK(hwmgr); PHM_FUNC_CHECK(hwmgr);
if (hwmgr->hwmgr_func->force_dpm_level != NULL) if (hwmgr->hwmgr_func->force_dpm_level != NULL) {
return hwmgr->hwmgr_func->force_dpm_level(hwmgr, level); ret = hwmgr->hwmgr_func->force_dpm_level(hwmgr, level);
if (ret)
return ret;
return 0; if (hwmgr->hwmgr_func->set_power_profile_state) {
if (hwmgr->current_power_profile == AMD_PP_GFX_PROFILE)
ret = hwmgr->hwmgr_func->set_power_profile_state(
hwmgr,
&hwmgr->gfx_power_profile);
else if (hwmgr->current_power_profile == AMD_PP_COMPUTE_PROFILE)
ret = hwmgr->hwmgr_func->set_power_profile_state(
hwmgr,
&hwmgr->compute_power_profile);
}
}
return ret;
} }
int phm_apply_state_adjust_rules(struct pp_hwmgr *hwmgr, int phm_apply_state_adjust_rules(struct pp_hwmgr *hwmgr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment