summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorling.ma@intel.com <ling.ma@intel.com>2009-06-16 16:47:52 +0800
committerZhenyu Wang <zhenyu.z.wang@intel.com>2009-06-17 10:05:47 +0800
commita6cdcd9fee0164f79075063fd163d142a55fcbc5 (patch)
treec00e2efc08246b11f573bf892aad31b06757883e /src
parent6b93afc564a5e74b0eaaa46c95f557449951b3b9 (diff)
Set hot plug interrupt to detect HDMI output
We detect HDMI output connection status by writing to HOT Plug Interrupt Detect Enable bit in PORT_HOTPLUG_EN. The behavior will generate an specified interrupt, which is caught by audio driver, but during one detection driver set all Detect Enable bits of HDMIB, HDMIC and HDMID, which 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 fredesktop bug #21371 Signed-off-by: Ma Ling <ling.ma@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/i830_hdmi.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/i830_hdmi.c b/src/i830_hdmi.c
index 0abb1512..63fc6dc9 100644
--- a/src/i830_hdmi.c
+++ b/src/i830_hdmi.c
@@ -166,14 +166,22 @@ i830_hdmi_detect(xf86OutputPtr output)
temp = INREG(PORT_HOTPLUG_EN);
- OUTREG(PORT_HOTPLUG_EN,
- temp |
- HDMIB_HOTPLUG_INT_EN |
- HDMIC_HOTPLUG_INT_EN |
- HDMID_HOTPLUG_INT_EN);
+ switch (dev_priv->output_reg) {
+ case SDVOB:
+ temp |= HDMIB_HOTPLUG_INT_EN;
+ break;
+ case SDVOC:
+ temp |= HDMIC_HOTPLUG_INT_EN;
+ break;
+ default:
+ return XF86OutputStatusUnknown;
+ }
+
+ OUTREG(PORT_HOTPLUG_EN, temp);
POSTING_READ(PORT_HOTPLUG_EN);
+ i830WaitForVblank(pScrn);
switch (dev_priv->output_reg) {
case SDVOB:
bit = HDMIB_HOTPLUG_INT_STATUS;