xf86-video-ati: Branch 'master' - 4 commits

Alex Deucher agd5f at kemper.freedesktop.org
Thu Oct 25 18:26:52 PDT 2007


 man/radeon.man      |   15 +++++++++++++++
 src/radeon.h        |    3 ++-
 src/radeon_driver.c |    1 +
 src/radeon_modes.c  |   26 ++++----------------------
 src/radeon_output.c |   19 ++++++++++++-------
 5 files changed, 34 insertions(+), 30 deletions(-)

New commits:
commit 49cf7cb3db36ce7734f7e314a040a240191d6477
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date:   Thu Oct 25 21:23:09 2007 -0400

    RADEON: Fix IgnoreEDID option

diff --git a/src/radeon_output.c b/src/radeon_output.c
index 4f39493..9cfc2c4 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -344,7 +344,8 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output)
 	   ~(RADEON_GPIO_EN_0 | RADEON_GPIO_EN_1));
 
     if (MonInfo) {
-	xf86OutputSetEDID (output, MonInfo);
+	if (!xf86ReturnOptValBool(info->Options, OPTION_IGNORE_EDID, FALSE))
+	    xf86OutputSetEDID(output, MonInfo);
 	if ((info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_LVDS_ATOM) ||
 	    (!info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_PROPRIETARY)) {
 	    MonType = MT_LCD;
commit 70bbc0cfe699588f8ae4123efca0e1baffc91000
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date:   Thu Oct 25 20:56:11 2007 -0400

    RADEON: clean up mode handling and improve reliability of DDC
    
    - Reduce the number of times we do DDC and don't
    skip the magical GPIO dance when doing DDC.
    - If no DDC modes are found, add the screen modes

diff --git a/src/radeon_modes.c b/src/radeon_modes.c
index 45e5169..3c4badd 100644
--- a/src/radeon_modes.c
+++ b/src/radeon_modes.c
@@ -95,7 +95,6 @@ static DisplayModePtr RADEONTVModes(xf86OutputPtr output)
 static DisplayModePtr RADEONFPNativeMode(xf86OutputPtr output)
 {
     ScrnInfoPtr pScrn = output->scrn;
-    RADEONInfoPtr info = RADEONPTR(pScrn);
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
     DisplayModePtr  new   = NULL;
     char            stmp[32];
@@ -210,39 +209,22 @@ DisplayModePtr
 RADEONProbeOutputModes(xf86OutputPtr output)
 {
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
-    xf86MonPtr		    edid_mon;
     DisplayModePtr	    modes = NULL;
 
     ErrorF("in RADEONProbeOutputModes\n");
 
     if (output->status == XF86OutputStatusConnected) {
-	if (radeon_output->type == OUTPUT_DVI || radeon_output->type == OUTPUT_VGA) {
-	    if (output->MonInfo) {
-		edid_mon = xf86OutputGetEDID (output, radeon_output->pI2CBus);
-		xf86OutputSetEDID (output, edid_mon);
-
-		modes = xf86OutputGetEDIDModes (output);
-		return modes;
-	    }
-	}
 	if (radeon_output->type == OUTPUT_STV || radeon_output->type == OUTPUT_CTV) {
 	    modes = RADEONTVModes(output);
-	    return modes;
-	}
-	if (radeon_output->type == OUTPUT_LVDS) {
-	    /* okay we got DDC info */
-	    if (output->MonInfo) {
-		edid_mon = xf86OutputGetEDID (output, radeon_output->pI2CBus);
-		xf86OutputSetEDID (output, edid_mon);
-
+	} else {
+	    if (output->MonInfo)
 		modes = xf86OutputGetEDIDModes (output);
-	    }
 	    if (modes == NULL) {
-		modes = RADEONFPNativeMode(output);
+		if (radeon_output->type == OUTPUT_LVDS)
+		    modes = RADEONFPNativeMode(output);
 		/* add the screen modes */
 		RADEONAddScreenModes(output, &modes);
 	    }
-	    return modes;
 	}
     }
 
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 39cbdb9..4f39493 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -270,7 +270,7 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output)
     unsigned char *RADEONMMIO = info->MMIO;
     unsigned long DDCReg;
     RADEONMonitorType MonType = MT_NONE;
-    xf86MonPtr* MonInfo = &output->MonInfo;
+    xf86MonPtr MonInfo = NULL;
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
     RADEONDDCType DDCType = radeon_output->DDCType;
     int i, j;
@@ -310,7 +310,8 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output)
 	    OUTREG(DDCReg,
 		   INREG(DDCReg) & ~(RADEON_GPIO_EN_0));
 	    usleep(15000);
-	    *MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, radeon_output->pI2CBus);
+
+	    MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, radeon_output->pI2CBus);
 
 	    OUTREG(DDCReg, INREG(DDCReg) | RADEON_GPIO_EN_1);
 	    OUTREG(DDCReg, INREG(DDCReg) | RADEON_GPIO_EN_0);
@@ -330,10 +331,10 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output)
 	    OUTREG(DDCReg, INREG(DDCReg) | RADEON_GPIO_EN_1);
 	    OUTREG(DDCReg, INREG(DDCReg) | RADEON_GPIO_EN_0);
 	    usleep(15000);
-	    if(*MonInfo)  break;
+	    if (MonInfo)  break;
 	}
     } else if (radeon_output->pI2CBus && info->ddc2 && ((DDCReg == RADEON_LCD_GPIO_MASK) || (DDCReg == RADEON_MDGPIO_EN_REG))) {
-         *MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, radeon_output->pI2CBus);
+         MonInfo = xf86DoEDID_DDC2(pScrn->scrnIndex, radeon_output->pI2CBus);
     } else {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "DDC2/I2C is not properly initialized\n");
 	MonType = MT_NONE;
@@ -342,7 +343,8 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output)
     OUTREG(DDCReg, INREG(DDCReg) &
 	   ~(RADEON_GPIO_EN_0 | RADEON_GPIO_EN_1));
 
-    if (*MonInfo) {
+    if (MonInfo) {
+	xf86OutputSetEDID (output, MonInfo);
 	if ((info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_LVDS_ATOM) ||
 	    (!info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_PROPRIETARY)) {
 	    MonType = MT_LCD;
@@ -350,7 +352,7 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output)
 		 (!info->IsAtomBios && radeon_output->ConnectorType == CONNECTOR_DVI_D)) {
 	    MonType = MT_DFP;
 	} else if (radeon_output->type == OUTPUT_DVI &&
-		   ((*MonInfo)->rawData[0x14] & 0x80)) { /* if it's digital and DVI */
+		   (MonInfo->rawData[0x14] & 0x80)) { /* if it's digital and DVI */
 	    MonType = MT_DFP;
 	} else {
 	    MonType = MT_CRT;
commit 1a4f590c2ac071f0c348f38e9f26fa6093722453
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date:   Thu Oct 25 19:25:36 2007 -0400

    RADEON: document DefaultTMDSPLL option

diff --git a/man/radeon.man b/man/radeon.man
index 48d7cb2..5d31eb1 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -390,6 +390,14 @@ TV DAC so it is disabled by default.
 The default is
 .B off.
 .TP
+.BI "Option \*DefaultTMDSPLL\*q \*q" boolean \*q
+Use the default driver provided TMDS PLL values rather than the ones
+provided by the bios. This option has no effect on Mac cards.  Enable 
+this option if you are having problems with a DVI monitor using the 
+internal TMDS controller.
+The default is
+.B off.
+.TP
 .BI "Option \*qDRI\*q \*q" boolean \*q
 Enable DRI support.  This option allows you to enable to disable the DRI.  
 The default is
commit 2d26e0d0bcf25e210dc7771e76638dcfafcc2356
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date:   Thu Oct 25 19:18:18 2007 -0400

    RADEON: Add driver option to force TV DAC load detection on

diff --git a/man/radeon.man b/man/radeon.man
index 35dd701..48d7cb2 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -383,6 +383,13 @@ case.  This is only useful for LVDS panels (laptop internal panels).
 The default is
 .B on.
 .TP
+.BI "Option \*TVDACLoadDetect\*q \*q" boolean \*q
+Enable load detection on the TV DAC.  The TV DAC is used to drive both 
+TV-OUT and analog monitors. Load detection is often unreliable in the 
+TV DAC so it is disabled by default.
+The default is
+.B off.
+.TP
 .BI "Option \*qDRI\*q \*q" boolean \*q
 Enable DRI support.  This option allows you to enable to disable the DRI.  
 The default is
diff --git a/src/radeon.h b/src/radeon.h
index 7f9ff76..532f04c 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -157,7 +157,8 @@ typedef enum {
 #if defined(__powerpc__)
     OPTION_MAC_MODEL,
 #endif
-    OPTION_DEFAULT_TMDS_PLL
+    OPTION_DEFAULT_TMDS_PLL,
+    OPTION_TVDAC_LOAD_DETECT
 } RADEONOpts;
 
 
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 8ebdd96..a243c9f 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -190,6 +190,7 @@ static const OptionInfoRec RADEONOptions[] = {
 #if defined(__powerpc__)
     { OPTION_MAC_MODEL,      "MacModel",         OPTV_STRING,  {0}, FALSE },
 #endif
+    { OPTION_TVDAC_LOAD_DETECT, "TVDACLoadDetect", OPTV_BOOLEAN, {0}, FALSE },
     { -1,                    NULL,               OPTV_NONE,    {0}, FALSE }
 };
 
diff --git a/src/radeon_output.c b/src/radeon_output.c
index 214167f..39cbdb9 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -1771,13 +1771,15 @@ radeon_create_resources(xf86OutputPtr output)
 	if (err != 0) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		       "RRConfigureOutputProperty error, %d\n", err);
-	}	
+	}
 
 	if (radeon_output->DACType == DAC_PRIMARY)
 	    data = 1; /* primary dac, only drives vga */
 	/*else if (radeon_output->DACType == DAC_TVDAC &&
 		 info->tvdac_use_count < 2)
 		 data = 1;*/ /* only one output with tvdac */
+	else if (xf86ReturnOptValBool(info->Options, OPTION_TVDAC_LOAD_DETECT, FALSE))
+	    data = 1; /* user forces on tv dac load detection */
 	else
 	    data = 0; /* shared tvdac between vga/dvi/tv */
 


More information about the xorg-commit mailing list