[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-ati: Changes to 'debian-experimental'



 ChangeLog                    |  178 ++++++++++++++++++
 debian/changelog             |    7 
 man/radeon.man               |    4 
 src/ati.c                    |   39 ++++
 src/ati.h                    |    2 
 src/ati_pciids_gen.h         |    1 
 src/aticlock.c               |   10 +
 src/aticonsole.c             |    6 
 src/atimach64probe.h         |    2 
 src/atimach64xv.c            |    5 
 src/atimisc.c                |    6 
 src/atimodule.c              |    2 
 src/atiprobe.c               |   14 -
 src/atombios_crtc.c          |   28 +-
 src/atombios_output.c        |   27 +-
 src/legacy_crtc.c            |   26 --
 src/legacy_output.c          |  228 ++++++++++++++---------
 src/pcidb/ati_pciids.csv     |    1 
 src/r128_misc.c              |    5 
 src/r128_probe.h             |    2 
 src/radeon.h                 |    4 
 src/radeon_atombios.c        |   66 +++---
 src/radeon_bios.c            |  149 +++++++++++----
 src/radeon_chipinfo_gen.h    |    1 
 src/radeon_chipset_gen.h     |    1 
 src/radeon_dri.c             |   15 +
 src/radeon_driver.c          |   14 +
 src/radeon_exa_funcs.c       |    7 
 src/radeon_misc.c            |    5 
 src/radeon_modes.c           |   20 +-
 src/radeon_output.c          |  409 ++++++++++++++++++++-----------------------
 src/radeon_pci_chipset_gen.h |    1 
 src/radeon_probe.h           |   33 ++-
 src/radeon_reg.h             |    7 
 src/radeon_tv.c              |   12 -
 src/radeon_video.c           |    8 
 36 files changed, 867 insertions(+), 478 deletions(-)

New commits:
commit a335398c7701b28864ede6414f7fc6a76ab2d55a
Author: Brice Goglin <bgoglin@debian.org>
Date:   Sun Feb 3 10:54:32 2008 +0100

    New upstream snapshot

diff --git a/ChangeLog b/ChangeLog
index 870f936..cebd618 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,181 @@
+commit f65e8dfac23adfa199026765fe3a1ea08cf4da67
+Author: Alex Deucher <alex@cube.(none)>
+Date:   Sun Feb 3 00:09:59 2008 -0500
+
+    RADEON: rework i2c handling
+    
+    Split out clk, data, and lock regs and masks.  some cards use different
+    regs and masks for each.  For cards with ATOMBIOS, use the i2c bios
+    table to grab the i2c data.
+
+commit a38a903debc0a50dbc73f59dc2741bbea76d2bd9
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date:   Fri Feb 1 02:59:07 2008 -0500
+
+    RADEON: don't restore LVDS_PLL_CNTL for now
+    
+    seems to cause problems with resume for some users.
+    this needs further investigation.
+    see bug 12596
+
+commit 5d7bea2b62c86868baf1960665a40249a43bafc5
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date:   Fri Feb 1 02:53:22 2008 -0500
+
+    RADEON: remove redundant RADEONDisableDisplays()
+    
+    use RADEONBlank() instead
+
+commit 73b437ce232c94c0067a0d2f70538b6e1e8c07a7
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date:   Fri Feb 1 02:47:06 2008 -0500
+
+    RADEON: remove unused "aspect" scaler option
+
+commit f1fb9e4daa29bc379f653f847254db1496b625fd
+Author: Alex Deucher <alex@t41p.hsd1.va.comcast.net>
+Date:   Fri Feb 1 02:39:18 2008 -0500
+
+    RADEON: Implement "center" mode for RMX on legacy radeons
+
+commit bcd590103e04bfdb4f12413beacebf344f07e88e
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Tue Jan 29 12:12:54 2008 -0500
+
+    RADEON: update man page to reflect AGP 1x default revert
+
+commit 09348a83d06ba9d3129499c4daedd44a68771530
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Tue Jan 29 12:09:24 2008 -0500
+
+    Seems the default is more reliable... we can't win.
+    
+    Revert "radeon: Default to 1x again with non-v3 AGP cards."
+    
+    This reverts commit b653e5a628bfa4dfb168e96f93f41eb910f409fb.
+
+commit 0c26806245381b925b73ff9f3b747e3dcf0ebd6f
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Tue Jan 29 10:26:48 2008 -0500
+
+    RADEON: Add new RV380 pci id
+    
+    bug 14289
+
+commit ce77ed78a877023da72dbe51609aef9a07e250b1
+Author: Maciej Cencora <m.cencora@gmail.com>
+Date:   Mon Jan 28 19:02:56 2008 -0500
+
+    RS690: Implement MC idle check
+
+commit b7de4ff52cfbdd85ee65000613632e21b92af24e
+Author: George Sapountzis <gsap7@yahoo.gr>
+Date:   Sat Jan 26 19:28:05 2008 +0200
+
+    mach64: add hint for sparc and minor cosmetic.
+
+commit 09d713aa0ed6367b4457420b3c2832fe8eca9b00
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Wed Jan 23 18:05:41 2008 -0500
+
+    Revert "RADEON: adjust PAL mode hstart"
+    
+    This reverts commit 719a9a376e34d99032af75e3f7b002670ccb816b.
+    
+    This breaks TV out on some cards.
+
+commit 719a9a376e34d99032af75e3f7b002670ccb816b
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Sun Jan 20 18:40:53 2008 -0500
+
+    RADEON: adjust PAL mode hstart
+    
+    Most people seem to get a more aligned picture with this setting
+
+commit b2db8657fb888cff6d64c6dcb182caac389776ce
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Sun Jan 20 18:33:22 2008 -0500
+
+    RADEON: re-work i2c for DDC
+    
+    Unify the radeon/avivo paths and grab the data/clk masks from bios
+    if available
+
+commit a43003b24022a833e604f41b2873c0350b34181c
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Sat Jan 19 18:49:53 2008 -0500
+
+    RADEON: get dac2 adj values from the bios tables
+
+commit d4596c52ac9994be26e9ec2d7d57b3892c34abdb
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Sat Jan 19 17:17:26 2008 -0500
+
+    RADEON: grab pll_in_min/pll_in_max from bios tables if available
+
+commit 9a0947c812d0d38d1bca6a91140ac210831a6cb4
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Sat Jan 19 13:57:50 2008 -0500
+
+    ATOM: Use LVDS edid from bios if available
+
+commit 7238258c12def8ef273e5362f716d165f720c5a5
+Author: Kusanagi Kouichi <slash@ma.neweb.ne.jp>
+Date:   Sat Jan 19 15:04:21 2008 +0100
+
+    radeon: Partial fix for XVideo RGB image distortions.
+
+commit 32be3cf9d6c34e60ff8c3d6cfe9f73f1869c50e4
+Author: Brice Goglin <Brice.Goglin@ens-lyon.org>
+Date:   Fri Jan 18 14:42:14 2008 -0500
+
+    RADEON: print the name of the output when printing the EDID
+
+commit 4ba9430ee97dbce8f77db8de6ce9b753a75e453d
+Author: George Sapountzis <gsap7@yahoo.gr>
+Date:   Fri Jan 18 18:18:18 2008 +0200
+
+    mach64: workaround for corruption at upper-left
+    
+    commit possible workaround, it's reported multiple times ...
+
+commit 12c00111b68c9cf4872a424258c6f8b7247aac47
+Author: George Sapountzis <gsap7@yahoo.gr>
+Date:   Fri Jan 18 18:17:40 2008 +0200
+
+    use stand-alone drivers for each chip family.
+    
+    Do not load the ati wrapper when the user specifies the sub-driver name in
+    the Driver line of xorg.conf.  Also, for -configure cause the wrapper to fail
+    and let each sub-driver speak for themselves.
+
+commit 24c7d134cd450f9e2cca85e4a2fc3253d250be04
+Author: Alex Deucher <alex@botch2.(none)>
+Date:   Fri Jan 18 09:50:38 2008 -0500
+
+    RADEON: make sure EXA Composite is actually disabled on XPRESS chips.
+
+commit eaf425436008092abe81208321a2b3b6698a5d79
+Author: Dave Airlie <airlied@redhat.com>
+Date:   Fri Jan 18 20:11:57 2008 +1000
+
+    fixup register 6594 save/restore
+
+commit 2a89a31481d71a56a9930073cf99d3ae7b4290e1
+Author: Alex Deucher <alex@samba.(none)>
+Date:   Thu Jan 17 15:08:17 2008 -0500
+
+    RADEON: use radeon_output->Flags for tracking RMX rather than mode->Flags
+
+commit 495e3119250ffb48489debbaabe560d23753cc43
+Author: Alex Deucher <alex@samba.(none)>
+Date:   Thu Jan 17 14:56:19 2008 -0500
+
+    AVIVO: Add support for RMX
+    
+    Both centered and expansion modes are supported.  Select
+    using output attributes.
+
 commit 6bd510a211f25d52e74791e4a429cd2218ced541
 Author: Alex Deucher <alex@samba.(none)>
 Date:   Wed Jan 16 18:09:49 2008 -0500
diff --git a/debian/changelog b/debian/changelog
index 38e951f..63bd626 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-ati (1:6.7.198~git20080203.f65e8dfa-1) experimental; urgency=low
+
+  * New upstream snapshot, containing commits up to f65e8dfa.
+   + Reverts "Default to 1x again with non-v3 AGP cards", closes: #457767.
+
+ -- Brice Goglin <bgoglin@debian.org>  Sun, 03 Feb 2008 10:49:43 +0100
+
 xserver-xorg-video-ati (1:6.7.198~git20080117.6bd510a2-1) experimental; urgency=low
 
   * New upstream snapshot, containing commits up to 6bd510a2.

commit f65e8dfac23adfa199026765fe3a1ea08cf4da67
Author: Alex Deucher <alex@cube.(none)>
Date:   Sun Feb 3 00:09:59 2008 -0500

    RADEON: rework i2c handling
    
    Split out clk, data, and lock regs and masks.  some cards use different
    regs and masks for each.  For cards with ATOMBIOS, use the i2c bios
    table to grab the i2c data.

diff --git a/src/legacy_output.c b/src/legacy_output.c
index 8ae21b9..7ade772 100644
--- a/src/legacy_output.c
+++ b/src/legacy_output.c
@@ -284,7 +284,8 @@ RADEONRestoreDVOChip(ScrnInfoPtr pScrn, xf86OutputPtr output)
     if (!radeon_output->DVOChip)
 	return;
 
-    OUTREG(radeon_output->dvo_i2c_reg, INREG(radeon_output->dvo_i2c_reg) &
+    OUTREG(radeon_output->dvo_i2c.mask_clk_reg,
+	   INREG(radeon_output->dvo_i2c.mask_clk_reg) &
 	   (CARD32)~(RADEON_GPIO_A_0 | RADEON_GPIO_A_1));
 
     if (!RADEONInitExtTMDSInfoFromBIOS(output)) {
diff --git a/src/radeon.h b/src/radeon.h
index d538196..ec952b5 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -870,6 +870,9 @@ RADEONGetExtTMDSInfoFromBIOS (xf86OutputPtr output);
 extern Bool
 RADEONInitExtTMDSInfoFromBIOS (xf86OutputPtr output);
 
+extern RADEONI2CBusRec
+legacy_setup_i2c_bus(int ddc_line);
+
 extern void
 radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y);
 extern void
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index b956b9a..e8f9e91 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1401,10 +1401,10 @@ const int object_connector_convert[] =
       CONNECTOR_NONE,
       CONNECTOR_NONE,
     };
-     
+
 static void
 rhdAtomParseI2CRecord(atomBiosHandlePtr handle,
-			ATOM_I2C_RECORD *Record, CARD32 *ddc_line)
+			ATOM_I2C_RECORD *Record, int *line)
 {
     ErrorF(" %s:  I2C Record: %s[%x] EngineID: %x I2CAddr: %x\n",
 	     __func__,
@@ -1414,53 +1414,52 @@ rhdAtomParseI2CRecord(atomBiosHandlePtr handle,
 	     Record->ucI2CAddr);
 
     if (!*(unsigned char *)&(Record->sucI2cId))
-	*ddc_line = 0;
+	*line = 0;
     else {
 
 	if (Record->ucI2CAddr != 0)
 	    return;
-
-	if (Record->sucI2cId.bfHW_Capable) {
-	    switch(Record->sucI2cId.bfI2C_LineMux) {
-	    case 0: *ddc_line = 0x7e40; break;
-	    case 1: *ddc_line = 0x7e50; break;
-	    case 2: *ddc_line = 0x7e30; break;
-	    default: break;
-	    }
-	    return;
-	
-	} else {
-	    /* add GPIO pin parsing */
-	}
+	*line = Record->sucI2cId.bfI2C_LineMux;
+	return;
     }
 }
 
-static CARD32
+static RADEONI2CBusRec
 RADEONLookupGPIOLineForDDC(ScrnInfoPtr pScrn, CARD8 id)
 {
     RADEONInfoPtr info = RADEONPTR (pScrn);
     atomDataTablesPtr atomDataPtr;
     ATOM_GPIO_I2C_ASSIGMENT gpio;
-    CARD32 ret = 0;
+    RADEONI2CBusRec i2c;
     CARD8 crev, frev;
 
+    i2c.valid = FALSE;
+
     atomDataPtr = info->atomBIOS->atomDataPtr;
 
     if (!rhdAtomGetTableRevisionAndSize(
 	    &(atomDataPtr->GPIO_I2C_Info->sHeader),
 	    &crev,&frev,NULL)) {
 	xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No GPIO Info Table found!\n");
-	return ret;
+	return i2c;
     }
 
-    /* note clk and data regs can be different!
-     * gpio.usClkMaskRegisterIndex and gpio.usDataMaskRegisterIndex
-     */
-
     gpio = atomDataPtr->GPIO_I2C_Info->asGPIO_Info[id];
-    ret = gpio.usClkMaskRegisterIndex * 4;
-
-    return ret;
+    i2c.mask_clk_reg = gpio.usClkMaskRegisterIndex * 4;
+    i2c.mask_data_reg = gpio.usDataMaskRegisterIndex * 4;
+    i2c.put_clk_reg = gpio.usClkEnRegisterIndex * 4;
+    i2c.put_data_reg = gpio.usDataEnRegisterIndex * 4;
+    i2c.get_clk_reg = gpio.usClkY_RegisterIndex * 4;
+    i2c.get_data_reg = gpio.usDataY_RegisterIndex * 4;
+    i2c.mask_clk_mask = (1 << gpio.ucClkMaskShift);
+    i2c.mask_data_mask = (1 << gpio.ucDataMaskShift);
+    i2c.put_clk_mask = (1 << gpio.ucClkEnShift);
+    i2c.put_data_mask = (1 << gpio.ucDataEnShift);
+    i2c.get_clk_mask = (1 << gpio.ucClkY_Shift);
+    i2c.get_data_mask = (1 <<  gpio.ucDataY_Shift);
+    i2c.valid = TRUE;
+
+    return i2c;
 }
 
 Bool
@@ -1471,7 +1470,7 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn)
     unsigned short size;
     atomDataTablesPtr atomDataPtr;
     ATOM_CONNECTOR_OBJECT_TABLE *con_obj;
-    int i, j;
+    int i, j, line = 0;
 
     atomDataPtr = info->atomBIOS->atomDataPtr;
     if (!rhdAtomGetTableRevisionAndSize((ATOM_COMMON_TABLE_HEADER *)(atomDataPtr->Object_Header), &crev, &frev, &size))
@@ -1559,7 +1558,8 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn)
 		case ATOM_I2C_RECORD_TYPE:
 		    rhdAtomParseI2CRecord(info->atomBIOS, 
 					  (ATOM_I2C_RECORD *)Record,
-					  &info->BiosConnector[i].ddc_line);
+					  &line);
+		    info->BiosConnector[i].ddc_i2c = RADEONLookupGPIOLineForDDC(pScrn, line);
 		    break;
 		case ATOM_HPD_INT_RECORD_TYPE:
 		    break;
@@ -1720,11 +1720,11 @@ RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
 	/* don't assign a gpio for tv */
 	if ((i == ATOM_DEVICE_TV1_INDEX) ||
 	    (i == ATOM_DEVICE_TV2_INDEX) ||
-            (i == ATOM_DEVICE_CV_INDEX))
-            info->BiosConnector[i].ddc_line = 0;
+	    (i == ATOM_DEVICE_CV_INDEX))
+	    info->BiosConnector[i].ddc_i2c.valid = FALSE;
 	else
-	    info->BiosConnector[i].ddc_line =
-	        RADEONLookupGPIOLineForDDC(pScrn, ci.sucI2cId.sbfAccess.bfI2C_LineMux);
+	    info->BiosConnector[i].ddc_i2c =
+		RADEONLookupGPIOLineForDDC(pScrn, ci.sucI2cId.sbfAccess.bfI2C_LineMux);
 
 	if (i == ATOM_DEVICE_DFP1_INDEX)
 	    info->BiosConnector[i].TMDSType = TMDS_INT;
@@ -1799,7 +1799,7 @@ RADEONGetATOMConnectorInfoFromBIOSConnectorTable (ScrnInfoPtr pScrn)
     for (i = 0; i < ATOM_MAX_SUPPORTED_DEVICE; i++) {
 	if (info->BiosConnector[i].valid) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Port%d: DDCType-0x%x, DACType-%d, TMDSType-%d, ConnectorType-%d, hpd_mask-0x%x\n",
-		       i, (unsigned int)info->BiosConnector[i].ddc_line, info->BiosConnector[i].DACType,
+		       i, (unsigned int)info->BiosConnector[i].ddc_i2c.mask_clk_reg, info->BiosConnector[i].DACType,
 		       info->BiosConnector[i].TMDSType, info->BiosConnector[i].ConnectorType,
 		       info->BiosConnector[i].hpd_mask);
 	}
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 46f4a3b..8e6bd8d 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -74,7 +74,8 @@ Bool RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr  pInt10)
     unsigned short dptr;
 
 #ifdef XSERVER_LIBPCIACCESS
-    info->VBIOS = xalloc(info->PciInfo->rom_size);
+    //info->VBIOS = xalloc(info->PciInfo->rom_size);
+    info->VBIOS = xalloc(RADEON_VBIOS_SIZE);
 #else
     info->VBIOS = xalloc(RADEON_VBIOS_SIZE);
 #endif
@@ -260,24 +261,28 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
 		info->BiosConnector[i].valid = FALSE;
 		break;
 	    }
+
+	    info->BiosConnector[i].ddc_i2c.valid = FALSE;
+
 	    DDCType = (tmp >> 8) & 0xf;
 	    switch (DDCType) {
 	    case DDC_MONID:
-		info->BiosConnector[i].ddc_line = RADEON_GPIO_MONID;
+		info->BiosConnector[i].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_MONID);
 		break;
 	    case DDC_DVI:
-		info->BiosConnector[i].ddc_line = RADEON_GPIO_DVI_DDC;
+		info->BiosConnector[i].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
 		break;
 	    case DDC_VGA:
-		info->BiosConnector[i].ddc_line = RADEON_GPIO_VGA_DDC;
+		info->BiosConnector[i].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
 		break;
 	    case DDC_CRT2:
-		info->BiosConnector[i].ddc_line = RADEON_GPIO_CRT2_DDC;
+		info->BiosConnector[i].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_CRT2_DDC);
 		break;
 	    default:
 		xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Unknown DDC Type: %d\n", DDCType);
 		break;
 	    }
+
 	    if (tmp & 0x1)
 		info->BiosConnector[i].DACType = DAC_TVDAC;
 	    else
@@ -299,8 +304,8 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
 	     */
 	    if (info->ChipFamily == CHIP_FAMILY_RS400 &&
 		info->BiosConnector[i].ConnectorType == CONNECTOR_VGA &&
-		info->BiosConnector[i].ddc_line == RADEON_GPIO_CRT2_DDC) {
-		info->BiosConnector[i].ddc_line = RADEON_GPIO_MONID;
+		info->BiosConnector[i].ddc_i2c.mask_clk_reg == RADEON_GPIO_CRT2_DDC) {
+		info->BiosConnector[i].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_MONID);
 	    }
 
 	    /* XPRESS desktop chips seem to have a proprietary connector listed for
@@ -329,7 +334,7 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
 	    info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I;
 	    info->BiosConnector[0].DACType = DAC_PRIMARY;
 	    info->BiosConnector[0].TMDSType = TMDS_INT;
-	    info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
+	    info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
 	} else
 	    return FALSE;
     }
@@ -342,6 +347,7 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
 	    info->BiosConnector[4].ConnectorType = CONNECTOR_LVDS;
 	    info->BiosConnector[4].DACType = DAC_NONE;
 	    info->BiosConnector[4].TMDSType = TMDS_NONE;
+	    info->BiosConnector[4].ddc_i2c.valid = FALSE;
 
 	    tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x42);
 	    if (tmp) {
@@ -352,26 +358,38 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
 			DDCType	= tmp1;
 			switch (DDCType) {
 			case DDC_MONID:
-			    info->BiosConnector[4].ddc_line = RADEON_GPIO_MONID;
+			    info->BiosConnector[4].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_MONID);
 			    break;
 			case DDC_DVI:
-			    info->BiosConnector[4].ddc_line = RADEON_GPIO_DVI_DDC;
+			    info->BiosConnector[4].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
 			    break;
 			case DDC_VGA:
-			    info->BiosConnector[4].ddc_line = RADEON_GPIO_VGA_DDC;
+			    info->BiosConnector[4].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
 			    break;
 			case DDC_CRT2:
-			    info->BiosConnector[4].ddc_line = RADEON_GPIO_CRT2_DDC;
+			    info->BiosConnector[4].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_CRT2_DDC);
 			    break;
 			case DDC_LCD:
-			    info->BiosConnector[4].ddc_line = RADEON_LCD_GPIO_MASK;
-			    info->BiosConnector[4].ddc_clk_mask = RADEON_BIOS32(tmp0 + 0x03);
-			    info->BiosConnector[4].ddc_data_mask = RADEON_BIOS32(tmp0 + 0x07);
+			    info->BiosConnector[4].ddc_i2c = legacy_setup_i2c_bus(RADEON_LCD_GPIO_MASK);
+			    info->BiosConnector[4].ddc_i2c.mask_clk_mask =
+				RADEON_BIOS32(tmp0 + 0x03) | RADEON_BIOS32(tmp0 + 0x07);
+			    info->BiosConnector[4].ddc_i2c.mask_data_mask =
+				RADEON_BIOS32(tmp0 + 0x03) | RADEON_BIOS32(tmp0 + 0x07);
+			    info->BiosConnector[4].ddc_i2c.put_clk_mask = RADEON_BIOS32(tmp0 + 0x03);
+			    info->BiosConnector[4].ddc_i2c.put_data_mask = RADEON_BIOS32(tmp0 + 0x07);
+			    info->BiosConnector[4].ddc_i2c.get_clk_mask = RADEON_BIOS32(tmp0 + 0x03);
+			    info->BiosConnector[4].ddc_i2c.get_data_mask = RADEON_BIOS32(tmp0 + 0x07);
 			    break;
 			case DDC_GPIO:
-			    info->BiosConnector[4].ddc_line = RADEON_MDGPIO_EN_REG;
-			    info->BiosConnector[4].ddc_clk_mask = RADEON_BIOS32(tmp0 + 0x03);
-			    info->BiosConnector[4].ddc_data_mask = RADEON_BIOS32(tmp0 + 0x07);
+			    info->BiosConnector[4].ddc_i2c = legacy_setup_i2c_bus(RADEON_MDGPIO_EN_REG);
+			    info->BiosConnector[4].ddc_i2c.mask_clk_mask =
+				RADEON_BIOS32(tmp0 + 0x03) | RADEON_BIOS32(tmp0 + 0x07);
+			    info->BiosConnector[4].ddc_i2c.mask_data_mask =
+				RADEON_BIOS32(tmp0 + 0x03) | RADEON_BIOS32(tmp0 + 0x07);
+			    info->BiosConnector[4].ddc_i2c.put_clk_mask = RADEON_BIOS32(tmp0 + 0x03);
+			    info->BiosConnector[4].ddc_i2c.put_data_mask = RADEON_BIOS32(tmp0 + 0x07);
+			    info->BiosConnector[4].ddc_i2c.get_clk_mask = RADEON_BIOS32(tmp0 + 0x03);
+			    info->BiosConnector[4].ddc_i2c.get_data_mask = RADEON_BIOS32(tmp0 + 0x07);
 			    break;
 			default:
 			    xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Unknown DDC Type: %d\n", DDCType);
@@ -381,7 +399,7 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
 		    }
 		}
 	    } else {
-		info->BiosConnector[4].ddc_line = 0;
+		info->BiosConnector[4].ddc_i2c.valid = FALSE;
 	    }
 	}
     }
@@ -396,7 +414,7 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
 		info->BiosConnector[5].ConnectorType = CONNECTOR_STV;
 		info->BiosConnector[5].DACType = DAC_TVDAC;
 		info->BiosConnector[5].TMDSType = TMDS_NONE;
-		info->BiosConnector[5].ddc_line = 0;
+		info->BiosConnector[5].ddc_i2c.valid = FALSE;
 	    }
 	}
     }
@@ -405,7 +423,7 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
     for (i = 0; i < RADEON_MAX_BIOS_CONNECTOR; i++) {
 	if (info->BiosConnector[i].valid) {
 	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Port%d: DDCType-0x%x, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
-		       i, (unsigned int)info->BiosConnector[i].ddc_line, info->BiosConnector[i].DACType,
+		       i, (unsigned int)info->BiosConnector[i].ddc_i2c.mask_clk_reg, info->BiosConnector[i].DACType,
 		       info->BiosConnector[i].TMDSType, info->BiosConnector[i].ConnectorType);
 	}
     }
@@ -875,19 +893,19 @@ Bool RADEONGetExtTMDSInfoFromBIOS (xf86OutputPtr output)
 	    table_start = offset+4;
 	    max_freq = RADEON_BIOS16(table_start);
 	    radeon_output->dvo_i2c_slave_addr = RADEON_BIOS8(table_start+2);
+	    radeon_output->dvo_i2c.valid = FALSE;
 	    gpio_reg = RADEON_BIOS8(table_start+3);
 	    if (gpio_reg == 1)
-		radeon_output->dvo_i2c_reg = RADEON_GPIO_MONID;
+		radeon_output->dvo_i2c = legacy_setup_i2c_bus(RADEON_GPIO_MONID);
 	    else if (gpio_reg == 2)
-		radeon_output->dvo_i2c_reg = RADEON_GPIO_DVI_DDC;
+		radeon_output->dvo_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
 	    else if (gpio_reg == 3)
-		radeon_output->dvo_i2c_reg = RADEON_GPIO_VGA_DDC;
+		radeon_output->dvo_i2c = legacy_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
 	    else if (gpio_reg == 4)
-		radeon_output->dvo_i2c_reg = RADEON_GPIO_CRT2_DDC;
+		radeon_output->dvo_i2c = legacy_setup_i2c_bus(RADEON_GPIO_CRT2_DDC);
 	    else if (gpio_reg == 5)
 		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 			   "unsupported MM gpio_reg\n");
-		/*radeon_output->i2c_reg = RADEON_GPIO_MM;*/
 	    else {
 		xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 			   "Unknown gpio reg: %d\n", gpio_reg);
diff --git a/src/radeon_output.c b/src/radeon_output.c
index ccfb4c5..5ef864e 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -206,7 +206,7 @@ void RADEONPrintPortMap(ScrnInfoPtr pScrn)
 		   ConnectorTypeName[radeon_output->ConnectorType],
 		   DACTypeName[radeon_output->DACType],
 		   TMDSTypeName[radeon_output->TMDSType],
-		   (unsigned int)radeon_output->ddc_line);
+		   (unsigned int)radeon_output->ddc_i2c.mask_clk_reg);
     }
 
 }
@@ -240,7 +240,7 @@ avivo_display_ddc_connected(ScrnInfoPtr pScrn, xf86OutputPtr output)
     } else MonType = MT_NONE;
     
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-	       "DDC Type: 0x%x, Detected Monitor Type: %d\n", (unsigned int)radeon_output->ddc_line, MonType);
+	       "Output: %s, Detected Monitor Type: %d\n", output->name, MonType);
 
     return MonType;
 }
@@ -256,7 +256,10 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output)
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
     int i, j;
 
-    DDCReg = radeon_output->ddc_line;
+    if (!radeon_output->ddc_i2c.valid)
+	return MT_NONE;
+
+    DDCReg = radeon_output->ddc_i2c.mask_clk_reg;
 
     /* Read and output monitor info using DDC2 over I2C bus */
     if (radeon_output->pI2CBus && info->ddc2 && (DDCReg != RADEON_LCD_GPIO_MASK) && (DDCReg != RADEON_MDGPIO_EN_REG)) {
@@ -340,7 +343,7 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output)
     } else MonType = MT_NONE;
 
     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-	       "DDC Type: 0x%x, Detected Monitor Type: %d\n", (unsigned int)radeon_output->ddc_line, MonType);
+	       "Output: %s, Detected Monitor Type: %d\n", output->name, MonType);
 
     return MonType;
 }
@@ -1273,13 +1276,21 @@ Bool AVIVOI2CDoLock(xf86OutputPtr output, int lock_state)
     unsigned char *RADEONMMIO = info->MMIO;
     CARD32 temp;
 
-    temp = INREG(pRADEONI2CBus->gpio_reg);
+    temp = INREG(pRADEONI2CBus->mask_clk_reg);
+    if (lock_state == AVIVO_I2C_ENABLE)
+	temp |= (pRADEONI2CBus->put_clk_mask);
+    else
+	temp &= ~(pRADEONI2CBus->put_clk_mask);
+    OUTREG(pRADEONI2CBus->mask_clk_reg, temp);
+    temp = INREG(pRADEONI2CBus->mask_clk_reg);
+
+    temp = INREG(pRADEONI2CBus->mask_data_reg);
     if (lock_state == AVIVO_I2C_ENABLE)
-	temp |= (pRADEONI2CBus->put_clk_mask | pRADEONI2CBus->put_data_mask);
+	temp |= (pRADEONI2CBus->put_data_mask);
     else
-	temp &= ~(pRADEONI2CBus->put_clk_mask | pRADEONI2CBus->put_data_mask);;
-    OUTREG(pRADEONI2CBus->gpio_reg, temp);
-    temp = INREG(pRADEONI2CBus->gpio_reg);
+	temp &= ~(pRADEONI2CBus->put_data_mask);
+    OUTREG(pRADEONI2CBus->mask_data_reg, temp);
+    temp = INREG(pRADEONI2CBus->mask_data_reg);
 
     return TRUE;
 }
@@ -1293,9 +1304,11 @@ static void RADEONI2CGetBits(I2CBusPtr b, int *Clock, int *data)
     RADEONI2CBusPtr pRADEONI2CBus = b->DriverPrivate.ptr;
 
     /* Get the result */
-    val = INREG(pRADEONI2CBus->get_reg);
+    val = INREG(pRADEONI2CBus->get_clk_reg);
     *Clock = (val & pRADEONI2CBus->get_clk_mask) != 0;
+    val = INREG(pRADEONI2CBus->get_data_reg);
     *data  = (val & pRADEONI2CBus->get_data_mask) != 0;
+
 }
 
 static void RADEONI2CPutBits(I2CBusPtr b, int Clock, int data)
@@ -1306,20 +1319,24 @@ static void RADEONI2CPutBits(I2CBusPtr b, int Clock, int data)
     unsigned char *RADEONMMIO = info->MMIO;
     RADEONI2CBusPtr pRADEONI2CBus = b->DriverPrivate.ptr;
 
-    val = INREG(pRADEONI2CBus->put_reg) & (CARD32)~(pRADEONI2CBus->put_clk_mask | pRADEONI2CBus->put_data_mask);
+    val = INREG(pRADEONI2CBus->put_clk_reg) & (CARD32)~(pRADEONI2CBus->put_clk_mask);
     val |= (Clock ? 0:pRADEONI2CBus->put_clk_mask);
-    val |= (data ? 0:pRADEONI2CBus->put_data_mask);
-    OUTREG(pRADEONI2CBus->put_reg, val);
+    OUTREG(pRADEONI2CBus->put_clk_reg, val);
+    /* read back to improve reliability on some cards. */
+    val = INREG(pRADEONI2CBus->put_clk_reg);
 
+    val = INREG(pRADEONI2CBus->put_data_reg) & (CARD32)~(pRADEONI2CBus->put_data_mask);
+    val |= (data ? 0:pRADEONI2CBus->put_data_mask);
+    OUTREG(pRADEONI2CBus->put_data_reg, val);
     /* read back to improve reliability on some cards. */
-    val = INREG(pRADEONI2CBus->put_reg);
+    val = INREG(pRADEONI2CBus->put_data_reg);
+
 }
 
 static Bool
 RADEONI2CInit(xf86OutputPtr output, I2CBusPtr *bus_ptr, char *name, Bool dvo)
 {
     ScrnInfoPtr pScrn = output->scrn;
-    RADEONInfoPtr  info       = RADEONPTR(pScrn);
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
     I2CBusPtr pI2CBus;
     RADEONI2CBusPtr pRADEONI2CBus;
@@ -1333,55 +1350,10 @@ RADEONI2CInit(xf86OutputPtr output, I2CBusPtr *bus_ptr, char *name, Bool dvo)
     pI2CBus->I2CGetBits = RADEONI2CGetBits;
     pI2CBus->AcknTimeout = 5;
 
-    pRADEONI2CBus = xcalloc(sizeof(RADEONI2CBusRec), 1);
-    if (!pRADEONI2CBus) {
-	xf86DrvMsg(pScrn->scrnIndex,X_ERROR, "Failed to allocate radeon i2c bus info\n");
-	return FALSE;
-    }
-
     if (dvo) {
-	/* these only seem to work properly on MACs */
-	pRADEONI2CBus->gpio_reg = radeon_output->dvo_i2c_reg;
-	pRADEONI2CBus->put_reg = radeon_output->dvo_i2c_reg;
-	pRADEONI2CBus->get_reg = radeon_output->dvo_i2c_reg;
-	pRADEONI2CBus->put_clk_mask = RADEON_GPIO_EN_1;
-	pRADEONI2CBus->put_data_mask = RADEON_GPIO_EN_0;
-	pRADEONI2CBus->get_clk_mask = RADEON_GPIO_Y_1;
-	pRADEONI2CBus->get_data_mask = RADEON_GPIO_Y_0;
+	pRADEONI2CBus = &(radeon_output->dvo_i2c);
     } else {
-	if (IS_AVIVO_VARIANT) {
-	    pRADEONI2CBus->gpio_reg = radeon_output->ddc_line;
-	    pRADEONI2CBus->put_reg = radeon_output->ddc_line + 0x8;
-	    pRADEONI2CBus->get_reg = radeon_output->ddc_line + 0xc;
-	    /* FIXME: get these from the BIOS */
-	    if (radeon_output->ddc_line == AVIVO_GPIO_0) {
-		pRADEONI2CBus->put_clk_mask = (1 << 19);
-		pRADEONI2CBus->put_data_mask = (1 << 18);
-		pRADEONI2CBus->get_clk_mask = (1 << 19);
-		pRADEONI2CBus->get_data_mask = (1 << 18);
-	    } else {
-		pRADEONI2CBus->put_clk_mask = (1 << 0);
-		pRADEONI2CBus->put_data_mask = (1 << 8);
-		pRADEONI2CBus->get_clk_mask = (1 << 0);
-		pRADEONI2CBus->get_data_mask = (1 << 8);
-	    }
-	} else {
-	    pRADEONI2CBus->gpio_reg = radeon_output->ddc_line;
-	    pRADEONI2CBus->put_reg = radeon_output->ddc_line;
-	    pRADEONI2CBus->get_reg = radeon_output->ddc_line;
-	    if ((radeon_output->ddc_line == RADEON_LCD_GPIO_MASK) ||
-		(radeon_output->ddc_line == RADEON_MDGPIO_EN_REG)) {
-		pRADEONI2CBus->put_clk_mask = radeon_output->ddc_clk_mask;
-		pRADEONI2CBus->put_data_mask = radeon_output->ddc_data_mask;
-		pRADEONI2CBus->get_clk_mask = radeon_output->ddc_clk_mask;
-		pRADEONI2CBus->get_data_mask = radeon_output->ddc_data_mask;
-	    } else {
-		pRADEONI2CBus->put_clk_mask = RADEON_GPIO_EN_1;
-		pRADEONI2CBus->put_data_mask = RADEON_GPIO_EN_0;
-		pRADEONI2CBus->get_clk_mask = RADEON_GPIO_Y_1;
-		pRADEONI2CBus->get_data_mask = RADEON_GPIO_Y_0;
-	    }
-	}
+	pRADEONI2CBus = &(radeon_output->ddc_i2c);
     }
 
     pI2CBus->DriverPrivate.ptr = (pointer)pRADEONI2CBus;
@@ -1393,6 +1365,28 @@ RADEONI2CInit(xf86OutputPtr output, I2CBusPtr *bus_ptr, char *name, Bool dvo)
     return TRUE;
 }
 
+RADEONI2CBusRec
+legacy_setup_i2c_bus(int ddc_line)
+{
+    RADEONI2CBusRec i2c;
+
+    i2c.mask_clk_mask = RADEON_GPIO_EN_1 | RADEON_GPIO_Y_1;
+    i2c.mask_data_mask =  RADEON_GPIO_EN_0 | RADEON_GPIO_Y_0;
+    i2c.put_clk_mask = RADEON_GPIO_EN_1;
+    i2c.put_data_mask = RADEON_GPIO_EN_0;
+    i2c.get_clk_mask = RADEON_GPIO_Y_1;
+    i2c.get_data_mask = RADEON_GPIO_Y_0;
+    i2c.mask_clk_reg = ddc_line;
+    i2c.mask_data_reg = ddc_line;
+    i2c.put_clk_reg = ddc_line;
+    i2c.put_data_reg = ddc_line;
+    i2c.get_clk_reg = ddc_line;
+    i2c.get_data_reg = ddc_line;
+    i2c.valid = TRUE;
+
+    return i2c;
+}
+
 static void
 RADEONGetPanelInfoFromReg (xf86OutputPtr output)
 {
@@ -1717,11 +1711,6 @@ void RADEONInitConnector(xf86OutputPtr output)
     ScrnInfoPtr	    pScrn = output->scrn;
     RADEONInfoPtr  info       = RADEONPTR(pScrn);
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
-    char stmp[16];
-    char *name;
-    sprintf(stmp, "DDC_0x%x", (unsigned int)radeon_output->ddc_line);
-    name = xnfalloc(strlen(stmp) + 1);
-    strcpy(name, stmp);
 
     if (radeon_output->DACType == DAC_PRIMARY)
 	radeon_output->load_detection = 1; /* primary dac, only drives vga */
@@ -1744,11 +1733,11 @@ void RADEONInitConnector(xf86OutputPtr output)
 	radeon_output->rmx_type = RMX_OFF;
 	if ((!info->IsAtomBios) && radeon_output->TMDSType == TMDS_EXT) {
 #if defined(__powerpc__)
-	    radeon_output->dvo_i2c_reg = RADEON_GPIO_MONID;
+	    radeon_output->dvo_i2c = legacy_setup_i2c_bus(RADEON_GPIO_MONID);
 	    radeon_output->dvo_i2c_slave_addr = 0x70;
 #else
 	    if (!RADEONGetExtTMDSInfoFromBIOS(output)) {
-		radeon_output->dvo_i2c_reg = RADEON_GPIO_CRT2_DDC;
+		radeon_output->dvo_i2c = legacy_setup_i2c_bus(RADEON_GPIO_CRT2_DDC);
 		radeon_output->dvo_i2c_slave_addr = 0x70;
 	    }
 #endif
@@ -1773,8 +1762,8 @@ void RADEONInitConnector(xf86OutputPtr output)
 	RADEONGetTVDacAdjInfo(output);
     }
 
-    if (radeon_output->ddc_line)
-	RADEONI2CInit(output, &radeon_output->pI2CBus, name, FALSE);
+    if (radeon_output->ddc_i2c.valid)
+	RADEONI2CInit(output, &radeon_output->pI2CBus, output->name, FALSE);
 
 }
 
@@ -1786,13 +1775,13 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 
     switch (info->MacModel) {
     case RADEON_MAC_IBOOK:
-	info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
+	info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
 	info->BiosConnector[0].DACType = DAC_NONE;
 	info->BiosConnector[0].TMDSType = TMDS_NONE;
 	info->BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
 	info->BiosConnector[0].valid = TRUE;
 
-	info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
+	info->BiosConnector[1].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
 	info->BiosConnector[1].DACType = DAC_TVDAC;
 	info->BiosConnector[1].TMDSType = TMDS_NONE;
 	info->BiosConnector[1].ConnectorType = CONNECTOR_VGA;
@@ -1801,17 +1790,17 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
 	info->BiosConnector[2].DACType = DAC_TVDAC;
 	info->BiosConnector[2].TMDSType = TMDS_NONE;
-	info->BiosConnector[2].ddc_line = 0;
+	info->BiosConnector[2].ddc_i2c.valid = FALSE;
 	info->BiosConnector[2].valid = TRUE;
 	return TRUE;
     case RADEON_MAC_POWERBOOK_EXTERNAL:
-	info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
+	info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
 	info->BiosConnector[0].DACType = DAC_NONE;
 	info->BiosConnector[0].TMDSType = TMDS_NONE;
 	info->BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
 	info->BiosConnector[0].valid = TRUE;
 
-	info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
+	info->BiosConnector[1].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
 	info->BiosConnector[1].DACType = DAC_PRIMARY;
 	info->BiosConnector[1].TMDSType = TMDS_EXT;
 	info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
@@ -1820,18 +1809,18 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
 	info->BiosConnector[2].DACType = DAC_TVDAC;
 	info->BiosConnector[2].TMDSType = TMDS_NONE;
-	info->BiosConnector[2].ddc_line = 0;
+	info->BiosConnector[2].ddc_i2c.valid = FALSE;
 	info->BiosConnector[2].valid = TRUE;
 	return TRUE;
 
     case RADEON_MAC_POWERBOOK_INTERNAL:
-	info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
+	info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
 	info->BiosConnector[0].DACType = DAC_NONE;
 	info->BiosConnector[0].TMDSType = TMDS_NONE;
 	info->BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
 	info->BiosConnector[0].valid = TRUE;
 
-	info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
+	info->BiosConnector[1].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
 	info->BiosConnector[1].DACType = DAC_PRIMARY;
 	info->BiosConnector[1].TMDSType = TMDS_INT;
 	info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
@@ -1840,17 +1829,17 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
 	info->BiosConnector[2].DACType = DAC_TVDAC;
 	info->BiosConnector[2].TMDSType = TMDS_NONE;
-	info->BiosConnector[2].ddc_line = 0;
+	info->BiosConnector[2].ddc_i2c.valid = FALSE;
 	info->BiosConnector[2].valid = TRUE;
 	return TRUE;
     case RADEON_MAC_POWERBOOK_VGA:
-	info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC;
+	info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
 	info->BiosConnector[0].DACType = DAC_NONE;
 	info->BiosConnector[0].TMDSType = TMDS_NONE;
 	info->BiosConnector[0].ConnectorType = CONNECTOR_VGA;
 	info->BiosConnector[0].valid = TRUE;
 
-	info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC;
+	info->BiosConnector[1].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
 	info->BiosConnector[1].DACType = DAC_PRIMARY;
 	info->BiosConnector[1].TMDSType = TMDS_INT;
 	info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I;
@@ -1859,11 +1848,11 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
 	info->BiosConnector[2].DACType = DAC_TVDAC;
 	info->BiosConnector[2].TMDSType = TMDS_NONE;
-	info->BiosConnector[2].ddc_line = 0;
+	info->BiosConnector[2].ddc_i2c.valid = FALSE;
 	info->BiosConnector[2].valid = TRUE;
 	return TRUE;
     case RADEON_MAC_MINI_EXTERNAL:
-	info->BiosConnector[0].ddc_line = RADEON_GPIO_CRT2_DDC;
+	info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_CRT2_DDC);
 	info->BiosConnector[0].DACType = DAC_TVDAC;
 	info->BiosConnector[0].TMDSType = TMDS_EXT;
 	info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I;
@@ -1872,11 +1861,11 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[1].ConnectorType = CONNECTOR_STV;
 	info->BiosConnector[1].DACType = DAC_TVDAC;
 	info->BiosConnector[1].TMDSType = TMDS_NONE;
-	info->BiosConnector[1].ddc_line = 0;
+	info->BiosConnector[1].ddc_i2c.valid = FALSE;
 	info->BiosConnector[1].valid = TRUE;
 	return TRUE;
     case RADEON_MAC_MINI_INTERNAL:
-	info->BiosConnector[0].ddc_line = RADEON_GPIO_CRT2_DDC;
+	info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_CRT2_DDC);
 	info->BiosConnector[0].DACType = DAC_TVDAC;
 	info->BiosConnector[0].TMDSType = TMDS_INT;
 	info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I;
@@ -1885,17 +1874,17 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[1].ConnectorType = CONNECTOR_STV;
 	info->BiosConnector[1].DACType = DAC_TVDAC;
 	info->BiosConnector[1].TMDSType = TMDS_NONE;
-	info->BiosConnector[1].ddc_line = 0;
+	info->BiosConnector[1].ddc_i2c.valid = FALSE;
 	info->BiosConnector[1].valid = TRUE;
 	return TRUE;
     case RADEON_MAC_IMAC_G5_ISIGHT:
-	info->BiosConnector[0].ddc_line = RADEON_GPIO_MONID;
+	info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_MONID);
 	info->BiosConnector[0].DACType = DAC_NONE;
 	info->BiosConnector[0].TMDSType = TMDS_INT;
 	info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_D;
 	info->BiosConnector[0].valid = TRUE;
 
-	info->BiosConnector[1].ddc_line = RADEON_GPIO_DVI_DDC;
+	info->BiosConnector[1].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_DVI_DDC);
 	info->BiosConnector[1].DACType = DAC_TVDAC;
 	info->BiosConnector[1].TMDSType = TMDS_NONE;
 	info->BiosConnector[1].ConnectorType = CONNECTOR_VGA;
@@ -1904,7 +1893,7 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn)
 	info->BiosConnector[2].ConnectorType = CONNECTOR_STV;
 	info->BiosConnector[2].DACType = DAC_TVDAC;
 	info->BiosConnector[2].TMDSType = TMDS_NONE;
-	info->BiosConnector[2].ddc_line = 0;
+	info->BiosConnector[2].ddc_i2c.valid = FALSE;
 	info->BiosConnector[2].valid = TRUE;
 	return TRUE;
     default:
@@ -1921,7 +1910,7 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn)
     RADEONEntPtr pRADEONEnt  = RADEONEntPriv(pScrn);
 
     if (!pRADEONEnt->HasCRTC2) {
-	info->BiosConnector[0].ddc_line = RADEON_GPIO_VGA_DDC;
+	info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_VGA_DDC);
 	info->BiosConnector[0].DACType = DAC_PRIMARY;
 	info->BiosConnector[0].TMDSType = TMDS_NONE;
 	info->BiosConnector[0].ConnectorType = CONNECTOR_VGA;
@@ -1931,28 +1920,28 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn)
 
     if (IS_AVIVO_VARIANT) {
 	if (info->IsMobility) {
-	    info->BiosConnector[0].ddc_line = 0x7e60;
+	    info->BiosConnector[0].ddc_i2c = legacy_setup_i2c_bus(0x7e60);
 	    info->BiosConnector[0].DACType = DAC_NONE;
 	    info->BiosConnector[0].TMDSType = TMDS_NONE;
 	    info->BiosConnector[0].ConnectorType = CONNECTOR_LVDS;
 	    info->BiosConnector[0].devices = ATOM_DEVICE_LCD1_SUPPORT;
 	    info->BiosConnector[0].valid = TRUE;
 
-	    info->BiosConnector[1].ddc_line = 0x7e40;
+	    info->BiosConnector[1].ddc_i2c = legacy_setup_i2c_bus(0x7e40);
 	    info->BiosConnector[1].DACType = DAC_PRIMARY;
 	    info->BiosConnector[1].TMDSType = TMDS_NONE;
 	    info->BiosConnector[1].ConnectorType = CONNECTOR_VGA;


Reply to: