[PATCH] Radeon 8/11 : Add ReverseDDC option

Benjamin Herrenschmidt benh at kernel.crashing.org
Sun Dec 5 02:00:01 PST 2004


On some cards where no BIOS provided output mapping infos is available, the
driver would get the DDC flipped between the two outputs of the card. This
typically happen on recent Mac cards. This adds an option to force the
driver to reverse what it thinks is the primary display DDC and the
secondary display DDC. Ultimately, we'll have to do a better job of
recognizing those Mac cards though.

Index: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
===================================================================
--- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2004-12-05 20:22:04.655611936 +1100
+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2004-12-05 20:22:08.091089664 +1100
@@ -173,6 +173,7 @@
     OPTION_SHOWCACHE,
     OPTION_DYNAMIC_CLOCKS,
     OPTION_VGA_ACCESS,
+    OPTION_REVERSE_DDC,
 } RADEONOpts;
 
 static const OptionInfoRec RADEONOptions[] = {
@@ -225,6 +226,7 @@
     { OPTION_SHOWCACHE,      "ShowCache",        OPTV_BOOLEAN, {0}, FALSE },
     { OPTION_DYNAMIC_CLOCKS, "DynamicClocks",    OPTV_BOOLEAN, {0}, FALSE },
     { OPTION_VGA_ACCESS,     "VGAAccess",        OPTV_BOOLEAN, {0}, TRUE  },
+    { OPTION_REVERSE_DDC,    "ReverseDDC",       OPTV_BOOLEAN, {0}, FALSE },
     { -1,                    NULL,               OPTV_NONE,    {0}, FALSE }
 };
 
@@ -1721,6 +1723,14 @@
 	pRADEONEnt->PortInfo[1].DACType = DAC_PRIMARY;
 	pRADEONEnt->PortInfo[1].TMDSType = TMDS_EXT;
 	pRADEONEnt->PortInfo[1].ConnectorType = CONNECTOR_CRT;
+
+	/* Some cards have the DDC lines swapped and we have no way to
+	 * detect it yet (Mac cards)
+	 */
+	if (xf86ReturnOptValBool(info->Options, OPTION_REVERSE_DDC, FALSE)) {
+	    pRADEONEnt->PortInfo[0].DDCType = DDC_VGA;
+	    pRADEONEnt->PortInfo[1].DDCType = DDC_DVI;
+        }
     }
 
     /* always make TMDS_INT port first*/
Index: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.man
===================================================================
--- xc.orig/programs/Xserver/hw/xfree86/drivers/ati/radeon.man	2004-12-05 20:16:30.136466576 +1100
+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.man	2004-12-05 20:22:08.094089208 +1100
@@ -507,6 +507,14 @@
 .B on 
 on other architectures.
 .TP
+.BI "Option \*qReverseDDC\*q \*q" boolean \*q
+When BIOS connector informations aren't available, use this option to
+reverse the mapping of the 2 main DDC ports. Use this if the X serve
+obviously detects the wrong display for each connector. This is
+typically needed on the Radeon 9600 cards bundled with Apple G5s. The
+default is
+.B off.
+.TP
 
 .SH SEE ALSO
 __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)





More information about the xorg mailing list