From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
Oliver Hartkopp <socketcan@hartkopp.net>
Subject: Re: [PATCH] drm/i915: Fix irq enable tracking in driver load
Date: Fri, 5 Sep 2014 09:06:55 -0700 [thread overview]
Message-ID: <20140905090655.03b7534e@jbarnes-desktop> (raw)
In-Reply-To: <20140827184357.GQ13629@nuc-i3427.alporthouse.com>
On Wed, 27 Aug 2014 19:43:57 +0100
Chris Wilson <chris@chris-wilson.co.uk> wrote:
> On Wed, Aug 27, 2014 at 10:11:34AM +0200, Daniel Vetter wrote:
> > A bunch of warnings fire on some ->irq_postinstall hooks since those
> > can enable interrupts (e.g. rps interrupts). And then our ordering
> > self-checks fire and complain.
> >
> > To fix that set the tracking boolen before enabling the irqs with
> > drm_irq_install. Quoting the discussion with Jesse why that's safe:
> >
> > On Tue, Aug 26, 2014 at 11:18 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > > Yes, it might work, but if you look through the history, we set this
> > > field carefully; first to true in the irq_init code, then to false only
> > > after the irq_install completes. So I think your fragility arguments
> > > apply to this change too.
> >
> > Well we've done it in 4 commits or so, but currently we have:
> >
> > - Set irqs_disabled to true early in driver load to make sure checks
> > that. That's done in irq_init, which is totally not the function that
> > enables interrupts, only the function that initializes all the vtables
> > and similar things. We actually have a fairly sane naming scheme
> > nowadays (not fully consistent ofc): _init is sw setup,
> > _enable/_hw_init is the actual hw setup. That is done in
> > 95f25beddba2ec9510b249740bacc11eca70cf75
> >
> > - Set irqs_disabled to false right after the irqs are actually
> > enabled. This is done in ed2e6df18935beb3d63613c50103bf9757b2aa85
> >
> > So my change should only move the flag change over the ->preinstall
> > and ->postinstall hooks. I've done a little audit and didn't spot
> > anything amiss. Furthermore the runtime pm setup already clears
> > irqs_disabled _before_ calling these two hooks.
> >
> > This regression has been introduced in
> >
> > commit ed2e6df18935beb3d63613c50103bf9757b2aa85
> > Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Date: Fri Jun 20 09:39:36 2014 -0700
> >
> > drm/i915: clear pm._irqs_disabled field after installing IRQs
> >
> > Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Cc: Oliver Hartkopp <socketcan@hartkopp.net>
> > Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> # gm45, ilk
>
> gm45 because it has been one of my troublesome machines in the past wrt
> to modeset init. ilk because it exhibits this bug.
> -Chris
>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
--
Jesse Barnes, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-09-05 16:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-27 8:11 [PATCH] drm/i915: Fix irq enable tracking in driver load Daniel Vetter
2014-08-27 9:01 ` Chris Wilson
2014-08-27 18:43 ` Chris Wilson
2014-09-05 16:06 ` Jesse Barnes [this message]
2014-09-04 11:12 ` Jani Nikula
2014-09-04 11:13 ` Jani Nikula
2014-09-04 13:05 ` Daniel Vetter
2014-09-04 13:42 ` Jani Nikula
2014-09-04 13:59 ` Daniel Vetter
2014-09-08 7:03 ` Jani Nikula
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=20140905090655.03b7534e@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=socketcan@hartkopp.net \
/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