Commit a8dbaeff authored by Alex Deucher's avatar Alex Deucher

drm/radeon/dpm: fixup dynamic state adjust for TN

Use a dedicated copy of the current power state since
we may have to adjust it on the fly.
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7cf36de9
...@@ -1379,6 +1379,11 @@ static void trinity_apply_state_adjust_rules(struct radeon_device *rdev) ...@@ -1379,6 +1379,11 @@ static void trinity_apply_state_adjust_rules(struct radeon_device *rdev)
bool force_high; bool force_high;
u32 num_active_displays = rdev->pm.dpm.new_active_crtc_count; u32 num_active_displays = rdev->pm.dpm.new_active_crtc_count;
/* point to the hw copy since this function will modify the ps */
pi->hw_ps = *ps;
rdev->pm.dpm.hw_ps.ps_priv = &pi->hw_ps;
ps = &pi->hw_ps;
if (rps->class & ATOM_PPLIB_CLASSIFICATION_THERMAL) if (rps->class & ATOM_PPLIB_CLASSIFICATION_THERMAL)
return trinity_patch_thermal_state(rdev, ps, current_ps); return trinity_patch_thermal_state(rdev, ps, current_ps);
......
...@@ -110,6 +110,7 @@ struct trinity_power_info { ...@@ -110,6 +110,7 @@ struct trinity_power_info {
bool enable_dpm; bool enable_dpm;
bool enable_sclk_ds; bool enable_sclk_ds;
bool uvd_dpm; bool uvd_dpm;
struct trinity_ps hw_ps;
}; };
#define TRINITY_AT_DFLT 30 #define TRINITY_AT_DFLT 30
......
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