radeon: Enable memory reclocking on r100-500
authorMatthew Garrett <mjg@redhat.com>
Wed, 28 Apr 2010 18:45:05 +0000 (14:45 -0400)
committerDave Airlie <airlied@redhat.com>
Tue, 18 May 2010 08:21:31 +0000 (18:21 +1000)
This seems to be relatively stable now, so enable it for these chipsets
too.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/r100.c

index 7675827c3a8d50d024fbcba002e511521d1447b1..87c4ffaf545e1303dbe4de1363543048f25889ad 100644 (file)
@@ -188,9 +188,13 @@ void r100_set_power_state(struct radeon_device *rdev, bool static_switch)
 #endif
                        radeon_pm_finish(rdev);
                } else {
+                       radeon_sync_with_vblank(rdev);
+
+                       if (!radeon_pm_in_vbl(rdev))
+                               return;
+
                        /* set engine clock */
                        if (sclk != rdev->pm.current_sclk) {
-                               radeon_sync_with_vblank(rdev);
                                radeon_pm_debug_check_in_vbl(rdev, false);
                                radeon_set_engine_clock(rdev, sclk);
                                radeon_pm_debug_check_in_vbl(rdev, true);
@@ -198,10 +202,8 @@ void r100_set_power_state(struct radeon_device *rdev, bool static_switch)
                                DRM_INFO("Setting: e: %d\n", sclk);
                        }
 
-#if 0
                        /* set memory clock */
                        if (rdev->asic->set_memory_clock && (mclk != rdev->pm.current_mclk)) {
-                               radeon_sync_with_vblank(rdev);
                                radeon_pm_debug_check_in_vbl(rdev, false);
                                radeon_pm_prepare(rdev);
                                radeon_set_memory_clock(rdev, mclk);
@@ -210,7 +212,6 @@ void r100_set_power_state(struct radeon_device *rdev, bool static_switch)
                                rdev->pm.current_mclk = mclk;
                                DRM_INFO("Setting: m: %d\n", mclk);
                        }
-#endif
                }
 
                rdev->pm.current_power_state_index = rdev->pm.requested_power_state_index;