From: Egbert Eich <eich@freedesktop.org>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Egbert Eich <eich@suse.de>,
Daniel Vetter <daniel.vetter@intel.com>,
intel-gfx@lists.freedesktop.org,
Chris Wilson <chris.wilson@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 0/8] Detect and deal with Interrupt 'Storms' from noisy Hotplug Lines.
Date: Thu, 17 Jan 2013 15:01:06 +0100 [thread overview]
Message-ID: <20130117140106.GC21387@debian> (raw)
In-Reply-To: <20130111203408.GL5737@phenom.ffwll.local>
Hi Daniel,
On Fri, Jan 11, 2013 at 09:34:08PM +0100, Daniel Vetter wrote:
>
> Nice work, and we know that we need this since quite a while. But
> unfortunately we've not yet come around to implement something. Some
> high-level comments on how I think this should best be handled:
>
> - imo dv_priv->hotplug_supported_mask should die - it leaks platform
> specific irq magic from i915_irq.c into every connector/encoder. And we
> have had the bugs and confusions to prove that it's not a good idea. I
> think it'd be better if we add a new HOTPLUG_PIN_FOO enum that encoders
> register interest in, and the platform code in i915_irq.c then maps
> from/to that. On a quick check we have hotplug pins for CRT, TV,
> SDVO_B&C and PORT_A-D (for DP&HDMI).
I thought along the same lines, I just didn't want to go quite as far.
Therefore I added functions in i915_irq.c to set these depending on the
connector.
>
> Also note that on PCH_SPLIT platforms port A is not in the same
> register, further platforms will make an even cuter mess of this ...
Ok, I will look into that.
>
> - I think the the hpd pin should be track in the encoder, not in the
> connector. The only encoders where there's not a 1:1 relationship (sdvo
> and ddi on hsw) want it there. Also, we already have the ->hot_plug
> callback in the encoder, which will be useful for later extensions.
>
> - Since some encoders share the same hpd pin (HDMI&DP on pre-hsw) I think
> we should keep the noise statistic data in the device's dev_priv
> somewhere in an array, with one set for each hpd pin from the enum above.
This would also be an option. I did notice that these pins are shared, it
didn't cause any issues as always both connectors got flagged simultaniously.
On the other hand calling the same disable/enable twice when traversing the
connector list is sorta ugly.
>
> - In 3.8 the drm hpd/polling helpers are much improved and don't randomly
> poll everything any more. So if a hpd connector isn't marked as
> OUTPUT_POLL, it wont ever get polled. Which means if you disable the hpd
> irq for it, we need to have our own poll work to do that for us. The
> long-term goal I have is to pimp the encoder->hot_plug callback also for
> this case, to avoid re-running the connector detect code on unrelated
> outputs (which can sometimes cause havoc).
I do change the state of the 'polled' member when I disable/reenable hotplug
interrupts already. This part therefore should work fine already.
>
> Eventually a want a hpd interrupt to only run the ->hot_plug callbacks
> on encoders which are interested in that signal, hence this slight
> overkill ... Ofc, that requires that we move a lot of the ->detect logic
This was exactly my question: we have all information at hand now to do this
and I can easily add this. The downside is that if the information about
the mapping is not accurate (ie if a vendor routes HPD lines differently)
this connector will never light up :(
As it is now since we poll everything when an interrupt happened we can
be sure that we catch all connectors even if the mapping in our tables
don't reflect what's wired on the board.
I didn't just go ahead and implement this yet as I've gotten too pessimistic.
> into ->hot_plug, but that's the only way to do sane EDID cache and
> similar things on outputs where hpd should work (DP/HDMI).
... But since you suggest this I will gladly add this :)
>
> - The math buff in me would like hpd stroms to gracefully degrade into
> polling at 10s or so. We could achieve that with irq source masking and
> scheduling the work item to do the hotplug handling with an (increasing)
> delay if there's too many interrupts from a given hpd pin. But that
> requires that we can mask hotplug interrupts properly, which seems to be
> impossible with the PORT_HOTPLUG regs on gmch/SoC platforms :( So I
> think your logic is nice enough ;-)
What you suggest would be possible with some small changes to my code I
guess. I just fear if we do have an IRQ storm 10s would be too short - on
a completely idle system this might be the prime source of wakeups.
I believe I can spare some hours to think about and work in your
suggestions.
Cheers,
Egbert.
next prev parent reply other threads:[~2013-01-17 14:01 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-10 15:02 [PATCH 0/8] Detect and deal with Interrupt 'Storms' from noisy Hotplug Lines Egbert Eich
2013-01-10 15:02 ` [PATCH 1/8] drm/i915: Remove pch_rq_mask from struct drm_i915_private Egbert Eich
2013-01-11 20:13 ` Daniel Vetter
2013-01-10 15:02 ` [PATCH 2/8] drm/i915: Set hotplug_supported_flag for all chipset generations Egbert Eich
2013-03-26 19:51 ` Jesse Barnes
2013-01-10 15:02 ` [PATCH 3/8] drm/i915: Add hpd status bit to struct intel_connector Egbert Eich
2013-03-26 19:53 ` Jesse Barnes
2013-01-10 15:02 ` [PATCH 4/8] drm/i915: Add Hotplug IRQ Storm detection Egbert Eich
2013-03-26 19:59 ` Jesse Barnes
2013-01-10 15:02 ` [PATCH 5/8] drm/i915: Move hotplug interrupt enable for i915/i965/valleyview into a separate function Egbert Eich
2013-03-26 20:04 ` Jesse Barnes
2013-01-10 15:02 ` [PATCH 6/8] drm/i915: Only enable hotplug irq when needed on Ironlake and later chips Egbert Eich
2013-01-10 15:02 ` [PATCH 7/8] drm/i915: When detecting a hotplug IRQ storm disable respective IRQs Egbert Eich
2013-01-10 15:02 ` [PATCH 8/8] drm/i915: Add Reenable Timer to turn Hotplug Detection back on Egbert Eich
2013-01-11 20:34 ` [PATCH 0/8] Detect and deal with Interrupt 'Storms' from noisy Hotplug Lines Daniel Vetter
2013-01-17 14:01 ` Egbert Eich [this message]
2013-01-17 14:45 ` Daniel Vetter
2013-01-22 13:22 ` Egbert Eich
2013-01-22 13:48 ` Daniel Vetter
2013-01-22 15:11 ` Egbert Eich
2013-02-25 17:06 ` [PATCH v.2 00/12] " Egbert Eich
2013-02-25 17:06 ` [PATCH v.2 01/12] DRM/i915: Remove valleyview_hpd_irq_setup Egbert Eich
2013-03-26 20:06 ` Jesse Barnes
2013-02-25 17:06 ` [PATCH v.2 02/12] DRM/I915: Add enum hpd_pin to intel_encoder Egbert Eich
2013-03-26 20:07 ` Jesse Barnes
2013-02-25 17:06 ` [PATCH v.2 03/12] DRM/i915: Convert HPD interrupts to make use of HPD pin assignment in encoders Egbert Eich
2013-02-28 0:12 ` Chris Wilson
2013-02-28 9:17 ` [PATCH v.2 03/12] DRM/i915: Convert HPD interrupts to make use of HPD pin assignment in encoders (v2) Egbert Eich
2013-03-26 20:08 ` [PATCH v.2 03/12] DRM/i915: Convert HPD interrupts to make use of HPD pin assignment in encoders Jesse Barnes
2013-02-25 17:06 ` [PATCH v.2 04/12] DRM/i915: Remove i965_hpd_irq_setup Egbert Eich
2013-02-25 17:06 ` [PATCH v.2 05/12] DRM/i915: Get rid if the 'hotplug_supported_mask' in struct drm_i915_private Egbert Eich
2013-03-26 21:06 ` Daniel Vetter
2013-03-27 15:08 ` Egbert Eich
2013-02-25 17:06 ` [PATCH v.2 06/12] DRM/i915: Add HPD IRQ storm detection Egbert Eich
2013-02-28 0:30 ` Chris Wilson
2013-02-28 9:19 ` [PATCH v.2 06/12] DRM/i915: Add HPD IRQ storm detection (v2) Egbert Eich
2013-03-03 18:07 ` Daniel Vetter
2013-03-05 7:38 ` [PATCH v.3 06/12] DRM/i915: Add HPD IRQ storm detection (v3) Egbert Eich
2013-03-05 7:48 ` [PATCH v.2 10/12] DRM/i915: Add Reenable Timer to turn Hotplug Detection back on (v2) Egbert Eich
2013-03-05 10:28 ` Ville Syrjälä
2013-03-05 12:26 ` [PATCH v.3 10/12] DRM/i915: Add Reenable Timer to turn Hotplug Detection back on (v3) Egbert Eich
2013-03-05 7:55 ` [PATCH v.2 11/12] DRM/i915: Add bit field to record which pins have received HPD events (v2) Egbert Eich
2013-03-05 13:00 ` [PATCH v.3 11/12] DRM/i915: Add bit field to record which pins have received HPD events (v3) Egbert Eich
2013-03-05 14:52 ` Egbert Eich
2013-02-25 17:06 ` [PATCH v.2 07/12] DRM/i915: (re)init HPD interrupt storm statistics Egbert Eich
2013-02-25 17:06 ` [PATCH v.2 08/12] DRM/i915: Treat hpd_irq_setup() for ironake and older generations the same way Egbert Eich
2013-02-25 17:06 ` [PATCH v.2 09/12] DRM/i915: Disable HPD interrupt on pin when irq storm is detected Egbert Eich
2013-03-05 12:34 ` [PATCH v.2 09/12] DRM/i915: Disable HPD interrupt on pin when irq storm is detected (v2) Egbert Eich
2013-02-25 17:06 ` [PATCH v.2 10/12] DRM/i915: Add Reenable Timer to turn Hotplug Detection back on Egbert Eich
2013-03-27 15:12 ` Daniel Vetter
2013-02-25 17:06 ` [PATCH v.2 11/12] DRM/i915: Add bit field to record which pins have received HPD events Egbert Eich
2013-02-25 17:06 ` [PATCH v.2 12/12] DRM/i915: Only reprobe display on encoder which has received an HPD event Egbert Eich
2013-03-05 14:18 ` [PATCH v.3 " Egbert Eich
2013-02-28 0:46 ` [PATCH v.2 00/12] Detect and deal with Interrupt 'Storms' from noisy Hotplug Lines Chris Wilson
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=20130117140106.GC21387@debian \
--to=eich@freedesktop.org \
--cc=chris.wilson@intel.com \
--cc=daniel.vetter@intel.com \
--cc=daniel@ffwll.ch \
--cc=eich@suse.de \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@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 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.