Commit 3ff04a160a891e56cdcee5c198d4c764d1c8c78b
Committed by
Jani Nikula
1 parent
0f9dc59db6
Exists in
master
and in
13 other branches
drm/i915: Don't WARN nor handle unexpected hpd interrupts on gmch platforms
The status bits are unconditionally set, the control bits only enable the actual interrupt generation. Which means if we get some random other interrupts we'll bogusly complain about them. So restrict the WARN to platforms with a sane hotplug interrupt handling scheme. And even more important also don't attempt to process the hpd bit since we've detected a storm already. Instead just clear the bit silently. This WARN has been introduced in commit b8f102e8bf71cacf33326360fdf9dcfd1a63925b Author: Egbert Eich <eich@suse.de> Date: Fri Jul 26 14:14:24 2013 +0200 drm/i915: Add messages useful for HPD storm detection debugging (v2) before that we silently handled the hpd event and so partially defeated the storm detection. v2: Pimp commit message (Jani) Cc: Jani Nikula <jani.nikula@linux.intel.com> Cc: Egbert Eich <eich@suse.de> Cc: bitlord <bitlord0xff@gmail.com> Reported-by: bitlord <bitlord0xff@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Showing 1 changed file with 14 additions and 4 deletions Side-by-side Diff
drivers/gpu/drm/i915/i915_irq.c
... | ... | @@ -1362,10 +1362,20 @@ |
1362 | 1362 | spin_lock(&dev_priv->irq_lock); |
1363 | 1363 | for (i = 1; i < HPD_NUM_PINS; i++) { |
1364 | 1364 | |
1365 | - WARN_ONCE(hpd[i] & hotplug_trigger && | |
1366 | - dev_priv->hpd_stats[i].hpd_mark == HPD_DISABLED, | |
1367 | - "Received HPD interrupt (0x%08x) on pin %d (0x%08x) although disabled\n", | |
1368 | - hotplug_trigger, i, hpd[i]); | |
1365 | + if (hpd[i] & hotplug_trigger && | |
1366 | + dev_priv->hpd_stats[i].hpd_mark == HPD_DISABLED) { | |
1367 | + /* | |
1368 | + * On GMCH platforms the interrupt mask bits only | |
1369 | + * prevent irq generation, not the setting of the | |
1370 | + * hotplug bits itself. So only WARN about unexpected | |
1371 | + * interrupts on saner platforms. | |
1372 | + */ | |
1373 | + WARN_ONCE(INTEL_INFO(dev)->gen >= 5 && !IS_VALLEYVIEW(dev), | |
1374 | + "Received HPD interrupt (0x%08x) on pin %d (0x%08x) although disabled\n", | |
1375 | + hotplug_trigger, i, hpd[i]); | |
1376 | + | |
1377 | + continue; | |
1378 | + } | |
1369 | 1379 | |
1370 | 1380 | if (!(hpd[i] & hotplug_trigger) || |
1371 | 1381 | dev_priv->hpd_stats[i].hpd_mark != HPD_ENABLED) |