aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_pm.c
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2010-03-02 16:06:51 -0500
committerDave Airlie <airlied@redhat.com>2010-03-14 20:23:22 -0400
commit839461d3b0e3082eb382f17a3e3899372f28649a (patch)
treee34106e15420df1ef6c726e35783ae0d562fcb66 /drivers/gpu/drm/radeon/radeon_pm.c
parent65388342d66a63a29c76058e94a00d7bc0c6423b (diff)
drm/radeon/kms: switch to condition waiting for reclocking
We tried to implement interruptible waiting with timeout (it was broken anyway) which was not a good idea as explained by Andrew. It's possible to avoid using additional variable but actually it inroduces using more complex in-kernel tools. So simply add one variable for condition. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_pm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index d4d1c39a0e99..d800b86af4d6 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -353,10 +353,12 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev)
353 rdev->pm.req_vblank |= (1 << 1); 353 rdev->pm.req_vblank |= (1 << 1);
354 drm_vblank_get(rdev->ddev, 1); 354 drm_vblank_get(rdev->ddev, 1);
355 } 355 }
356 if (rdev->pm.active_crtcs) 356 if (rdev->pm.active_crtcs) {
357 wait_event_interruptible_timeout( 357 rdev->pm.vblank_sync = false;
358 rdev->irq.vblank_queue, 0, 358 wait_event_timeout(
359 rdev->irq.vblank_queue, rdev->pm.vblank_sync,
359 msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT)); 360 msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT));
361 }
360 if (rdev->pm.req_vblank & (1 << 0)) { 362 if (rdev->pm.req_vblank & (1 << 0)) {
361 rdev->pm.req_vblank &= ~(1 << 0); 363 rdev->pm.req_vblank &= ~(1 << 0);
362 drm_vblank_put(rdev->ddev, 0); 364 drm_vblank_put(rdev->ddev, 0);