All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: "Daniel, Thomas" <thomas.daniel@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v3] drm/i915: Rework GPU reset sequence to match	driver load & thaw
Date: Wed, 20 Aug 2014 15:58:26 +0100	[thread overview]
Message-ID: <20140820145826.GD12830@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <BFEE8FEC12424048AF1805991D65FA9119686274@IRSMSX105.ger.corp.intel.com>

On Wed, Aug 20, 2014 at 02:46:37PM +0000, Daniel, Thomas wrote:
> 
> 
> > -----Original Message-----
> > From: Intel-gfx [mailto:intel-gfx-bounces@lists.freedesktop.org] On Behalf
> > Of alistair.mcaulay@intel.com
> > Sent: Friday, August 15, 2014 6:52 PM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [Intel-gfx] [PATCH v3] drm/i915: Rework GPU reset sequence to
> > match driver load & thaw
> > 
> > From: "McAulay, Alistair" <alistair.mcaulay@intel.com>
> > 
> > This patch is to address Daniels concerns over different code during reset:
> > 
> > http://lists.freedesktop.org/archives/intel-gfx/2014-June/047758.html
> > 
> > "The reason for aiming as hard as possible to use the exact same code for
> > driver load, gpu reset and runtime pm/system resume is that we've simply
> > seen too many bugs due to slight variations and unintended omissions."
> > 
> > Tested using igt drv_hangman.
> > 
> > V2: Cleaner way of preventing check_wedge returning -EAGAIN
> > V3: Clean the last_context during reset, to ensure do_switch() does the
> > MI_SET_CONTEXT. As per review.
> > Signed-off-by: McAulay, Alistair <alistair.mcaulay@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c         |  6 +++
> >  drivers/gpu/drm/i915/i915_drv.h         |  3 ++
> >  drivers/gpu/drm/i915/i915_gem.c         |  4 +-
> >  drivers/gpu/drm/i915/i915_gem_context.c | 33 +++-------------
> >  drivers/gpu/drm/i915/i915_gem_gtt.c     | 67 +++++----------------------------
> >  drivers/gpu/drm/i915/i915_gem_gtt.h     |  3 +-
> >  6 files changed, 28 insertions(+), 88 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c
> > b/drivers/gpu/drm/i915/i915_drv.c index 5e4fefd..3bfafe6 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -806,7 +806,13 @@ int i915_reset(struct drm_device *dev)
> >  			!dev_priv->ums.mm_suspended) {
> >  		dev_priv->ums.mm_suspended = 0;
> > 
> > +		/* Used to prevent gem_check_wedged returning -EAGAIN
> > during gpu reset */
> > +		dev_priv->gpu_error.reload_in_reset = true;
> > +
> >  		ret = i915_gem_init_hw(dev);
> > +
> > +		dev_priv->gpu_error.reload_in_reset = false;
> > +
> >  		mutex_unlock(&dev->struct_mutex);
> >  		if (ret) {
> >  			DRM_ERROR("Failed hw init on reset %d\n", ret); diff
> > --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 991b663..116daff 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1217,6 +1217,9 @@ struct i915_gpu_error {
> > 
> >  	/* For missed irq/seqno simulation. */
> >  	unsigned int test_irq_rings;
> > +
> > +	/* Used to prevent gem_check_wedged returning -EAGAIN during
> > gpu reset   */
> > +	bool reload_in_reset;
> >  };
> > 
> >  enum modeset_restore {
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c
> > b/drivers/gpu/drm/i915/i915_gem.c index ef047bc..e7396eb 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -1085,7 +1085,9 @@ i915_gem_check_wedge(struct i915_gpu_error
> > *error,
> >  		if (i915_terminally_wedged(error))
> >  			return -EIO;
> > 
> > -		return -EAGAIN;
> > +		/* Check if GPU Reset is in progress */
> > +		if (!error->reload_in_reset)
> > +			return -EAGAIN;

This is silly. You already have the same flag above. Look closer.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2014-08-20 14:58 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 15:05 [PATCH] drm/i915: Rework GPU reset sequence to match driver load & thaw alistair.mcaulay
2014-07-26  1:05 ` Ben Widawsky
2014-07-28  9:26   ` Daniel Vetter
2014-07-28 17:12     ` Mcaulay, Alistair
2014-07-29  0:16       ` Ben Widawsky
2014-07-29 17:25         ` Mcaulay, Alistair
2014-07-29 18:12           ` Daniel Vetter
2014-07-29  7:36     ` Chris Wilson
2014-07-29 10:32       ` Daniel Vetter
2014-07-30 16:59         ` Mcaulay, Alistair
2014-07-30 21:00           ` Daniel Vetter
2014-07-31 16:37             ` Mcaulay, Alistair
2014-08-04  7:52               ` Daniel Vetter
2014-08-05  8:47 ` [PATCH v2] " alistair.mcaulay
2014-08-06 12:58   ` Mcaulay, Alistair
2014-08-06 16:24   ` Mika Kuoppala
2014-08-15 13:33     ` Mcaulay, Alistair
2014-08-15 15:41       ` Daniel Vetter
2014-08-15 17:03       ` Mika Kuoppala
2014-08-15 17:51         ` [PATCH v3] " alistair.mcaulay
2014-08-19 10:12           ` Mcaulay, Alistair
2014-08-19 12:35             ` Mika Kuoppala
2014-08-21 12:38               ` Mcaulay, Alistair
2014-08-25 20:28                 ` Daniel Vetter
2014-08-20 14:46           ` Daniel, Thomas
2014-08-20 14:58             ` Chris Wilson [this message]
2014-08-20 15:21               ` Mcaulay, Alistair
2014-08-20 15:56                 ` Chris Wilson
2014-08-25 20:18                   ` Daniel Vetter
2014-08-26  6:09                     ` Chris Wilson

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=20140820145826.GD12830@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=thomas.daniel@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.