diff options
author | Alex Deucher <alex@botch2.(none)> | 2007-11-18 22:34:59 -0500 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2007-11-18 22:34:59 -0500 |
commit | 760af92412ef0d5cc44e52e7cec11fd80c4aaaeb (patch) | |
tree | 0b023205c5f5ea777bde3fd15edf851e2b01ef0a | |
parent | 2e37937bacd624d616b91c41006c113791ebe98d (diff) |
RADEON: unify DDC line handling
-rw-r--r-- | src/radeon_bios.c | 99 | ||||
-rw-r--r-- | src/radeon_output.c | 119 | ||||
-rw-r--r-- | src/radeon_probe.h | 6 |
3 files changed, 108 insertions, 116 deletions
diff --git a/src/radeon_bios.c b/src/radeon_bios.c index 0e14d947..aaa703b4 100644 --- a/src/radeon_bios.c +++ b/src/radeon_bios.c @@ -204,33 +204,9 @@ static Bool RADEONGetATOMConnectorInfoFromBIOS (ScrnInfoPtr pScrn) id = (portinfo >> 8) & 0xf; tmp0 = RADEON_BIOS16(info->MasterDataStart + 24); gpio = RADEON_BIOS16(tmp0 + 4 + 27 * id) * 4; - info->BiosConnector[i].gpio = gpio; + info->BiosConnector[i].ddc_line = gpio; info->BiosConnector[i].output_id = id; - switch(gpio) { - case RADEON_GPIO_MONID: - info->BiosConnector[i].DDCType = DDC_MONID; - break; - case RADEON_GPIO_DVI_DDC: - info->BiosConnector[i].DDCType = DDC_DVI; - break; - case RADEON_GPIO_VGA_DDC: - info->BiosConnector[i].DDCType = DDC_VGA; - break; - case RADEON_GPIO_CRT2_DDC: - info->BiosConnector[i].DDCType = DDC_CRT2; - break; - case RADEON_LCD_GPIO_MASK: - info->BiosConnector[i].DDCType = DDC_LCD; - break; - case RADEON_MDGPIO_EN_REG: - info->BiosConnector[i].DDCType = DDC_GPIO; - break; - default: - info->BiosConnector[i].DDCType = DDC_NONE_DETECTED; - break; - } - if (i == 3) info->BiosConnector[i].TMDSType = TMDS_INT; else if (i == 7) @@ -271,8 +247,8 @@ static Bool RADEONGetATOMConnectorInfoFromBIOS (ScrnInfoPtr pScrn) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Bios Connector table: \n"); for (i = 0; i < RADEON_MAX_BIOS_CONNECTOR; i++) { if (info->BiosConnector[i].valid) { - 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, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Port%d: DDCType-0x%x, DACType-%d, TMDSType-%d, ConnectorType-%d\n", + i, info->BiosConnector[i].ddc_line, info->BiosConnector[i].DACType, info->BiosConnector[i].TMDSType, info->BiosConnector[i].ConnectorType); } } @@ -284,6 +260,7 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR (pScrn); int offset, i, entry, tmp, tmp0, tmp1; + RADEONDDCType DDCType; if (!info->VBIOS) return FALSE; @@ -298,7 +275,30 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn) info->BiosConnector[i].valid = TRUE; tmp = RADEON_BIOS16(entry); info->BiosConnector[i].ConnectorType = (tmp >> 12) & 0xf; - info->BiosConnector[i].DDCType = (tmp >> 8) & 0xf; + DDCType = (tmp >> 8) & 0xf; + switch (DDCType) { + case DDC_MONID: + info->BiosConnector[i].ddc_line = RADEON_GPIO_MONID; + break; + case DDC_DVI: + info->BiosConnector[i].ddc_line = RADEON_GPIO_DVI_DDC; + break; + case DDC_VGA: + info->BiosConnector[i].ddc_line = RADEON_GPIO_VGA_DDC; + break; + case DDC_CRT2: + info->BiosConnector[i].ddc_line = RADEON_GPIO_CRT2_DDC; + break; + case DDC_LCD: + info->BiosConnector[i].ddc_line = RADEON_LCD_GPIO_MASK; + break; + case DDC_GPIO: + info->BiosConnector[i].ddc_line = RADEON_MDGPIO_EN_REG; + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Unknown DDC Type: %d\n", DDCType); + break; + } info->BiosConnector[i].DACType = tmp & 0x1; info->BiosConnector[i].TMDSType = (tmp >> 4) & 0x1; @@ -309,8 +309,8 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn) */ if (info->ChipFamily == CHIP_FAMILY_RS400 && info->BiosConnector[i].ConnectorType == CONNECTOR_CRT && - info->BiosConnector[i].DDCType == DDC_CRT2) { - info->BiosConnector[i].DDCType = DDC_MONID; + info->BiosConnector[i].ddc_line == RADEON_GPIO_CRT2_DDC) { + info->BiosConnector[i].ddc_line = RADEON_GPIO_MONID; } /* XPRESS desktop chips seem to have a proprietary connector listed for @@ -351,19 +351,36 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn) tmp0 = RADEON_BIOS16(tmp + 0x15); if (tmp0) { tmp1 = RADEON_BIOS8(tmp0+2) & 0x07; - if (tmp1) { - info->BiosConnector[4].DDCType = tmp1; - if (info->BiosConnector[4].DDCType > DDC_GPIO) { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Unknown DDCType %d found\n", - info->BiosConnector[4].DDCType); - info->BiosConnector[4].DDCType = DDC_NONE_DETECTED; + if (tmp1) { + DDCType = tmp1; + switch (DDCType) { + case DDC_MONID: + info->BiosConnector[4].ddc_line = RADEON_GPIO_MONID; + break; + case DDC_DVI: + info->BiosConnector[4].ddc_line = RADEON_GPIO_DVI_DDC; + break; + case DDC_VGA: + info->BiosConnector[4].ddc_line = RADEON_GPIO_VGA_DDC; + break; + case DDC_CRT2: + info->BiosConnector[4].ddc_line = RADEON_GPIO_CRT2_DDC; + break; + case DDC_LCD: + info->BiosConnector[4].ddc_line = RADEON_LCD_GPIO_MASK; + break; + case DDC_GPIO: + info->BiosConnector[4].ddc_line = RADEON_MDGPIO_EN_REG; + break; + default: + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Unknown DDC Type: %d\n", DDCType); + break; } xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "LCD DDC Info Table found!\n"); } } } else { - info->BiosConnector[4].DDCType = DDC_NONE_DETECTED; + info->BiosConnector[4].ddc_line = 0; } } } @@ -378,7 +395,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].DDCType = DDC_NONE_DETECTED; + info->BiosConnector[5].ddc_line = 0; } } } @@ -386,8 +403,8 @@ static Bool RADEONGetLegacyConnectorInfoFromBIOS (ScrnInfoPtr pScrn) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Bios Connector table: \n"); for (i = 0; i < RADEON_MAX_BIOS_CONNECTOR; i++) { if (info->BiosConnector[i].valid) { - 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, + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Port%d: DDCType-0x%x, DACType-%d, TMDSType-%d, ConnectorType-%d\n", + i, info->BiosConnector[i].ddc_line, info->BiosConnector[i].DACType, info->BiosConnector[i].TMDSType, info->BiosConnector[i].ConnectorType); } } diff --git a/src/radeon_output.c b/src/radeon_output.c index 6ac3980b..990b6b9e 100644 --- a/src/radeon_output.c +++ b/src/radeon_output.c @@ -75,16 +75,6 @@ const char *TMDSTypeName[4] = { "None" }; -const char *DDCTypeName[7] = { - "None", - "MONID", - "DVI_DDC", - "VGA_DDC", - "CRT2_DDC", - "LCD_DDC", - "GPIO_DDC" -}; - const char *DACTypeName[4] = { "Unknown", "Primary", @@ -116,7 +106,7 @@ const char *ConnectorTypeNameATOM[10] = { "Unsupported" }; -const char *OutputType[10] = { +const char *OutputType[16] = { "None", "VGA", "DVI", @@ -263,7 +253,7 @@ void RADEONPrintPortMap(ScrnInfoPtr pScrn) radeon_output = output->driver_private; xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "Port%d:\n Monitor -- %s\n Connector -- %s\n DAC Type -- %s\n TMDS Type -- %s\n DDC Type -- %s [0x%x]\n", + "Port%d:\n Monitor -- %s\n Connector -- %s\n DAC Type -- %s\n TMDS Type -- %s\n DDC Type -- 0x%x\n", o, MonTypeName[radeon_output->MonType+1], info->IsAtomBios ? @@ -271,8 +261,7 @@ void RADEONPrintPortMap(ScrnInfoPtr pScrn) ConnectorTypeName[radeon_output->ConnectorType], DACTypeName[radeon_output->DACType+1], TMDSTypeName[radeon_output->TMDSType+1], - DDCTypeName[radeon_output->DDCType], - radeon_output->gpio); + radeon_output->ddc_line); } } @@ -281,16 +270,14 @@ static RADEONMonitorType avivo_display_ddc_connected(ScrnInfoPtr pScrn, xf86OutputPtr output) { RADEONInfoPtr info = RADEONPTR(pScrn); - unsigned long DDCReg; RADEONMonitorType MonType = MT_NONE; xf86MonPtr MonInfo = NULL; RADEONOutputPrivatePtr radeon_output = output->driver_private; - RADEONDDCType DDCType = radeon_output->DDCType; if (radeon_output->pI2CBus) { - AVIVOI2CDoLock(output->scrn, 1, radeon_output->gpio); + AVIVOI2CDoLock(output->scrn, 1, radeon_output->ddc_line); MonInfo = xf86OutputGetEDID(output, radeon_output->pI2CBus); - AVIVOI2CDoLock(output->scrn, 0, radeon_output->gpio); + AVIVOI2CDoLock(output->scrn, 0, radeon_output->ddc_line); } if (MonInfo) { if (!xf86ReturnOptValBool(info->Options, OPTION_IGNORE_EDID, FALSE)) @@ -306,7 +293,7 @@ avivo_display_ddc_connected(ScrnInfoPtr pScrn, xf86OutputPtr output) } else MonType = MT_NONE; xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "DDC Type: %d[%04x], Detected Monitor Type: %d\n", DDCType, radeon_output->gpio, MonType); + "DDC Type: 0x%x, Detected Monitor Type: %d\n", radeon_output->ddc_line, MonType); return MonType; } @@ -316,14 +303,13 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output) { RADEONInfoPtr info = RADEONPTR(pScrn); unsigned char *RADEONMMIO = info->MMIO; - unsigned long DDCReg; + CARD32 DDCReg; RADEONMonitorType MonType = MT_NONE; xf86MonPtr MonInfo = NULL; RADEONOutputPrivatePtr radeon_output = output->driver_private; - RADEONDDCType DDCType = radeon_output->DDCType; int i, j; - DDCReg = radeon_output->DDCReg; + DDCReg = radeon_output->ddc_line; /* 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)) { @@ -405,7 +391,7 @@ RADEONDisplayDDCConnected(ScrnInfoPtr pScrn, xf86OutputPtr output) } else MonType = MT_NONE; xf86DrvMsg(pScrn->scrnIndex, X_INFO, - "DDC Type: %d, Detected Monitor Type: %d\n", DDCType, MonType); + "DDC Type: 0x%x, Detected Monitor Type: %d\n", radeon_output->ddc_line, MonType); return MonType; } @@ -2729,26 +2715,18 @@ void RADEONInitConnector(xf86OutputPtr output) ScrnInfoPtr pScrn = output->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); RADEONOutputPrivatePtr radeon_output = output->driver_private; - int DDCReg = 0; - char* name = (char*) DDCTypeName[radeon_output->DDCType]; + char stmp[16]; + char *name; + sprintf(stmp, "DDC_0x%x", radeon_output->ddc_line); + name = xnfalloc(strlen(stmp) + 1); + strcpy(name, stmp); if (IS_AVIVO_VARIANT) { - if (radeon_output->gpio) - avivo_i2c_init(pScrn, &radeon_output->pI2CBus, radeon_output->gpio, name); + if (radeon_output->ddc_line) + avivo_i2c_init(pScrn, &radeon_output->pI2CBus, radeon_output->ddc_line, name); } else { - switch(radeon_output->DDCType) { - case DDC_MONID: DDCReg = RADEON_GPIO_MONID; break; - case DDC_DVI : DDCReg = RADEON_GPIO_DVI_DDC; break; - case DDC_VGA : DDCReg = RADEON_GPIO_VGA_DDC; break; - case DDC_CRT2 : DDCReg = RADEON_GPIO_CRT2_DDC; break; - case DDC_LCD : DDCReg = RADEON_LCD_GPIO_MASK; break; - case DDC_GPIO : DDCReg = RADEON_MDGPIO_EN_REG; break; - default: break; - } - if (DDCReg) { - radeon_output->DDCReg = DDCReg; - RADEONI2CInit(pScrn, &radeon_output->pI2CBus, DDCReg, name); - } + if (radeon_output->ddc_line) + RADEONI2CInit(pScrn, &radeon_output->pI2CBus, radeon_output->ddc_line, name); } if (radeon_output->DACType == DAC_PRIMARY) @@ -2807,13 +2785,13 @@ static Bool RADEONSetupAppleConnectors(ScrnInfoPtr pScrn) switch (info->MacModel) { case RADEON_MAC_IBOOK: - info->BiosConnector[0].DDCType = DDC_DVI; + info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC; info->BiosConnector[0].DACType = DAC_NONE; info->BiosConnector[0].TMDSType = TMDS_NONE; info->BiosConnector[0].ConnectorType = CONNECTOR_PROPRIETARY; info->BiosConnector[0].valid = TRUE; - info->BiosConnector[1].DDCType = DDC_VGA; + info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC; info->BiosConnector[1].DACType = DAC_TVDAC; info->BiosConnector[1].TMDSType = TMDS_NONE; info->BiosConnector[1].ConnectorType = CONNECTOR_CRT; @@ -2822,17 +2800,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].DDCType = DDC_NONE_DETECTED; + info->BiosConnector[2].ddc_line = 0; info->BiosConnector[2].valid = TRUE; return TRUE; case RADEON_MAC_POWERBOOK_DL: - info->BiosConnector[0].DDCType = DDC_DVI; + info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC; info->BiosConnector[0].DACType = DAC_NONE; info->BiosConnector[0].TMDSType = TMDS_NONE; info->BiosConnector[0].ConnectorType = CONNECTOR_PROPRIETARY; info->BiosConnector[0].valid = TRUE; - info->BiosConnector[1].DDCType = DDC_VGA; + info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC; info->BiosConnector[1].DACType = DAC_PRIMARY; info->BiosConnector[1].TMDSType = TMDS_EXT; info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I; @@ -2841,17 +2819,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].DDCType = DDC_NONE_DETECTED; + info->BiosConnector[2].ddc_line = 0; info->BiosConnector[2].valid = TRUE; return TRUE; case RADEON_MAC_POWERBOOK: - info->BiosConnector[0].DDCType = DDC_DVI; + info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC; info->BiosConnector[0].DACType = DAC_NONE; info->BiosConnector[0].TMDSType = TMDS_NONE; info->BiosConnector[0].ConnectorType = CONNECTOR_PROPRIETARY; info->BiosConnector[0].valid = TRUE; - info->BiosConnector[1].DDCType = DDC_VGA; + info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC; info->BiosConnector[1].DACType = DAC_PRIMARY; info->BiosConnector[1].TMDSType = TMDS_INT; info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_I; @@ -2860,11 +2838,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].DDCType = DDC_NONE_DETECTED; + info->BiosConnector[2].ddc_line = 0; info->BiosConnector[2].valid = TRUE; return TRUE; case RADEON_MAC_MINI: - info->BiosConnector[0].DDCType = DDC_CRT2; + info->BiosConnector[0].ddc_line = RADEON_GPIO_CRT2_DDC; info->BiosConnector[0].DACType = DAC_TVDAC; info->BiosConnector[0].TMDSType = TMDS_EXT; info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I; @@ -2873,7 +2851,7 @@ 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].DDCType = DDC_NONE_DETECTED; + info->BiosConnector[1].ddc_line = 0; info->BiosConnector[1].valid = TRUE; return TRUE; default: @@ -2890,7 +2868,7 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn) RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); if (!pRADEONEnt->HasCRTC2) { - info->BiosConnector[0].DDCType = DDC_VGA; + info->BiosConnector[0].ddc_line = RADEON_GPIO_VGA_DDC; info->BiosConnector[0].DACType = DAC_PRIMARY; info->BiosConnector[0].TMDSType = TMDS_NONE; info->BiosConnector[0].ConnectorType = CONNECTOR_CRT; @@ -2901,7 +2879,7 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn) if (info->IsMobility) { /* Below is the most common setting, but may not be true */ if (info->IsIGP) { - info->BiosConnector[0].DDCType = DDC_LCD; + info->BiosConnector[0].ddc_line = RADEON_LCD_GPIO_MASK; info->BiosConnector[0].DACType = DAC_UNKNOWN; info->BiosConnector[0].TMDSType = TMDS_UNKNOWN; info->BiosConnector[0].ConnectorType = CONNECTOR_PROPRIETARY; @@ -2909,25 +2887,25 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn) /* IGP only has TVDAC */ if (info->ChipFamily == CHIP_FAMILY_RS400) - info->BiosConnector[1].DDCType = DDC_CRT2; + info->BiosConnector[1].ddc_line = RADEON_GPIO_CRT2_DDC; else - info->BiosConnector[1].DDCType = DDC_VGA; + info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC; info->BiosConnector[1].DACType = DAC_TVDAC; info->BiosConnector[1].TMDSType = TMDS_UNKNOWN; info->BiosConnector[1].ConnectorType = CONNECTOR_CRT; info->BiosConnector[1].valid = TRUE; } else { #if defined(__powerpc__) - info->BiosConnector[0].DDCType = DDC_DVI; + info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC; #else - info->BiosConnector[0].DDCType = DDC_LCD; + info->BiosConnector[0].ddc_line = RADEON_LCD_GPIO_MASK; #endif info->BiosConnector[0].DACType = DAC_UNKNOWN; info->BiosConnector[0].TMDSType = TMDS_UNKNOWN; info->BiosConnector[0].ConnectorType = CONNECTOR_PROPRIETARY; info->BiosConnector[0].valid = TRUE; - info->BiosConnector[1].DDCType = DDC_VGA; + info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC; info->BiosConnector[1].DACType = DAC_PRIMARY; info->BiosConnector[1].TMDSType = TMDS_UNKNOWN; info->BiosConnector[1].ConnectorType = CONNECTOR_CRT; @@ -2937,9 +2915,9 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn) /* Below is the most common setting, but may not be true */ if (info->IsIGP) { if (info->ChipFamily == CHIP_FAMILY_RS400) - info->BiosConnector[0].DDCType = DDC_CRT2; + info->BiosConnector[0].ddc_line = RADEON_GPIO_CRT2_DDC; else - info->BiosConnector[0].DDCType = DDC_VGA; + info->BiosConnector[0].ddc_line = RADEON_GPIO_VGA_DDC; info->BiosConnector[0].DACType = DAC_TVDAC; info->BiosConnector[0].TMDSType = TMDS_UNKNOWN; info->BiosConnector[0].ConnectorType = CONNECTOR_CRT; @@ -2948,19 +2926,19 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn) /* not sure what a good default DDCType for DVI on * IGP desktop chips is */ - info->BiosConnector[1].DDCType = DDC_MONID; /* DDC_DVI? */ + info->BiosConnector[1].ddc_line = RADEON_GPIO_MONID; /* DDC_DVI? */ info->BiosConnector[1].DACType = DAC_UNKNOWN; info->BiosConnector[1].TMDSType = TMDS_EXT; info->BiosConnector[1].ConnectorType = CONNECTOR_DVI_D; info->BiosConnector[1].valid = TRUE; } else { - info->BiosConnector[0].DDCType = DDC_DVI; + info->BiosConnector[0].ddc_line = RADEON_GPIO_DVI_DDC; info->BiosConnector[0].DACType = DAC_TVDAC; info->BiosConnector[0].TMDSType = TMDS_INT; info->BiosConnector[0].ConnectorType = CONNECTOR_DVI_I; info->BiosConnector[0].valid = TRUE; - info->BiosConnector[1].DDCType = DDC_VGA; + info->BiosConnector[1].ddc_line = RADEON_GPIO_VGA_DDC; info->BiosConnector[1].DACType = DAC_PRIMARY; info->BiosConnector[1].TMDSType = TMDS_EXT; info->BiosConnector[1].ConnectorType = CONNECTOR_CRT; @@ -2972,7 +2950,7 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn) info->BiosConnector[2].ConnectorType = CONNECTOR_STV; info->BiosConnector[2].DACType = DAC_TVDAC; info->BiosConnector[2].TMDSType = TMDS_NONE; - info->BiosConnector[2].DDCType = DDC_NONE_DETECTED; + info->BiosConnector[2].ddc_line = 0; info->BiosConnector[2].valid = TRUE; } @@ -2980,8 +2958,8 @@ static void RADEONSetupGenericConnectors(ScrnInfoPtr pScrn) * detect it yet (Mac cards) */ if (xf86ReturnOptValBool(info->Options, OPTION_REVERSE_DDC, FALSE)) { - info->BiosConnector[0].DDCType = DDC_VGA; - info->BiosConnector[1].DDCType = DDC_DVI; + info->BiosConnector[0].ddc_line = RADEON_GPIO_VGA_DDC; + info->BiosConnector[1].ddc_line = RADEON_GPIO_DVI_DDC; } } @@ -3076,7 +3054,7 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) */ for (i = 0; i < RADEON_MAX_BIOS_CONNECTOR; i++) { info->BiosConnector[i].valid = FALSE; - info->BiosConnector[i].DDCType = DDC_NONE_DETECTED; + info->BiosConnector[i].ddc_line = 0; info->BiosConnector[i].DACType = DAC_UNKNOWN; info->BiosConnector[i].TMDSType = TMDS_UNKNOWN; info->BiosConnector[i].ConnectorType = CONNECTOR_NONE; @@ -3138,11 +3116,11 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) info->BiosConnector[0].valid = TRUE; info->BiosConnector[1].valid = TRUE; if (sscanf(optstr, "%u,%d,%d,%u,%u,%d,%d,%u", - &info->BiosConnector[0].DDCType, + &info->BiosConnector[0].ddc_line, &info->BiosConnector[0].DACType, &info->BiosConnector[0].TMDSType, &info->BiosConnector[0].ConnectorType, - &info->BiosConnector[1].DDCType, + &info->BiosConnector[1].ddc_line, &info->BiosConnector[1].DACType, &info->BiosConnector[1].TMDSType, &info->BiosConnector[1].ConnectorType) != 8) { @@ -3184,9 +3162,8 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn) } radeon_output->MonType = MT_UNKNOWN; radeon_output->ConnectorType = info->BiosConnector[i].ConnectorType; - radeon_output->gpio = info->BiosConnector[i].gpio; + radeon_output->ddc_line = info->BiosConnector[i].ddc_line; radeon_output->output_id = info->BiosConnector[i].output_id; - radeon_output->DDCType = info->BiosConnector[i].DDCType; if (info->IsAtomBios) { if (radeon_output->ConnectorType == CONNECTOR_DVI_D_ATOM) radeon_output->DACType = DAC_NONE; diff --git a/src/radeon_probe.h b/src/radeon_probe.h index ad732f64..7c757dc9 100644 --- a/src/radeon_probe.h +++ b/src/radeon_probe.h @@ -211,12 +211,11 @@ typedef struct _RADEONCrtcPrivateRec { } RADEONCrtcPrivateRec, *RADEONCrtcPrivatePtr; typedef struct { - RADEONDDCType DDCType; + CARD32 ddc_line; RADEONDacType DACType; RADEONTmdsType TMDSType; RADEONConnectorType ConnectorType; Bool valid; - int gpio; int output_id; } RADEONBIOSConnector; @@ -224,7 +223,7 @@ typedef struct _RADEONOutputPrivateRec { int num; RADEONOutputType type; void *dev_priv; - RADEONDDCType DDCType; + CARD32 ddc_line; RADEONDacType DACType; RADEONDviType DVIType; RADEONTmdsType TMDSType; @@ -264,7 +263,6 @@ typedef struct _RADEONOutputPrivateRec { Bool tv_on; int load_detection; - unsigned long gpio; char *name; int output_id; } RADEONOutputPrivateRec, *RADEONOutputPrivatePtr; |