summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_pm.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-11-29 20:27:50 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-06-27 19:15:51 -0400
commit7cf36de9eb584e7d0b4956b1c17d46a083bb30c4 (patch)
tree0bff80e8d4764b4f60f11261875ada9968b5d139 /drivers/gpu/drm/radeon/radeon_pm.c
parent5ca302f70171ca90b43166cbf975a4b1d883b127 (diff)
downloadlinux-7cf36de9eb584e7d0b4956b1c17d46a083bb30c4.tar.bz2
drm/radeon/dpm: fixup dynamic state adjust for sumo
Use a dedicated copy of the current power state since we may have to adjust it on the fly. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_pm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 79e35d6a40e3..196c65a9df3b 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -684,6 +684,17 @@ restart_search:
return NULL;
}
+static void radeon_dpm_update_requested_ps(struct radeon_device *rdev,
+ struct radeon_ps *ps)
+{
+ /* copy the ps to the hw ps and point the requested ps
+ * at the hw state in case the driver wants to modify
+ * the state dynamically.
+ */
+ rdev->pm.dpm.hw_ps = *ps;
+ rdev->pm.dpm.requested_ps = &rdev->pm.dpm.hw_ps;
+}
+
static void radeon_dpm_change_power_state_locked(struct radeon_device *rdev)
{
int i;
@@ -704,7 +715,7 @@ static void radeon_dpm_change_power_state_locked(struct radeon_device *rdev)
ps = radeon_dpm_pick_power_state(rdev, dpm_state);
if (ps)
- rdev->pm.dpm.requested_ps = ps;
+ radeon_dpm_update_requested_ps(rdev, ps);
else
return;