summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2010-04-27 13:58:46 -0400
committerDave Airlie <airlied@redhat.com>2010-05-18 18:21:26 +1000
commitc37d230af450472183e70947f8e2aa8101a96603 (patch)
tree762619ea19922f6caa0e8121d69617de6351d3e8
parent956ac86d9277b7142f0ad3f24f7fbd4beed0777d (diff)
radeon: Make sure that we determine the correct PM state before transition
We need to choose the correct PM state to transition into before starting the actual change. Call radeon_get_power_state() at the top of the clock setting to do so. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 79d3336eede..7cc54c804cb 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -58,6 +58,9 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev, int static_switch)
{
int i;
+ if (!static_switch)
+ radeon_get_power_state(rdev, rdev->pm.planned_action);
+
mutex_lock(&rdev->cp.mutex);
/* wait for GPU idle */