All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lutomirski <luto@mit.edu>
To: intel-gfx@lists.freedesktop.org
Subject: hotplug storms still here
Date: Tue, 8 Jun 2010 04:12:06 -0400	[thread overview]
Message-ID: <AANLkTikMioIlfJkdz6vGCyL102qcG_Z_Csm57MF1JMp8@mail.gmail.com> (raw)

On my trusty X200s (GM45), I still have such frequent i915 hotplug
storms that any standard kernel is essentially unusable.

Here's an example:


[  138.717645] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.718029] hotplug event received, iir 0x00020000, stat
0x28200000, mask 0x38000800
[  138.718157] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.719149] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.719389] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.719780] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.720682] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.721418] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.721804] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.722265] hotplug event received, iir 0x00020000, stat
0x28200000, mask 0x38000800
[  138.723540] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.723841] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.724501] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.725796] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.726601] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.727630] hotplug event received, iir 0x00020000, stat
0x28200000, mask 0x38000800
[  138.727965] hotplug event received, iir 0x00020000, stat
0x28200000, mask 0x38000800
[  138.728469] hotplug event received, iir 0x00020000, stat
0x28200000, mask 0x38000800
[  138.728627] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.729078] hotplug event received, iir 0x00020000, stat
0x28200000, mask 0x38000800
[  138.729251] hotplug event received, iir 0x00020000, stat
0x28200000, mask 0x38000800
[  138.729339] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.729795] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.730578] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800
[  138.730667] hotplug event received, iir 0x00020000, stat
0x20200000, mask 0x38000800

etc.  (I often see statuses different from 0x20200000.)

That's with this patch applied:


diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index df6a9cd..58e403a 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -903,8 +903,8 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
 		    (iir & I915_DISPLAY_PORT_INTERRUPT)) {
 			u32 hotplug_status = I915_READ(PORT_HOTPLUG_STAT);

-			DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x\n",
-				  hotplug_status);
+			printk(KERN_ERR "hotplug event received, iir 0x%08x, stat 0x%08x,
mask 0x%08x\n",
+				iir, hotplug_status, dev_priv->hotplug_supported_mask);
 			if (hotplug_status & dev_priv->hotplug_supported_mask)
 				queue_work(dev_priv->wq,
 					   &dev_priv->hotplug_work);
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 77e40cf..3ac3dd8 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1172,6 +1172,7 @@ intel_dp_detect(struct drm_connector *connector)
 	struct drm_device *dev = intel_encoder->base.dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct intel_dp_priv *dp_priv = intel_encoder->dev_priv;
+	uint32_t orig_hotplug_en;
 	uint32_t temp, bit;
 	enum drm_connector_status status;

@@ -1180,10 +1181,10 @@ intel_dp_detect(struct drm_connector *connector)
 	if (HAS_PCH_SPLIT(dev))
 		return ironlake_dp_detect(connector);

-	temp = I915_READ(PORT_HOTPLUG_EN);
+	orig_hotplug_en = I915_READ(PORT_HOTPLUG_EN);

 	I915_WRITE(PORT_HOTPLUG_EN,
-	       temp |
+	       orig_hotplug_en |
 	       DPB_HOTPLUG_INT_EN |
 	       DPC_HOTPLUG_INT_EN |
 	       DPD_HOTPLUG_INT_EN);
@@ -1201,13 +1202,16 @@ intel_dp_detect(struct drm_connector *connector)
 		bit = DPD_HOTPLUG_INT_STATUS;
 		break;
 	default:
-		return connector_status_unknown;
+		status = connector_status_unknown;
+		goto out;
 	}

 	temp = I915_READ(PORT_HOTPLUG_STAT);

-	if ((temp & bit) == 0)
-		return connector_status_disconnected;
+	if ((temp & bit) == 0) {
+		status = connector_status_disconnected;
+		goto out;
+	}

 	status = connector_status_disconnected;
 	if (intel_dp_aux_native_read(intel_encoder,
@@ -1217,6 +1221,9 @@ intel_dp_detect(struct drm_connector *connector)
 		if (dp_priv->dpcd[0] != 0)
 			status = connector_status_connected;
 	}
+
+out:
+	I915_WRITE(PORT_HOTPLUG_EN, orig_hotplug_en);
 	return status;
 }

(The latter part was an attempt to fix it that didn't work.  But it or
something like it should probably be applied at some point.)

Completely disabling DP, HDMI, and SDVO init fixes the problem, but
having to patch every kernel I run is getting old.  Any ideas?

The only possibilities I can think of are:

 - Hardware problem with my laptop?  But if I manually clear
PORT_HOTPLUG_EN with intel_reg_write, then I stop getting interrupts
(at least last time I tried) even if I reenable all the bits.
 - Maybe clearing the hotplug status before IIR in
i915_driver_irq_handler isn't right.
 - Maybe something that the system does in response to a hotplug
interrupt triggers another one.

I'll try selectively disabling outputs and seeing if I can narrow it down.

--Andy

             reply	other threads:[~2010-06-08  8:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08  8:12 Andrew Lutomirski [this message]
2010-06-08 10:43 ` hotplug storms still here Andrew Lutomirski
2010-06-08 13:24   ` Andrew Lutomirski
2010-06-08 14:09 ` Adam Jackson
2010-06-08 23:17   ` Andrew Lutomirski

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=AANLkTikMioIlfJkdz6vGCyL102qcG_Z_Csm57MF1JMp8@mail.gmail.com \
    --to=luto@mit.edu \
    --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 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.