From: Egbert Eich <eich@suse.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Egbert Eich <eich@suse.de>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt, v2
Date: Wed, 23 Sep 2015 17:43:55 +0200 [thread overview]
Message-ID: <22018.51387.40148.91302@linux-qknr.fritz.box> (raw)
In-Reply-To: daniel@ffwll.ch wrote on Wednesday, 23 September 2015 at 16:57:17 +0200
Daniel Vetter writes:
> On Wed, Sep 23, 2015 at 04:15:27PM +0200, Egbert Eich wrote:
> > An HPD interrupt may fire while we are in a function that changes
> > the PORT_HOTPLUG_EN register - especially when an HPD interrupt
> > storm occurs.
> > Since the interrupt handler changes the enabled HPD lines when it
> > detects such a storm the read-modify-write cycles may interfere.
> > To avoid this, shiled the rmw cycles with IRQ save spinlocks.
> >
> > Changes since v1:
> > - Implement a function which takes care of accessing PORT_HOTPLUG_EN.
> >
> > Signed-off-by: Egbert Eich <eich@suse.de>
>
> Looks pretty. Queued for -next, thanks for the patch (assuming that we
> don't need this for -fixes since there's no bug report linked). Please
> correct me so I can drop this and let Jani pick it up instead.
I didn't bother to file a bug report. I know only one machine that's
affected.
However the problem this fixes seems to be what caused spurious warnings
which we tried to get rid of with
WARN_ONCE( >>>> INTEL_INFO(dev)->gen >= 5 && !IS_VALLEYVIEW(dev) <<<< ,
"Received HPD interrupt on pin %d although disabled\n", i);
as I did not see these warnings on my gen3 when I removed these tests.
BTW: Using
i915_hotplug_interrupt_update(dev_priv, 0xffffffff, 0)
in the *_irq_pre/post/uninstall() functions does not help us much
in terms of avoiding races.
It can still happen that an interrupts or reenable worker gets fired
and resets these values after the spinlock is released in
i915_hotplug_interrupt_update().
IHMO one must
a. cancel the delayed worker,
b. disable all interrupt pins and
c. call hpd_irq_setup()
before calling intel_runtime_pm_disable_interrupts() to avoid this race.
Cheers,
Egbert.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-09-23 15:44 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 20:21 [PATCH 0/4] Fix numerous issues with HPDstorm handling Egbert Eich
2015-09-01 20:21 ` [PATCH 1/4] drm: Add a non-locking version of drm_kms_helper_poll_enable() Egbert Eich
2015-09-01 21:27 ` Lukas Wunner
2015-09-01 22:10 ` Egbert Eich
2015-09-01 22:31 ` Lukas Wunner
2015-09-02 4:57 ` Egbert Eich
2015-09-01 22:50 ` Egbert Eich
2015-09-02 11:57 ` Daniel Vetter
2015-09-01 20:21 ` [PATCH 2/4] drm/i915: Call " Egbert Eich
2015-09-02 11:58 ` Daniel Vetter
2015-09-23 14:13 ` [PATCH 1/2] drm: Add a non-locking version of drm_kms_helper_poll_enable(), v2 Egbert Eich
2015-09-23 14:13 ` [PATCH 2/2] drm/i915: Call " Egbert Eich
2015-09-23 14:50 ` [PATCH 1/2] drm: Add a " Daniel Vetter
2015-09-24 12:46 ` Jani Nikula
2015-09-25 6:00 ` Egbert Eich
2015-09-25 7:52 ` Jani Nikula
2015-09-29 14:35 ` Jani Nikula
2015-09-30 8:38 ` Jani Nikula
2015-09-01 20:21 ` [PATCH 3/4] drm/i915: Use the correct hpd_status list for non-G4xx/VLV Egbert Eich
2015-09-02 12:00 ` Daniel Vetter
2015-09-02 12:25 ` Imre Deak
2015-09-02 13:42 ` Jani Nikula
2015-09-01 20:21 ` [PATCH 4/4] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt Egbert Eich
2015-09-02 12:06 ` Daniel Vetter
2015-09-02 14:19 ` Egbert Eich
2015-09-02 14:32 ` Jani Nikula
2015-09-02 14:58 ` Egbert Eich
2015-09-02 14:46 ` Daniel Vetter
2015-09-02 15:17 ` Egbert Eich
2015-09-23 14:15 ` [PATCH] drm/i915: Avoid race of intel_crt_detect_hotplug() with HPD interrupt, v2 Egbert Eich
2015-09-23 14:57 ` Daniel Vetter
2015-09-23 15:43 ` Egbert Eich [this message]
2015-09-25 6:09 ` [PATCH] drm/i915: On reset/suspend disable hpd pins & cancel pending delayed work Egbert Eich
2015-09-25 12:29 ` Ville Syrjälä
2015-09-28 7:36 ` Daniel Vetter
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=22018.51387.40148.91302@linux-qknr.fritz.box \
--to=eich@suse.com \
--cc=daniel.vetter@ffwll.ch \
--cc=daniel@ffwll.ch \
--cc=eich@suse.de \
--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