radeon/PM Really wait for vblank before reclocking
diff mbox

Message ID 1266246573-3810-1-git-send-email-jsagarribay@gmail.com
State New, archived
Headers show

Commit Message

Jaime Velasco Juan Feb. 15, 2010, 3:09 p.m. UTC
None

Patch
diff mbox

diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index a8e151e..842952f 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -337,10 +337,12 @@  static void radeon_pm_set_clocks(struct radeon_device *rdev)
 		rdev->pm.req_vblank |= (1 << 1);
 		drm_vblank_get(rdev->ddev, 1);
 	}
-	if (rdev->pm.active_crtcs)
-		wait_event_interruptible_timeout(
-			rdev->irq.vblank_queue, 0,
-			msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT));
+	if (rdev->pm.active_crtcs) {
+		long timeout = msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT);
+		__wait_event_interruptible_timeout(
+			rdev->irq.vblank_queue, 1,
+			timeout);
+	}
 	if (rdev->pm.req_vblank & (1 << 0)) {
 		rdev->pm.req_vblank &= ~(1 << 0);
 		drm_vblank_put(rdev->ddev, 0);