diff options
author | Dave Airlie <airlied@redhat.com> | 2008-03-31 14:11:49 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-03-31 14:11:49 +1000 |
commit | 18f5f1cd2f52afed89fc11ade0920f3dfea87306 (patch) | |
tree | ab8f3147af0d5d8668899f63e1ee1018dadeb00a /src | |
parent | c2b1c8b706a6c7c1fd0af80091958473133d54e7 (diff) |
radeon: split quirks into separate function and new quirk for IBM RN50
Add a connector table quirk for the IBM RN50.
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_bios.c | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/src/radeon_bios.c b/src/radeon_bios.c index 6bd526a5..f97ed2ff 100644 --- a/src/radeon_bios.c +++ b/src/radeon_bios.c @@ -217,6 +217,44 @@ static Bool RADEONGetATOMConnectorInfoFromBIOS (ScrnInfoPtr pScrn) return FALSE; } +static void RADEONApplyLegacyQuirks(ScrnInfoPtr pScrn, int index) +{ + RADEONInfoPtr info = RADEONPTR (pScrn); + + /* most XPRESS chips seem to specify DDC_CRT2 for their + * VGA DDC port, however DDC never seems to work on that + * port. Some have reported success on DDC_MONID, so + * lets see what happens with that. + */ + if (info->ChipFamily == CHIP_FAMILY_RS400 && + info->BiosConnector[index].ConnectorType == CONNECTOR_VGA && + info->BiosConnector[index].ddc_i2c.mask_clk_reg == RADEON_GPIO_CRT2_DDC) { + info->BiosConnector[index].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_MONID); + } + + /* XPRESS desktop chips seem to have a proprietary connector listed for + * DVI-D, try and do the right thing here. + */ + if ((!info->IsMobility) && + (info->BiosConnector[index].ConnectorType == CONNECTOR_LVDS)) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Proprietary connector found, assuming DVI-D\n"); + info->BiosConnector[index].DACType = DAC_NONE; + info->BiosConnector[index].TMDSType = TMDS_EXT; + info->BiosConnector[index].ConnectorType = CONNECTOR_DVI_D; + } + + /* Certain IBM chipset RN50s have a BIOS reporting two VGAs, + one with VGA DDC and one with CRT2 DDC. - kill the CRT2 DDC one */ + if (info->Chipset == PCI_CHIP_RN50_515E && + PCI_SUB_VENDOR_ID(info->PciInfo) == 0x1014) { + if (info->BiosConnector[index].ConnectorType == CONNECTOR_VGA && + info->BiosConnector[index].ddc_i2c.mask_clk_reg == RADEON_GPIO_CRT2_DDC) { + info->BiosConnector[index].valid = FALSE; + } + } +} + static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR (pScrn); @@ -298,28 +336,8 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn) else info->BiosConnector[i].TMDSType = TMDS_INT; - /* most XPRESS chips seem to specify DDC_CRT2 for their - * VGA DDC port, however DDC never seems to work on that - * port. Some have reported success on DDC_MONID, so - * lets see what happens with that. - */ - if (info->ChipFamily == CHIP_FAMILY_RS400 && - info->BiosConnector[i].ConnectorType == CONNECTOR_VGA && - info->BiosConnector[i].ddc_i2c.mask_clk_reg == RADEON_GPIO_CRT2_DDC) { - info->BiosConnector[i].ddc_i2c = legacy_setup_i2c_bus(RADEON_GPIO_MONID); - } + RADEONApplyLegacyQuirks(pScrn, i); - /* XPRESS desktop chips seem to have a proprietary connector listed for - * DVI-D, try and do the right thing here. - */ - if ((!info->IsMobility) && - (info->BiosConnector[i].ConnectorType == CONNECTOR_LVDS)) { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Proprietary connector found, assuming DVI-D\n"); - info->BiosConnector[i].DACType = DAC_NONE; - info->BiosConnector[i].TMDSType = TMDS_EXT; - info->BiosConnector[i].ConnectorType = CONNECTOR_DVI_D; - } } } else { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "No Connector Info Table found!\n"); |