public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Daniel Vetter <daniel@ffwll.ch>,
	Mika Kuoppala <mika.kuoppala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Detect page faults during hangcheck
Date: Tue, 17 Mar 2015 11:31:16 +0100	[thread overview]
Message-ID: <20150317103116.GW21993@phenom.ffwll.local> (raw)
In-Reply-To: <20150316213044.GA8591@nuc-i3427.alporthouse.com>

On Mon, Mar 16, 2015 at 09:30:44PM +0000, Chris Wilson wrote:
> On Mon, Mar 16, 2015 at 06:53:40PM +0100, Daniel Vetter wrote:
> > On Mon, Mar 16, 2015 at 03:46:35PM +0200, Mika Kuoppala wrote:
> > > From: Chris Wilson <chris@chris-wilson.co.uk>
> > > 
> > > On Sandybridge+, the GPU provides the ERROR register for detecting page
> > > faults. Hook this up to our hangcheck so that we can dump the error
> > > state soon after such an event occurs. This would be better inside an
> > > interrupt handler, but it serves a purpose here as it detects that our
> > > initial context setup is invalid...
> > > 
> > > Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
> > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > > ---
> > >  drivers/gpu/drm/i915/i915_irq.c     | 5 +++++
> > >  drivers/gpu/drm/i915/intel_uncore.c | 2 ++
> > >  2 files changed, 7 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
> > > index 49ad5fb..ea668fc 100644
> > > --- a/drivers/gpu/drm/i915/i915_irq.c
> > > +++ b/drivers/gpu/drm/i915/i915_irq.c
> > > @@ -2929,6 +2929,11 @@ static void i915_hangcheck_elapsed(struct work_struct *work)
> > >  	if (!i915.enable_hangcheck)
> > >  		return;
> > >  
> > > +	if (INTEL_INFO(dev_priv)->gen >= 6 && I915_READ(ERROR_GEN6)) {
> > > +		i915_handle_error(dev, false, "GPU reported a page fault");
> > > +		I915_WRITE(ERROR_GEN6, 0);
> > 
> > Shouldn't we also at least report the bits from the ERROR register
> > somewhere? Or are they supremely useless?
> 
> It's recorded in the hangcheck already - that's how I knew we were
> generating pagefaults during module init in the first place.

Ah right missed that, so I think we're covered. Maybe a comment that
handle_error captures ERROR_GEN6? Doesn't really need to be though, just
in case someone decides to reorder the clearing with the handling.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-03-17 10:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-16 13:46 [PATCH 0/3] ring/context initialization patches Mika Kuoppala
2015-03-16 13:46 ` [PATCH 1/3] drm/i915: Wait for render state init Mika Kuoppala
2015-03-16 13:51   ` Chris Wilson
2015-03-16 14:20     ` Mika Kuoppala
2015-03-16 14:38       ` Chris Wilson
2015-03-16 15:56         ` Mika Kuoppala
2015-03-16 15:58           ` [PATCH] drm/i915: Push mm switch immediately to ring Mika Kuoppala
2015-03-16 21:35             ` Chris Wilson
2015-03-17 16:10               ` Mika Kuoppala
2015-03-16 13:46 ` [PATCH 2/3] drm/i915: Detect page faults during hangcheck Mika Kuoppala
2015-03-16 17:53   ` Daniel Vetter
2015-03-16 21:30     ` Chris Wilson
2015-03-17 10:31       ` Daniel Vetter [this message]
2015-03-16 13:46 ` [PATCH 3/3] drm/i915: Reorder hw init to avoid executing with invalid context/mm state 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=20150317103116.GW21993@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kuoppala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox