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

Alex Deucher agd5f at kemper.freedesktop.org
Sun Sep 30 10:21:29 PDT 2007


 src/radeon.h        |    9 +
 src/radeon_bios.c   |  359 +++++++++++++++++++---------------------------------
 src/radeon_driver.c |    8 -
 src/radeon_output.c |  111 +++++++++++++++-
 src/radeon_probe.h  |    5 
 5 files changed, 261 insertions(+), 231 deletions(-)

New commits:
diff-tree 22519fde1e002f28d6036d448fcd18452d00f1bb (from dcc376e2d2a13329dd03f1bc4b471329757a6f5f)
Author: Alex Deucher <alex at botch2.(none)>
Date:   Sun Sep 30 13:11:20 2007 -0400

    RADEON: add support for ext tmds table and ext tmds chip init
    
    This probably won't work on all chips as the various gpio lines
    seem to need special magic to to actually talk to the i2c slave
    chips.

diff --git a/src/radeon.h b/src/radeon.h
index cec06e9..288fe00 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -950,6 +950,15 @@ extern Bool RADEONInit2(ScrnInfoPtr pScr
 			DisplayModePtr crtc2, int crtc_mask,
 			RADEONSavePtr save, RADEONMonitorType montype);
 
+extern Bool
+RADEONDVOReadByte(I2CDevPtr dvo, int addr, CARD8 *ch);
+extern Bool
+RADEONDVOWriteByte(I2CDevPtr dvo, int addr, CARD8 ch);
+extern Bool
+RADEONGetExtTMDSInfoFromBIOS (xf86OutputPtr output);
+extern Bool
+RADEONInitExtTMDSInfoFromBIOS (xf86OutputPtr output);
+
 void
 radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y);
 void
diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index e106a16..cfa5d2b 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -672,6 +672,139 @@ Bool RADEONGetTMDSInfoFromBIOS (xf86Outp
     return FALSE;
 }
 
+Bool RADEONGetExtTMDSInfoFromBIOS (xf86OutputPtr output)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    RADEONInfoPtr info = RADEONPTR(pScrn);
+    RADEONOutputPrivatePtr radeon_output = output->driver_private;
+    int offset, table_start, max_freq, gpio_reg, flags;
+
+    if (!info->VBIOS) return FALSE;
+
+    if (info->IsAtomBios) {
+	return FALSE;
+    } else {
+	offset = RADEON_BIOS16(info->ROMHeaderStart + 0x58);
+	if (offset) {
+	     xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+			"External TMDS Table revision: %d\n",
+			RADEON_BIOS8(offset));
+	    table_start = offset+4;
+	    max_freq = RADEON_BIOS16(table_start);
+	    radeon_output->dvo_i2c_slave_addr = RADEON_BIOS8(table_start+2);
+	    gpio_reg = RADEON_BIOS8(table_start+3);
+	    if (gpio_reg == 1)
+		radeon_output->dvo_i2c_reg = RADEON_GPIO_MONID;
+	    else if (gpio_reg == 2)
+		radeon_output->dvo_i2c_reg = RADEON_GPIO_DVI_DDC;
+	    else if (gpio_reg == 3)
+		radeon_output->dvo_i2c_reg = RADEON_GPIO_VGA_DDC;
+	    else if (gpio_reg == 4)
+		radeon_output->dvo_i2c_reg = 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);
+		return FALSE;
+	    }
+	    flags = RADEON_BIOS8(table_start+5);
+	    radeon_output->dvo_duallink = flags & 0x01;
+	    if (radeon_output->dvo_duallink) {
+		xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+			   "Duallink TMDS detected\n");
+	    }
+	    return TRUE;
+	}
+    }
+
+    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+	       "No External TMDS Table found\n");
+
+    return FALSE;
+}
+
+Bool RADEONInitExtTMDSInfoFromBIOS (xf86OutputPtr output)
+{
+    ScrnInfoPtr pScrn = output->scrn;
+    RADEONInfoPtr info = RADEONPTR(pScrn);
+    unsigned char *RADEONMMIO = info->MMIO;
+    RADEONOutputPrivatePtr radeon_output = output->driver_private;
+    int offset, index, id;
+    CARD32 val, reg, andmask, ormask;
+
+    if (!info->VBIOS) return FALSE;
+
+    if (info->IsAtomBios) {
+	return FALSE;
+    } else {
+	offset = RADEON_BIOS16(info->ROMHeaderStart + 0x58);
+	if (offset) {
+	    index = offset+10;
+	    id = RADEON_BIOS16(index);
+	    while (id != 0xffff) {
+		index += 2;
+		switch(id >> 13) {
+		case 0:
+		    reg = id & 0x1fff;
+		    val = RADEON_BIOS32(index);
+		    index += 4;
+		    ErrorF("WRITE INDEXED: 0x%x 0x%x\n",
+			   reg, (unsigned)val);
+		    /*OUTREG(reg, val);*/
+		    break;
+		case 2:
+		    reg = id & 0x1fff;
+		    andmask = RADEON_BIOS32(index);
+		    index += 4;
+		    ormask = RADEON_BIOS32(index);
+		    index += 4;
+		    val = INREG(reg);
+		    val = (val & andmask) | ormask;
+		    ErrorF("MASK DIRECT: 0x%x 0x%x 0x%x\n",
+			   reg, (unsigned)andmask, (unsigned)ormask);
+		    /*OUTREG(reg, val);*/
+		    break;
+		case 4:
+		    val = RADEON_BIOS16(index);
+		    index += 2;
+		    ErrorF("delay: %d\n", val);
+		    usleep(val);
+		    break;
+		case 5:
+		    reg = id & 0x1fff;
+		    andmask = RADEON_BIOS32(index);
+		    index += 4;
+		    ormask = RADEON_BIOS32(index);
+		    index += 4;
+		    ErrorF("MASK PLL: 0x%x 0x%x 0x%x\n",
+			   reg, (unsigned)andmask, (unsigned)ormask);
+		    /*val = INPLL(pScrn, reg);
+		    val = (val & andmask) | ormask;
+		    OUTPLL(pScrn, reg, val);*/
+		    break;
+		case 6:
+		    reg = id & 0x1fff;
+		    val = RADEON_BIOS8(index);
+		    index += 1;
+		    ErrorF("i2c write: 0x%x, 0x%x\n", reg, val);
+		    RADEONDVOWriteByte(radeon_output->DVOChip, reg, val);
+		    break;
+		default:
+		    ErrorF("unknown id %d\n", id>>13);
+		    return FALSE;
+		};
+		id = RADEON_BIOS16(index);
+	    }
+	    return TRUE;
+	}
+    }
+
+    return FALSE;
+}
+
 /* support for init from bios tables
  *
  * Based heavily on the netbsd radeonfb driver
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index a8a3d39..b7e2684 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -2755,10 +2755,10 @@ _X_EXPORT Bool RADEONPreInit(ScrnInfoPtr
    }
 
     /* Free the video bios (if applicable) */
-    if (info->VBIOS) {
-	xfree(info->VBIOS);
-	info->VBIOS = NULL;
-    }
+    //if (info->VBIOS) {
+    //xfree(info->VBIOS);
+    //info->VBIOS = NULL;
+    //}
 
 				/* Free int10 info */
     if (pInt10)
diff --git a/src/radeon_output.c b/src/radeon_output.c
index fd94266..6d46a98 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -154,6 +154,87 @@ static RADEONMonitorType radeon_detect_t
 static RADEONMonitorType radeon_detect_ext_dac(ScrnInfoPtr pScrn);
 static void RADEONGetTMDSInfoFromTable(xf86OutputPtr output);
 
+Bool
+RADEONDVOReadByte(I2CDevPtr dvo, int addr, CARD8 *ch)
+{
+    if (!xf86I2CReadByte(dvo, addr, ch)) {
+	xf86DrvMsg(dvo->pI2CBus->scrnIndex, X_ERROR,
+		   "Unable to read from %s Slave %d.\n",
+		   dvo->pI2CBus->BusName, dvo->SlaveAddr);
+	return FALSE;
+    }
+    return TRUE;
+}
+
+Bool
+RADEONDVOWriteByte(I2CDevPtr dvo, int addr, CARD8 ch)
+{
+    if (!xf86I2CWriteByte(dvo, addr, ch)) {
+	xf86DrvMsg(dvo->pI2CBus->scrnIndex, X_ERROR,
+		   "Unable to write to %s Slave %d.\n",
+		   dvo->pI2CBus->BusName, dvo->SlaveAddr);
+	return FALSE;
+    }
+    return TRUE;
+}
+
+static I2CDevPtr
+RADEONDVODeviceInit(I2CBusPtr b, I2CSlaveAddr addr)
+{
+    I2CDevPtr dvo;
+
+    dvo = xcalloc(1, sizeof(I2CDevRec));
+    if (dvo == NULL)
+	return NULL;
+
+    dvo->DevName = "RADEON DVO Controller";
+    dvo->SlaveAddr = addr;
+    dvo->pI2CBus = b;
+    dvo->StartTimeout = b->StartTimeout;
+    dvo->BitTimeout = b->BitTimeout;
+    dvo->AcknTimeout = b->AcknTimeout;
+    dvo->ByteTimeout = b->ByteTimeout;
+
+    if (xf86I2CDevInit(dvo)) {
+	return dvo;
+    }
+
+    xfree(dvo);
+    return NULL;
+}
+
+void
+RADEONRestoreDVOChip(ScrnInfoPtr pScrn, xf86OutputPtr output)
+{
+    RADEONInfoPtr info = RADEONPTR(pScrn);
+    unsigned char *RADEONMMIO = info->MMIO;
+    RADEONOutputPrivatePtr radeon_output = output->driver_private;
+
+    if (!radeon_output->DVOChip)
+	return;
+
+    OUTREG(radeon_output->dvo_i2c_reg, INREG(radeon_output->dvo_i2c_reg) &
+	   (CARD32)~(RADEON_GPIO_A_0 | RADEON_GPIO_A_1));
+
+    if (!RADEONInitExtTMDSInfoFromBIOS(output)) {
+	/* do mac stuff here */
+#if defined(__powerpc__)
+	if (radeon_output->DVOChip) {
+	    switch(info->MacModel) {
+	    case RADEON_MAC_POWERBOOK_DL:
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x08, 0x30);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x09, 0x00);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0a, 0x90);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0c, 0x89);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x08, 0x3b);
+		break;
+	    default:
+	    }
+	}
+#endif
+    }
+}
+
 void RADEONPrintPortMap(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr info       = RADEONPTR(pScrn);
@@ -796,6 +877,14 @@ static void RADEONInitFP2Registers(xf86O
 			    RADEON_FP2_DVO_EN |
 			    RADEON_FP2_DVO_RATE_SEL_SDR);
 
+#if 0
+    /* XXX: these may be chip specific */
+    save->fp2_gen_cntl |= (1 << 22) | R200_FP2_DVO_CLOCK_MODE_SINGLE;
+
+    if (mode->Clock > 165000)
+	save->fp2_gen_cntl |= R200_FP2_DVO_DUAL_CHANNEL_EN;
+#endif
+
     if (IsPrimary) {
         if ((info->ChipFamily == CHIP_FAMILY_R200) || IS_R300_VARIANT) {
             save->fp2_gen_cntl &= ~R200_FP2_SOURCE_SEL_MASK;
@@ -1062,6 +1151,7 @@ radeon_mode_set(xf86OutputPtr output, Di
 	    RADEONRestoreFPRegisters(pScrn, &info->ModeReg);
 	} else {
 	    ErrorF("restore FP2\n");
+	    RADEONRestoreDVOChip(pScrn, output);
 	    RADEONRestoreFP2Registers(pScrn, &info->ModeReg);
 	}
 	break;
@@ -2489,8 +2579,27 @@ void RADEONInitConnector(xf86OutputPtr o
     }
 
     if (radeon_output->type == OUTPUT_DVI) {
+	I2CBusPtr pDVOBus;
 	radeon_output->rmx_type = RMX_OFF;
-	RADEONGetTMDSInfo(output);
+	if (radeon_output->TMDSType == TMDS_EXT) {
+#if defined(__powerpc__)
+	    radeon_output->dvo_i2c_reg = 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_slave_addr = 0x70;
+	    }
+#endif
+	    if (RADEONI2CInit(pScrn, &pDVOBus, radeon_output->dvo_i2c_reg, "DVO")) {
+		radeon_output->DVOChip =
+		    RADEONDVODeviceInit(pDVOBus,
+					radeon_output->dvo_i2c_slave_addr);
+		if (!radeon_output->DVOChip)
+		    xfree(pDVOBus);
+	    }
+	} else
+	    RADEONGetTMDSInfo(output);
     }
 
     if (radeon_output->type == OUTPUT_STV ||
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index ec895e4..dbd50d7 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -205,6 +205,11 @@ typedef struct _RADEONOutputPrivateRec {
     int               DotClock;
     RADEONTMDSPll     tmds_pll[4];
     RADEONRMXType     rmx_type;
+    /* dvo */
+    I2CDevPtr         DVOChip;
+    int               dvo_i2c_reg;
+    int               dvo_i2c_slave_addr;
+    Bool              dvo_duallink;
     /* TV out */
     TVStd             default_tvStd;
     TVStd             tvStd;
diff-tree dcc376e2d2a13329dd03f1bc4b471329757a6f5f (from 99ceaefa18c6e07b55106cca0ea8996fa73667be)
Author: Alex Deucher <alex at botch2.(none)>
Date:   Wed Sep 26 23:27:38 2007 -0400

    RADEON: remove cruft

diff --git a/src/radeon_bios.c b/src/radeon_bios.c
index 48758c5..e106a16 100644
--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -41,20 +41,6 @@
 #include "radeon_probe.h"
 #include "vbe.h"
 
-int RADEONBIOSApplyConnectorQuirks(ScrnInfoPtr pScrn, int connector_found)
-{
-    RADEONInfoPtr  info   = RADEONPTR(pScrn);
-
-    /* quirk for compaq nx6125 - the bios lies about the VGA DDC */
-    if (info->PciInfo->subsysVendor == PCI_VENDOR_HP) {
-      if (info->PciInfo->subsysCard == 0x308b) {
-	if (info->BiosConnector[1].DDCType == DDC_CRT2)
-	  info->BiosConnector[1].DDCType = DDC_MONID;
-      }
-    }
-    return connector_found;
-}
-
 /* Read the Video BIOS block and the FP registers (if applicable). */
 Bool RADEONGetBIOSInfo(ScrnInfoPtr pScrn, xf86Int10InfoPtr  pInt10)
 {
@@ -332,218 +318,6 @@ Bool RADEONGetConnectorInfoFromBIOS (Scr
 	return RADEONGetLegacyConnectorInfoFromBIOS(pScrn);
 }
 
-#if 0
-Bool RADEONGetConnectorInfoFromBIOS (ScrnInfoPtr pScrn)
-{
-    RADEONInfoPtr info = RADEONPTR (pScrn);
-    int i = 0, j, tmp, tmp0=0, tmp1=0;
-    RADEONBIOSConnector tempConnector;
-
-    if(!info->VBIOS) return FALSE;
-
-    if (info->IsAtomBios) {
-	if((tmp = RADEON_BIOS16 (info->MasterDataStart + 22))) {
-	    int crtc = 0, id[2];
-	    tmp1 = RADEON_BIOS16 (tmp + 4);
-	    for (i=0; i<8; i++) {
-		if(tmp1 & (1<<i)) {
-		    CARD16 portinfo = RADEON_BIOS16(tmp+6+i*2);
-		    if (crtc < 2) {
-			if ((i==2) || (i==6)) continue; /* ignore TV here */
-
-			if (crtc == 1) {
-			    /* sharing same port with id[0] */
-			    if (((portinfo>>8) & 0xf) == id[0]) {
-				if (i == 3) 
-				    info->BiosConnector[0].TMDSType = TMDS_INT;
-				else if (i == 7)
-				    info->BiosConnector[0].TMDSType = TMDS_EXT;
-
-				if (info->BiosConnector[0].DACType == DAC_UNKNOWN)
-				    info->BiosConnector[0].DACType = (portinfo & 0xf) - 1;
-				continue;
-			    }
-			}
-
-			id[crtc] = (portinfo>>8) & 0xf; 
-			info->BiosConnector[crtc].DACType = (portinfo & 0xf) - 1;
-			info->BiosConnector[crtc].ConnectorType = (portinfo>>4) & 0xf;
-			if (i == 3) 
-			    info->BiosConnector[crtc].TMDSType = TMDS_INT;
-			else if (i == 7)
-			    info->BiosConnector[crtc].TMDSType = TMDS_EXT;
-			
-			if((tmp0 = RADEON_BIOS16 (info->MasterDataStart + 24)) && id[crtc]) {
-			    switch (RADEON_BIOS16 (tmp0 + 4 + 27 * id[crtc]) * 4) 
-			    {
-			    case RADEON_GPIO_MONID:
-				info->BiosConnector[crtc].DDCType = DDC_MONID;
-				break;
-			    case RADEON_GPIO_DVI_DDC:
-				info->BiosConnector[crtc].DDCType = DDC_DVI;
-				break;
-			    case RADEON_GPIO_VGA_DDC:
-				info->BiosConnector[crtc].DDCType = DDC_VGA;
-				break;
-			    case RADEON_GPIO_CRT2_DDC:
-				info->BiosConnector[crtc].DDCType = DDC_CRT2;
-				break;
-			    case RADEON_LCD_GPIO_MASK:
-				info->BiosConnector[crtc].DDCType = DDC_LCD;
-				break;
-			    default:
-				info->BiosConnector[crtc].DDCType = DDC_NONE_DETECTED;
-				break;
-			    }
-
-			} else {
-			    info->BiosConnector[crtc].DDCType = DDC_NONE_DETECTED;
-			}
-			crtc++;
-		    } else {
-			/* we have already had two CRTCs assigned. the rest may share the same
-			 * port with the existing connector, fill in them accordingly.
-			 */
-			for (j=0; j<2; j++) {
-			    if (((portinfo>>8) & 0xf) == id[j]) {
-				if (i == 3) 
-				    info->BiosConnector[j].TMDSType = TMDS_INT;
-				else if (i == 7)
-				    info->BiosConnector[j].TMDSType = TMDS_EXT;
-
-				if (info->BiosConnector[j].DACType == DAC_UNKNOWN)
-				    info->BiosConnector[j].DACType = (portinfo & 0xf) - 1;
-			    }
-			}
-		    }
-		}
-	    }
-
-	    /* R4xx seem to get the connector table backwards */
-	    tempConnector = info->BiosConnector[0];
-	    info->BiosConnector[0] = info->BiosConnector[1];
-	    info->BiosConnector[1] = tempConnector;
-
-	    xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Bios Connector table: \n");
-	    for (i=0; i<2; i++) {
-		xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Port%d: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
-			   i, info->BiosConnector[i].DDCType, info->BiosConnector[i].DACType,
-			   info->BiosConnector[i].TMDSType, info->BiosConnector[i].ConnectorType);
-	    }	    
-	} else {
-	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No Device Info Table found!\n");
-	    return FALSE;
-	}
-    } else {
-	/* Some laptops only have one connector (VGA) listed in the connector table, 
-	 * we need to add LVDS in as a non-DDC display. 
-	 * Note, we can't assume the listed VGA will be filled in PortInfo[0],
-	 * when walking through connector table. connector_found has following meaning: 
-	 * 0 -- nothing found, 
-	 * 1 -- only PortInfo[0] filled, 
-	 * 2 -- only PortInfo[1] filled,
-	 * 3 -- both are filled.
-	 */
-	int connector_found = 0;
-
-	if ((tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x50))) {
-	    for (i = 1; i < 4; i++) {
-
-		if (!RADEON_BIOS16(tmp + i*2))
-			break; /* end of table */
-		
-		tmp0 = RADEON_BIOS16(tmp + i*2);
-		if (((tmp0 >> 12) & 0x0f) == 0) continue;     /* no connector */
-		if (connector_found > 0) {
-		    if (info->BiosConnector[tmp1].DDCType == ((tmp0 >> 8) & 0x0f))
-			continue;                             /* same connector */
-		}
-
-		/* internal DDC_DVI port will get assigned to PortInfo[0], or if there is no DDC_DVI (like in some IGPs). */
-		tmp1 = ((((tmp0 >> 8) & 0xf) == DDC_DVI) || (tmp1 == 1)) ? 0 : 1; /* determine port info index */
-		
-		info->BiosConnector[tmp1].DDCType        = (tmp0 >> 8) & 0x0f;
-		if (info->BiosConnector[tmp1].DDCType > DDC_CRT2)
-		    info->BiosConnector[tmp1].DDCType = DDC_NONE_DETECTED;
-		info->BiosConnector[tmp1].DACType        = (tmp0 & 0x01) ? DAC_TVDAC : DAC_PRIMARY;
-		info->BiosConnector[tmp1].ConnectorType  = (tmp0 >> 12) & 0x0f;
-		if (info->BiosConnector[tmp1].ConnectorType > CONNECTOR_UNSUPPORTED)
-		    info->BiosConnector[tmp1].ConnectorType = CONNECTOR_UNSUPPORTED;
-		info->BiosConnector[tmp1].TMDSType       = ((tmp0 >> 4) & 0x01) ? TMDS_EXT : TMDS_INT;
-
-		/* some sanity checks */
-		if (((info->BiosConnector[tmp1].ConnectorType != CONNECTOR_DVI_D) &&
-		     (info->BiosConnector[tmp1].ConnectorType != CONNECTOR_DVI_I)) &&
-		    info->BiosConnector[tmp1].TMDSType == TMDS_INT)
-		    info->BiosConnector[tmp1].TMDSType = TMDS_UNKNOWN;
-		
-		connector_found += (tmp1 + 1);
-	    }
-	} else {
-	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No Connector Info Table found!\n");
-	    return FALSE;
-	}
-
-	if (info->IsMobility) {
-	    if ((tmp = RADEON_BIOS16(info->ROMHeaderStart + 0x42))) {
-	        if ((tmp0 = RADEON_BIOS16(tmp + 0x15))) {
-		    if ((tmp1 = RADEON_BIOS8(tmp0+2) & 0x07)) {	    
-			info->BiosConnector[0].DDCType	= tmp1;      
-			if (info->BiosConnector[0].DDCType > DDC_LCD) {
-			    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-				       "Unknown DDCType %d found\n",
-				       info->BiosConnector[0].DDCType);
-			    info->BiosConnector[0].DDCType = DDC_NONE_DETECTED;
-			}
-			xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "LCD DDC Info Table found!\n");
-		    }
-		}
-	    } 
-	} else if (connector_found == 2) {
-	    memcpy (&info->BiosConnector[0], &info->BiosConnector[1], 
-		    sizeof (info->BiosConnector[0]));	
-	    info->BiosConnector[1].DACType = DAC_UNKNOWN;
-	    info->BiosConnector[1].TMDSType = TMDS_UNKNOWN;
-	    info->BiosConnector[1].DDCType = DDC_NONE_DETECTED;
-	    info->BiosConnector[1].ConnectorType = CONNECTOR_NONE;
-	    connector_found = 1;
-	}
-
-	connector_found = RADEONBIOSApplyConnectorQuirks(pScrn, connector_found);
-	
-	if (connector_found == 0) {
-	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No connector found in Connector Info Table.\n");
-	} else {
-	    xf86DrvMsg(0, X_INFO, "Bios Connector0: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
-		       info->BiosConnector[0].DDCType, info->BiosConnector[0].DACType,
-		       info->BiosConnector[0].TMDSType, info->BiosConnector[0].ConnectorType);
-	}
-	if (connector_found == 3) {
-	    xf86DrvMsg(0, X_INFO, "Bios Connector1: DDCType-%d, DACType-%d, TMDSType-%d, ConnectorType-%d\n",
-		       info->BiosConnector[1].DDCType, info->BiosConnector[1].DACType,
-		       info->BiosConnector[1].TMDSType, info->BiosConnector[1].ConnectorType);
-	}
-
-#if 0
-/* External TMDS Table, not used now */
-        if ((tmp0 = RADEON_BIOS16(info->ROMHeaderStart + 0x58))) {
-
-            //info->BiosConnector[1].DDCType = (RADEON_BIOS8(tmp0 + 7) & 0x07);
-            //info->BiosConnector[1].ConnectorType  = CONNECTOR_DVI_I;
-            //info->BiosConnector[1].TMDSType = TMDS_EXT;
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO, "External TMDS found.\n");
-
-        } else {
-            xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NO External TMDS Info found\n");
-
-        }
-#endif
-
-    }
-    return TRUE;
-}
-#endif
-
 Bool RADEONGetTVInfoFromBIOS (xf86OutputPtr output) {
     ScrnInfoPtr pScrn = output->scrn;
     RADEONInfoPtr  info       = RADEONPTR(pScrn);


More information about the xorg-commit mailing list