From a8dbaeff3d63957b174ce154f3a52d2292d0ab87 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 29 Nov 2012 20:34:06 -0500 Subject: [PATCH] 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: Alex Deucher --- drivers/gpu/drm/radeon/trinity_dpm.c | 5 +++++ drivers/gpu/drm/radeon/trinity_dpm.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/radeon/trinity_dpm.c b/drivers/gpu/drm/radeon/trinity_dpm.c index 1b3822ff6083..0c1b50a62d0a 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.c +++ b/drivers/gpu/drm/radeon/trinity_dpm.c @@ -1379,6 +1379,11 @@ static void trinity_apply_state_adjust_rules(struct radeon_device *rdev) bool force_high; 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) return trinity_patch_thermal_state(rdev, ps, current_ps); diff --git a/drivers/gpu/drm/radeon/trinity_dpm.h b/drivers/gpu/drm/radeon/trinity_dpm.h index 31100ac64245..c663aed6aeea 100644 --- a/drivers/gpu/drm/radeon/trinity_dpm.h +++ b/drivers/gpu/drm/radeon/trinity_dpm.h @@ -110,6 +110,7 @@ struct trinity_power_info { bool enable_dpm; bool enable_sclk_ds; bool uvd_dpm; + struct trinity_ps hw_ps; }; #define TRINITY_AT_DFLT 30 -- 2.20.1