Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Remove spurious DRM_ERROR for cancelled interrupts
Date: Fri, 2 Feb 2018 19:44:58 +0200	[thread overview]
Message-ID: <20180202174458.GF5453@intel.com> (raw)
In-Reply-To: <151759271752.15322.7980213089007340796@mail.alporthouse.com>

On Fri, Feb 02, 2018 at 05:31:57PM +0000, Chris Wilson wrote:
> Quoting Ville Syrjälä (2018-02-02 16:03:36)
> > On Fri, Feb 02, 2018 at 03:34:48PM +0000, Chris Wilson wrote:
> > > As we ourselves cancel interrupts during reset by clearing the GTIIR, it
> > > is possible for the master IIR to indicate a pending IRQ for which we
> > > have already cleared from the GTIIR. In this case, the DRM_ERROR are
> > > intended and should not be flagged as an error.
> > 
> > I guess an alternative would be to not clear IIR and use
> > sychronize_irq() instead as needed. But I suppose that doesn't
> > really provide any real benefits.
> > 
> > One concern is that we will now claim that all interrupts are handled,
> > and thus couldn't detect spurious interrupts. But one might hope that
> > MSI and whanot has made those a thing of the past.
> 
> We only say handled if the master IIR holds an interrupt, so not
> entirely lost. At present, we say IRQ_NONE even though the master IIR
> did raise the interrupt which seems wrong.
> 
> > I never checked what the kernel's threshold was for disabling the
> > interrupt line on spurious interrupts. I have occasionally thought about
> > it though as I too have realized that the IIR clearing could result in
> > the interrupt handler having nothing to do.
> > 
> > So yeah, not quite sure which is best, always claiming IRQ_HANDLED or
> > only when we had some IIR bits to clear. Maybe just return IRQ_HANDLED
> > always for all MSI capable platforms?
> 
> I think we're okay with just using the master IIR for IRQ_NONE /
> IRQ_HANDLED as that is the interrupt generator aiui. If the child
> sources disagree that's another issue, but as far as the kernel is
> concerned i915 did generate and handle an interrupt.

I think that might be the usual way it goes. I guess the IIR clearing is
racing with the MASTER_IRQ read as AFAIK the MASTER_IRQ status bits aren't
latched or anything (since we don't have to clear them). So I believe this
still leaves open a small window where even the MASTER_IRQ has cleared
itself by the time the irq handler gets around to reading it. So that
would look like a genuine spurious interrupt even though the GPU did
raise it for a reason.

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-02-02 17:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02 15:34 [PATCH] drm/i915: Remove spurious DRM_ERROR for cancelled interrupts Chris Wilson
2018-02-02 16:03 ` Ville Syrjälä
2018-02-02 17:31   ` Chris Wilson
2018-02-02 17:44     ` Ville Syrjälä [this message]
2018-02-02 20:34       ` Chris Wilson
2018-02-02 16:52 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-02-02 20:28 ` ✗ Fi.CI.IGT: warning " Patchwork

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=20180202174458.GF5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox