From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Make wait-for-pending-flips more defensive
Date: Wed, 20 Aug 2014 16:12:52 +0300 [thread overview]
Message-ID: <20140820131252.GH4193@intel.com> (raw)
In-Reply-To: <1408536814-12974-1-git-send-email-chris@chris-wilson.co.uk>
On Wed, Aug 20, 2014 at 01:13:34PM +0100, Chris Wilson 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@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> 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);
> }
>
> - 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@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-08-20 13:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-20 12:13 [PATCH] drm/i915: Make wait-for-pending-flips more defensive Chris Wilson
2014-08-20 13:12 ` Ville Syrjälä [this message]
2014-08-26 11:49 ` Jani Nikula
2014-08-26 12:14 ` Chris Wilson
2014-08-26 12:51 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140820131252.GH4193@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox