diff options
author | Alex Deucher <alex@botch2.(none)> | 2007-09-26 23:27:38 -0400 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2007-09-30 13:13:14 -0400 |
commit | dcc376e2d2a13329dd03f1bc4b471329757a6f5f (patch) | |
tree | c4f222aad71f9b061a15b5b86ebbd7bd033f9f69 | |
parent | 99ceaefa18c6e07b55106cca0ea8996fa73667be (diff) |
RADEON: remove cruft
-rw-r--r-- | src/radeon_bios.c | 226 |
1 files changed, 0 insertions, 226 deletions
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 (ScrnInfoPtr pScrn) 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); |