xf86-video-ati: Branch 'master'

Dave Airlie airlied at kemper.freedesktop.org
Thu Apr 16 17:26:44 PDT 2009


 src/radeon_output.c |   26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)

New commits:
commit a846ec14dd65bb12f314f83ffb45c4c4be564a5e
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Apr 17 10:24:15 2009 +1000

    radeon: fix DDC on rv410 VGA ports for non-atom use.
    
    The rv410 hw i2c block appears to hold down whatever i2c lines
    it is connected to when in reset, so when doing DDC change hw i2c to
    point at different i2c lines.

diff --git a/src/radeon_output.c b/src/radeon_output.c
index a25517a..c6ae2ae 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -217,23 +217,21 @@ radeon_ddc_connected(xf86OutputPtr output)
     RADEONMonitorType MonType = MT_NONE;
     xf86MonPtr MonInfo = NULL;
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
+    unsigned char *RADEONMMIO = info->MMIO;
 
     if (radeon_output->pI2CBus) {
-	/* RV410 RADEON_GPIO_VGA_DDC seems to only work via hw i2c
-	 * We may want to extend this to other cases if the need arises...
-	 */
-	if ((info->ChipFamily == CHIP_FAMILY_RV410) &&
-	    (radeon_output->ddc_i2c.mask_clk_reg == RADEON_GPIO_VGA_DDC) &&
-	    info->IsAtomBios)
-	    MonInfo = radeon_atom_get_edid(output);
-	else if (info->get_hardcoded_edid_from_bios) {
+	/* RV410 appears to have a bug where the hw i2c in reset
+	 * holds the i2c port in a bad state - switch hw i2c away before
+	 * doing DDC */
+	if (info->ChipFamily == CHIP_FAMILY_RV410) {
+	    if (radeon_output->ddc_i2c.mask_clk_reg == RADEON_GPIO_VGA_DDC)
+                OUTREG(RADEON_DVI_I2C_CNTL_0, 0x30);
+	    else
+                OUTREG(RADEON_DVI_I2C_CNTL_0, 0x20);
+	}	
+	if (info->get_hardcoded_edid_from_bios)
 	    MonInfo = RADEONGetHardCodedEDIDFromBIOS(output);
-	    if (MonInfo == NULL) {
-		RADEONI2CDoLock(output, TRUE);
-		MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
-		RADEONI2CDoLock(output, FALSE);
-	    }
-	} else {
+	if (MonInfo == NULL) {
 	    RADEONI2CDoLock(output, TRUE);
 	    MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus);
 	    RADEONI2CDoLock(output, FALSE);


More information about the xorg-commit mailing list