drm/i915: Don't die in wait_for_pending_flips
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 19 May 2014 14:09:35 +0000 (16:09 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 19 May 2014 15:53:05 +0000 (17:53 +0200)
We can apperently miss them, but breaking the entire driver hampers
testing. So bail out after one minute, our customerary "this is a lost
cause" timeout.

References: https://bugs.freedesktop.org/show_bug.cgi?id=78383
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_display.c

index 0e313a713dbec5c965aa99664b2ab083eafdbb11..22a5864585b332c37e6ba3a9421f7d45cd7e3394 100644 (file)
@@ -3274,8 +3274,9 @@ static void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
 
        WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue));
 
-       wait_event(dev_priv->pending_flip_queue,
-                  !intel_crtc_has_pending_flip(crtc));
+       WARN_ON(wait_event_timeout(dev_priv->pending_flip_queue,
+                                  !intel_crtc_has_pending_flip(crtc),
+                                  60*HZ) == 0);
 
        mutex_lock(&dev->struct_mutex);
        intel_finish_fb(crtc->primary->fb);