Skip to content

Commit

Permalink
drm/amd/powerplay: fix wrong clock adjust sequence
Browse files Browse the repository at this point in the history
The clocks should be adjusted after display configuration changed.
Otherwise, the socclk and memclk may be forced on an unnecessary higher
level.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Evan Quan authored and Alex Deucher committed Jun 13, 2018
1 parent 9702803 commit c3dade5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions drivers/gpu/drm/amd/powerplay/hwmgr/pp_psm.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,19 +265,18 @@ int psm_adjust_power_state_dynamic(struct pp_hwmgr *hwmgr, bool skip,
if (skip)
return 0;

if (!hwmgr->ps)
/*
* for vega12/vega20 which does not support power state manager
* DAL clock limits should also be honoured
*/
phm_apply_clock_adjust_rules(hwmgr);

phm_pre_display_configuration_changed(hwmgr);

phm_display_configuration_changed(hwmgr);

if (hwmgr->ps)
power_state_management(hwmgr, new_ps);
else
/*
* for vega12/vega20 which does not support power state manager
* DAL clock limits should also be honoured
*/
phm_apply_clock_adjust_rules(hwmgr);

phm_notify_smc_display_config_after_ps_adjustment(hwmgr);

Expand Down

0 comments on commit c3dade5

Please sign in to comment.