Browse Source

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>
Matthew Garrett 15 years ago
parent
commit
c37d230af4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      drivers/gpu/drm/radeon/radeon_pm.c

+ 3 - 0
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;
 	int i;
 
 
+	if (!static_switch)
+		radeon_get_power_state(rdev, rdev->pm.planned_action);
+
 	mutex_lock(&rdev->cp.mutex);
 	mutex_lock(&rdev->cp.mutex);
 
 
 	/* wait for GPU idle */
 	/* wait for GPU idle */