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

Zhenyu Wang zhenyu.z.wang at intel.com
Thu Feb 5 06:22:37 CET 2009


On 2009.02.04 01:01:49 +0800, Eric Anholt wrote:
> On Tue, 2009-02-03 at 16:10 +0800, Ma Ling wrote:
> > hi All,
> > 
> > SDVO chipset has one i2c pin pare from GMCH, usually port4.
> > So for sdvo detection we only need to check digital port B (bit 2) of SDVOB.
> > In another word we should initialize SDVOC port at the same time when SDVOB detection is successful.
> > The patch is based on our latest code, and intends to match the above logic.
> > Any comments are welcome !
> 
> First, please fix your whitespace -- you reindented a block of 3-space
> code to 4-space.
> 
> As of GM45, there are 2 pin pairs once again -- HDMI/DPC is on pin 3,
> thus the new bit for detection, and this change would regress that.
> 

right, so about this one?

diff --git a/src/i830_driver.c b/src/i830_driver.c
index b8d8d37..5fa3b2c 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -914,17 +914,18 @@ I830SetupOutputs(ScrnInfoPtr pScrn)
       i830_lvds_init(pScrn);
 
    if (IS_I9XX(pI830)) {
+      Bool found = FALSE;
       if ((INREG(SDVOB) & SDVO_DETECTED) || pI830->force_sdvo_detect) {
-	 Bool found = i830_sdvo_init(pScrn, SDVOB);
+	 found = i830_sdvo_init(pScrn, SDVOB);
 
 	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
 	    i830_hdmi_init(pScrn, SDVOB);
       }
 
-      if ((INREG(SDVOC) & SDVO_DETECTED) || pI830->force_sdvo_detect ||
+      if (found || (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);
+	 found = i830_sdvo_init(pScrn, SDVOC);
 
 	 if (!found && SUPPORTS_INTEGRATED_HDMI(pI830))
 	    i830_hdmi_init(pScrn, SDVOC);

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090205/c26361c7/attachment.sig>


More information about the Intel-gfx mailing list