]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
drm/i915: Set HDMI hot plug interrupt enable for only the output in question.
authorMa Ling <ling.ma@intel.com>
Mon, 11 May 2009 03:33:22 +0000 (11:33 +0800)
committerEric Anholt <eric@anholt.net>
Thu, 14 May 2009 23:00:31 +0000 (16:00 -0700)
We detect HDMI output connection status by writing to HOT Plug Interrupt
Detect Enable bit in PORT_HOTPLUG_EN.  The behavior will generate a specified
interrupt, which is caught by audio driver, but during one detection driver
set all Detect Enable bits of HDMIB, HDMIC HDMID, and generate wrong
interrupt signals for current output, according to the signals audio driver
misunderstand device status. The patch intends to handle corresponding
output precisely.

It fixed freedesktop.org bug #21371

Signed-off-by: Ma Ling <ling.ma@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/intel_hdmi.c

index 550374225388b11834963e104c432ba01e63cc6f..d0983bb93a18e4cbc6a5af57198adfa2c8f5254d 100644 (file)
@@ -155,11 +155,18 @@ intel_hdmi_detect(struct drm_connector *connector)
 
        temp = I915_READ(PORT_HOTPLUG_EN);
 
-       I915_WRITE(PORT_HOTPLUG_EN,
-                  temp |
-                  HDMIB_HOTPLUG_INT_EN |
-                  HDMIC_HOTPLUG_INT_EN |
-                  HDMID_HOTPLUG_INT_EN);
+       switch (hdmi_priv->sdvox_reg) {
+       case SDVOB:
+               temp |= HDMIB_HOTPLUG_INT_EN;
+               break;
+       case SDVOC:
+               temp |= HDMIC_HOTPLUG_INT_EN;
+               break;
+       default:
+               return connector_status_unknown;
+       }
+
+       I915_WRITE(PORT_HOTPLUG_EN, temp);
 
        POSTING_READ(PORT_HOTPLUG_EN);