aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2019-01-17 17:52:41 +0800
committerAlex Deucher <alexander.deucher@amd.com>2019-01-25 16:15:35 -0500
commit921935dc64040b56c785a02b2f39fd5d28932c78 (patch)
tree85fac0586a6ca758d901785d33c2058906922ea8 /drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
parentdrm/amd/powerplay: avoid unnecessary dpm level setting (diff)
downloadlinux-dev-921935dc64040b56c785a02b2f39fd5d28932c78.tar.xz
linux-dev-921935dc64040b56c785a02b2f39fd5d28932c78.zip
drm/amd/powerplay: enforce display related settings only on needed
No display related settings are needed on dpm level change. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
index 68f3dcaa8070..ce177d7f04cb 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
@@ -256,16 +256,14 @@ static void power_state_management(struct pp_hwmgr *hwmgr,
}
}
-int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
+int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip_display_settings,
struct pp_power_state *new_ps)
{
uint32_t index;
long workload;
- if (skip)
- return 0;
-
- phm_display_configuration_changed(hwmgr);
+ if (!skip_display_settings)
+ phm_display_configuration_changed(hwmgr);
if (hwmgr->ps)
power_state_management(hwmgr, new_ps);
@@ -276,7 +274,8 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
*/
phm_apply_clock_adjust_rules(hwmgr);
- phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
+ if (!skip_display_settings)
+ phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
if ((hwmgr->request_dpm_level != hwmgr->dpm_level) &&
!phm_force_dpm_levels(hwmgr, hwmgr->request_dpm_level))