Skip to content

Commit a0e4fa2

Browse files
Evan Quanalexdeucher
authored andcommitted
drm/amd/powerplay: avoid unnecessary dpm level setting
No dpm level setting is needed when the request level is actually same as current. Signed-off-by: Evan Quan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent c4c905e commit a0e4fa2

File tree

1 file changed

+2
-1
lines changed
  • drivers/gpu/drm/amd/powerplay/hwmgr

1 file changed

+2
-1
lines changed

drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,8 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
278278

279279
phm_notify_smc_display_config_after_ps_adjustment(hwmgr);
280280

281-
if (!phm_force_dpm_levels(hwmgr, hwmgr->request_dpm_level))
281+
if ((hwmgr->request_dpm_level != hwmgr->dpm_level) &&
282+
!phm_force_dpm_levels(hwmgr, hwmgr->request_dpm_level))
282283
hwmgr->dpm_level = hwmgr->request_dpm_level;
283284

284285
if (hwmgr->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL) {

0 commit comments

Comments
 (0)