[Intel-gfx] [PATCH] i830_driver.c:detect and initialize SDVOB and SDVOC at the same time.

Ma Ling ling.ma at intel.com
Mon Feb 16 02:30:25 CET 2009


Hi all,
I re-update the patch based on Eric's comment.
SDVO chipset has one i2c pin pare from GMCH, usually pin 4. So we should initialize SDVOC
at the same time when SDVOB detection is successful. However there are 2 pin pairs for GMCH:
HDMI/DPB is on pin 4 and HDMI/DPC is on pin3, so we should detect them respectively.

---
 src/i830_driver.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/i830_driver.c b/src/i830_driver.c
index 4c40d40..66ef55e 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -912,21 +912,22 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
       i830_lvds_init(pScrn);
 
    if (IS_I9XX(pI830)) {
-      if ((INREG(SDVOB) & SDVO_DETECTED) || pI830->force_sdvo_detect) {
-	 Bool found = i830_sdvo_init(pScrn, SDVOB);
+      Bool foundb = FALSE;
+      Bool foundc = FALSE;
 
-	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
-	    i830_hdmi_init(pScrn, SDVOB);
+      if ((INREG(SDVOB) & SDVO_DETECTED) || pI830->force_sdvo_detect) {
+	 foundb = i830_sdvo_init(pScrn, SDVOB);
+	 foundc = i830_sdvo_init(pScrn, SDVOC);
       }
 
-      if ((INREG(SDVOC) & SDVO_DETECTED) || pI830->force_sdvo_detect ||
-	      /* SDVOC detect bit is reserved on 965G/965GM */
-	      (IS_I965G(pI830) && !IS_G4X(pI830))) {
-	 Bool found = i830_sdvo_init(pScrn, SDVOC);
+      if (!foundb && (INREG(SDVOB) & SDVO_DETECTED) &&
+	 SUPPORTS_INTEGRATED_HDMI(pI830))
+	 i830_hdmi_init(pScrn, SDVOB);
+
+      if (!foundc && (INREG(SDVOC) & SDVO_DETECTED) &&
+	 SUPPORTS_INTEGRATED_HDMI(pI830))
+	 i830_hdmi_init(pScrn, SDVOC);
 
-	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
-	    i830_hdmi_init(pScrn, SDVOC);
-      }
    } else {
       i830_dvo_init(pScrn);
    }
-- 
1.5.4.4






More information about the Intel-gfx mailing list