diff options
author | Dave Airlie <airlied@redhat.com> | 2008-08-04 14:38:21 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-08-04 14:38:21 +1000 |
commit | 942b18aca91819fa65d853cd15ffd1cd720cbd68 (patch) | |
tree | 880c2b2acba7fdb4aa58c291e2ba1bc18f9e758d | |
parent | 1f3eee3682f3598a303c9c3accfbe01b245cacf9 (diff) |
radeon: make r600 use i2c table lookup for ddc.
This may fix DDC on rv770 cards.
-rw-r--r-- | src/radeon_atombios.c | 43 |
1 files changed, 9 insertions, 34 deletions
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index d6675722..8c6c22a9 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c @@ -1386,36 +1386,6 @@ const int object_connector_convert[] = CONNECTOR_DISPLAY_PORT, }; -static void -rhdAtomParseI2CRecord(atomBiosHandlePtr handle, - ATOM_I2C_RECORD *Record, int *ddc_line) -{ - ErrorF(" %s: I2C Record: %s[%x] EngineID: %x I2CAddr: %x\n", - __func__, - Record->sucI2cId.bfHW_Capable ? "HW_Line" : "GPIO_ID", - Record->sucI2cId.bfI2C_LineMux, - Record->sucI2cId.bfHW_EngineID, - Record->ucI2CAddr); - - if (!*(unsigned char *)&(Record->sucI2cId)) - *ddc_line = 0; - else { - if (Record->ucI2CAddr != 0) - return; - - if (Record->sucI2cId.bfHW_Capable) { - switch(Record->sucI2cId.bfI2C_LineMux) { - case 0: *ddc_line = 0x7e40; break; - case 1: *ddc_line = 0x7e50; break; - case 2: *ddc_line = 0x7e30; break; - default: break; - } - return; - } else { - /* add GPIO pin parsing */ - } - } -} static RADEONI2CBusRec RADEONLookupGPIOLineForDDC(ScrnInfoPtr pScrn, uint8_t id) @@ -1475,6 +1445,13 @@ RADEONLookupGPIOLineForDDC(ScrnInfoPtr pScrn, uint8_t id) return i2c; } +static RADEONI2CBusRec +rhdAtomParseI2CRecord(ScrnInfoPtr pScrn, atomBiosHandlePtr handle, + ATOM_I2C_RECORD *Record) +{ + return RADEONLookupGPIOLineForDDC(pScrn, Record->sucI2cId.bfI2C_LineMux); +} + Bool RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn) { @@ -1612,10 +1589,8 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn) ErrorF("record type %d\n", Record->ucRecordType); switch (Record->ucRecordType) { case ATOM_I2C_RECORD_TYPE: - rhdAtomParseI2CRecord(info->atomBIOS, - (ATOM_I2C_RECORD *)Record, - &ddc_line); - info->BiosConnector[i].ddc_i2c = atom_setup_i2c_bus(ddc_line); + info->BiosConnector[i].ddc_i2c = rhdAtomParseI2CRecord(pScrn, info->atomBIOS, + (ATOM_I2C_RECORD *)Record); break; case ATOM_HPD_INT_RECORD_TYPE: break; |