All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Don't warn if we restore pm interrupts during reset
Date: Thu, 14 Aug 2014 17:45:59 +0300	[thread overview]
Message-ID: <20140814144559.GE4193@intel.com> (raw)
In-Reply-To: <20140814142316.GP10500@phenom.ffwll.local>

On Thu, Aug 14, 2014 at 04:23:16PM +0200, Daniel Vetter wrote:
> On Thu, Aug 14, 2014 at 03:46:43PM +0300, Mika Kuoppala wrote:
> > We lost the software state tracking due to reset, so don't
> > complain if it doesn't match.
> 
> This sounds more like gpu reset should be a bit more careful (even more
> careful than we already are compared to earlier kernels) with making sure
> the irq state is still sane after a reset?
> 
> Or what exactly is the failure mode here? The commit message lacks a bit
> details in form of a nice text or even better: A testcase ;-)

Killing the hpd irq and gt_powersave junk from i915_reset() would be my
suggestion here. I don't even know why the hpd stuff is still there, we
removed all the other irq frobbery from there a while back. And last I
looked gpu reset didn't affect the rc6/rps stuff either, though more
testing should be done to make sure I didn't just imagine it.

> 
> Thanks, Daniel
> 
> > 
> > v2: fix build error
> > 
> > Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_pm.c |    6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> > index 12f4e14..7a1309c 100644
> > --- a/drivers/gpu/drm/i915/intel_pm.c
> > +++ b/drivers/gpu/drm/i915/intel_pm.c
> > @@ -3593,7 +3593,8 @@ static void gen8_enable_rps_interrupts(struct drm_device *dev)
> >  	struct drm_i915_private *dev_priv = dev->dev_private;
> >  
> >  	spin_lock_irq(&dev_priv->irq_lock);
> > -	WARN_ON(dev_priv->rps.pm_iir);
> > +	if (!i915_reset_in_progress(&dev_priv->gpu_error))
> > +		WARN_ON(dev_priv->rps.pm_iir);
> >  	gen8_enable_pm_irq(dev_priv, dev_priv->pm_rps_events);
> >  	I915_WRITE(GEN8_GT_IIR(2), dev_priv->pm_rps_events);
> >  	spin_unlock_irq(&dev_priv->irq_lock);
> > @@ -3604,7 +3605,8 @@ static void gen6_enable_rps_interrupts(struct drm_device *dev)
> >  	struct drm_i915_private *dev_priv = dev->dev_private;
> >  
> >  	spin_lock_irq(&dev_priv->irq_lock);
> > -	WARN_ON(dev_priv->rps.pm_iir);
> > +	if (!i915_reset_in_progress(&dev_priv->gpu_error))
> > +		WARN_ON(dev_priv->rps.pm_iir);
> >  	gen6_enable_pm_irq(dev_priv, dev_priv->pm_rps_events);
> >  	I915_WRITE(GEN6_PMIIR, dev_priv->pm_rps_events);
> >  	spin_unlock_irq(&dev_priv->irq_lock);
> > -- 
> > 1.7.9.5
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
> -- 
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 12:36 [PATCH] drm/i915: Don't warn if we restore pm interrupts during reset Mika Kuoppala
2014-08-14 12:46 ` [PATCH v2] " Mika Kuoppala
2014-08-14 14:23   ` Daniel Vetter
2014-08-14 14:45     ` Ville Syrjälä [this message]
2014-08-14 15:03       ` Daniel Vetter
2014-08-15  6:55       ` Chris Wilson
2014-08-14 15:14     ` Mika Kuoppala
2014-08-14 15:43       ` Mika Kuoppala

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=20140814144559.GE4193@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=daniel@ffwll.ch \
    --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 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.