[Intel-gfx] [PATCH] drm/i915: Make wait-for-pending-flips more defensive
Jani Nikula
jani.nikula at linux.intel.com
Tue Aug 26 13:49:07 CEST 2014
On Wed, 20 Aug 2014, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 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 at chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/intel_display.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index a7582a46e82e..5898e7157c4c 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3359,11 +3359,7 @@ void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
> struct drm_device *dev = crtc->dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
>
> - if (crtc->primary->fb == NULL)
> - return;
> -
> WARN_ON(waitqueue_active(&dev_priv->pending_flip_queue));
> -
> if (WARN_ON(wait_event_timeout(dev_priv->pending_flip_queue,
> !intel_crtc_has_pending_flip(crtc),
> 60*HZ) == 0)) {
> @@ -3378,9 +3374,11 @@ void intel_crtc_wait_for_pending_flips(struct drm_crtc *crtc)
> spin_unlock_irqrestore(&dev->event_lock, flags);
> }
Chris, the patch context has changed above, in fact I can't find such
context anywhere. Is the patch otherwise valid against current -fixes?
BR,
Jani.
>
> - mutex_lock(&dev->struct_mutex);
> - intel_finish_fb(crtc->primary->fb);
> - mutex_unlock(&dev->struct_mutex);
> + if (crtc->primary->fb) {
> + mutex_lock(&dev->struct_mutex);
> + intel_finish_fb(crtc->primary->fb);
> + mutex_unlock(&dev->struct_mutex);
> + }
> }
>
> /* Program iCLKIP clock to the desired frequency */
> --
> 2.1.0.rc1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list