All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] radeon/PM Really wait for vblank before reclocking
@ 2010-02-15 15:09 Jaime Velasco Juan
  2010-02-15 17:52 ` Rafał Miłecki
  0 siblings, 1 reply; 6+ messages in thread
From: Jaime Velasco Juan @ 2010-02-15 15:09 UTC (permalink / raw)
  To: airlied; +Cc: Jaime Velasco Juan, dri-devel

The old code used a false condition so it always waited until
timeout

Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com>
---
 drivers/gpu/drm/radeon/radeon_pm.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

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);
-- 
1.6.6.1


------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
--

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-17 18:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-15 15:09 [PATCH] radeon/PM Really wait for vblank before reclocking Jaime Velasco Juan
2010-02-15 17:52 ` Rafał Miłecki
2010-02-16 13:41   ` Jaime Velasco Juan
2010-02-16 15:54     ` Alex Deucher
2010-02-17 18:22   ` Rafał Miłecki
2010-02-17 18:33     ` Rafał Miłecki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.