Commit 975d568a authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter

drm/i915: Make wait-for-pending-flips more defensive

Be sure to always flush a stuck pageflip even if we couldn't possibly
expect one to be there.

References: https://bugs.freedesktop.org/show_bug.cgi?id=82612Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent e07f0552
...@@ -3363,18 +3363,16 @@ void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc) ...@@ -3363,18 +3363,16 @@ void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
if (crtc->primary->fb == NULL)
return;
WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue)); WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue));
WARN_ON(wait_event_timeout(dev_priv->pending_flip_queue, WARN_ON(wait_event_timeout(dev_priv->pending_flip_queue,
!intel_crtc_has_pending_flip(crtc), !intel_crtc_has_pending_flip(crtc),
60*HZ) == 0); 60*HZ) == 0);
mutex_lock(&dev->struct_mutex); if (crtc->primary->fb) {
intel_finish_fb(crtc->primary->fb); mutex_lock(&dev->struct_mutex);
mutex_unlock(&dev->struct_mutex); intel_finish_fb(crtc->primary->fb);
mutex_unlock(&dev->struct_mutex);
}
} }
/* Program iCLKIP clock to the desired frequency */ /* Program iCLKIP clock to the desired frequency */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment