radeon: Make sure that we determine the correct PM state before transition
authorMatthew Garrett <mjg@redhat.com>
Tue, 27 Apr 2010 17:58:46 +0000 (13:58 -0400)
committerDave Airlie <airlied@redhat.com>
Tue, 18 May 2010 08:21:26 +0000 (18:21 +1000)
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>
drivers/gpu/drm/radeon/radeon_pm.c

index 79d3336eede57ae399ee23127d637aadad88dadd..7cc54c804cb04d21037f55ffd04f30d3206b82b3 100644 (file)
@@ -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 */