aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_display.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-08-20 08:13:34 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-03 05:04:12 -0400
commit975d568adeba8e50fe0e526298ab4fdf8636e115 (patch)
tree55b0af305ed010b674e0792892c9bdb96e991758 /drivers/gpu/drm/i915/intel_display.c
parente07f0552c6adc9f36c8d07cac24adf2c87ddfd69 (diff)
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=82612 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r--drivers/gpu/drm/i915/intel_display.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index dec7287ad0c2..921594f64158 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3363,18 +3363,16 @@ void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
3363 struct drm_device *dev = crtc->dev; 3363 struct drm_device *dev = crtc->dev;
3364 struct drm_i915_private *dev_priv = dev->dev_private; 3364 struct drm_i915_private *dev_priv = dev->dev_private;
3365 3365
3366 if (crtc->primary->fb == NULL)
3367 return;
3368
3369 WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue)); 3366 WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue));
3370
3371 WARN_ON(wait_event_timeout(dev_priv->pending_flip_queue, 3367 WARN_ON(wait_event_timeout(dev_priv->pending_flip_queue,
3372 !intel_crtc_has_pending_flip(crtc), 3368 !intel_crtc_has_pending_flip(crtc),
3373 60*HZ) == 0); 3369 60*HZ) == 0);
3374 3370
3375 mutex_lock(&dev->struct_mutex); 3371 if (crtc->primary->fb) {
3376 intel_finish_fb(crtc->primary->fb); 3372 mutex_lock(&dev->struct_mutex);
3377 mutex_unlock(&dev->struct_mutex); 3373 intel_finish_fb(crtc->primary->fb);
3374 mutex_unlock(&dev->struct_mutex);
3375 }
3378} 3376}
3379 3377
3380/* Program iCLKIP clock to the desired frequency */ 3378/* Program iCLKIP clock to the desired frequency */