From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: Make wait-for-pending-flips more defensive Date: Wed, 20 Aug 2014 16:12:52 +0300 Message-ID: <20140820131252.GH4193@intel.com> References: <1408536814-12974-1-git-send-email-chris@chris-wilson.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C43A6E6C4 for ; Wed, 20 Aug 2014 06:13:18 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1408536814-12974-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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=3D82612 > Signed-off-by: Chris Wilson Reviewed-by: Ville Syrj=E4l=E4 > --- > 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 =3D crtc->dev; > struct drm_i915_private *dev_priv =3D dev->dev_private; > = > - if (crtc->primary->fb =3D=3D 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) =3D=3D 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=E4l=E4 Intel OTC