From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH] drm/i915: Perform pageflip using mmio if the GPU is terminally wedged Date: Wed, 5 Mar 2014 15:08:27 +0200 Message-ID: <20140305130827.GS3852@intel.com> References: <1392888373-29221-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 mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 01502FA66E for ; Wed, 5 Mar 2014 05:08:30 -0800 (PST) Content-Disposition: inline In-Reply-To: <1392888373-29221-1-git-send-email-chris@chris-wilson.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Chris Wilson Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Thu, Feb 20, 2014 at 09:26:13AM +0000, Chris Wilson wrote: > After a hang and failed reset, we cannot use the GPU to execute the page > flip instructions. Instead we can force a synchronous mmio flip. (Later, > we can reduce the synchronicity of the mmio flip by moving some of the > delays off to a worker, like the current page flip code; see vblank > tasks.) > = > References: https://bugs.freedesktop.org/show_bug.cgi?id=3D72631 > Signed-off-by: Chris Wilson Reviewed-by: Ville Syrj=E4l=E4 > --- > drivers/gpu/drm/i915/intel_display.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > = > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/= intel_display.c > index 79ef515..d5eafd1 100644 > --- a/drivers/gpu/drm/i915/intel_display.c > +++ b/drivers/gpu/drm/i915/intel_display.c > @@ -8717,6 +8717,9 @@ static int intel_crtc_page_flip(struct drm_crtc *cr= tc, > fb->pitches[0] !=3D crtc->fb->pitches[0])) > return -EINVAL; > = > + if (i915_terminally_wedged(&dev_priv->gpu_error)) > + goto out_hang; > + > work =3D kzalloc(sizeof(*work), GFP_KERNEL); > if (work =3D=3D NULL) > return -ENOMEM; > @@ -8791,6 +8794,13 @@ cleanup: > free_work: > kfree(work); > = > + if (ret =3D=3D -EIO) { > +out_hang: > + intel_crtc_wait_for_pending_flips(crtc); > + ret =3D intel_pipe_set_base(crtc, crtc->x, crtc->y, fb); > + if (ret =3D=3D 0 && event) > + drm_send_vblank_event(dev, intel_crtc->pipe, event); > + } > return ret; > } > = > -- = > 1.7.9.5 > = > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- = Ville Syrj=E4l=E4 Intel OTC