@@ -337,10 +337,15 @@ 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(
+ if (rdev->pm.active_crtcs) {
+ /* We call __wait_* directly because of double condition check
+ which we do not use. This call is suppossed to sleep until
+ a wake_up happens or a timeout elapses */
+ long timeout = msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT);
+ __wait_event_interruptible_timeout(
rdev->irq.vblank_queue, 0,
- msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT));
+ timeout);
+ }
if (rdev->pm.req_vblank & (1 << 0)) {
rdev->pm.req_vblank &= ~(1 << 0);
drm_vblank_put(rdev->ddev, 0);