xf86-video-intel: 2 commits - src/i810_reg.h src/i830_hdmi.c src/i830_tv.c

Zhenyu Wang zhen at kemper.freedesktop.org
Tue Jun 16 19:07:37 PDT 2009


 src/i810_reg.h  |    6 +++---
 src/i830_hdmi.c |   18 +++++++++++++-----
 src/i830_tv.c   |    3 +++
 3 files changed, 19 insertions(+), 8 deletions(-)

New commits:
commit b5cd2130f97591f4a387db1b98c940c30bc6404c
Author: ling.ma at intel.com <ling.ma at intel.com>
Date:   Tue Jun 16 16:52:25 2009 +0800

    TV: Set correct voltage level override values
    
    We detect TV connect status by setting DAC voltage level override
    values as 0.7 voltage for DAC_A/B/C. The corresponding 2-bits shold be 0x2,
    In order correctly to set last bit as 0, at first we must clean it.
    
    It fixed freedesktop.org bug #21204
    
    Signed-off-by: Ma Ling <ling.ma at intel.com>

diff --git a/src/i810_reg.h b/src/i810_reg.h
index ae1933d..64f2222 100644
--- a/src/i810_reg.h
+++ b/src/i810_reg.h
@@ -1676,15 +1676,15 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 # define DAC_A_1_3_V			(0 << 4)
 # define DAC_A_1_1_V			(1 << 4)
 # define DAC_A_0_7_V			(2 << 4)
-# define DAC_A_OFF			(3 << 4)
+# define DAC_A_MASK			(3 << 4)
 # define DAC_B_1_3_V			(0 << 2)
 # define DAC_B_1_1_V			(1 << 2)
 # define DAC_B_0_7_V			(2 << 2)
-# define DAC_B_OFF			(3 << 2)
+# define DAC_B_MASK			(3 << 2)
 # define DAC_C_1_3_V			(0 << 0)
 # define DAC_C_1_1_V			(1 << 0)
 # define DAC_C_0_7_V			(2 << 0)
-# define DAC_C_OFF			(3 << 0)
+# define DAC_C_MASK			(3 << 0)
 /** @} */
 
 /**
diff --git a/src/i830_tv.c b/src/i830_tv.c
index 8eb3e26..7082aba 100644
--- a/src/i830_tv.c
+++ b/src/i830_tv.c
@@ -1386,6 +1386,9 @@ i830_tv_detect_type (xf86CrtcPtr    crtc,
 	tv_ctl &= ~TV_TEST_MODE_MASK;
 	tv_ctl |= TV_TEST_MODE_MONITOR_DETECT;
 	tv_dac &= ~TVDAC_SENSE_MASK;
+        tv_dac &= ~DAC_A_MASK;
+        tv_dac &= ~DAC_B_MASK;
+        tv_dac &= ~DAC_C_MASK;
 	tv_dac |= (TVDAC_STATE_CHG_EN |
 		TVDAC_A_SENSE_CTL |
 		TVDAC_B_SENSE_CTL |
commit a6cdcd9fee0164f79075063fd163d142a55fcbc5
Author: ling.ma at intel.com <ling.ma at intel.com>
Date:   Tue Jun 16 16:47:52 2009 +0800

    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 at intel.com>

diff --git a/src/i830_hdmi.c b/src/i830_hdmi.c
index 0abb151..63fc6dc 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;


More information about the xorg-commit mailing list