diff options
author | Alex Deucher <alex@botch2.(none)> | 2008-02-07 19:27:38 -0500 |
---|---|---|
committer | Alex Deucher <alex@botch2.(none)> | 2008-02-07 19:27:38 -0500 |
commit | e8899b9978291c62a65f468c92f340f65ad5479d (patch) | |
tree | b68fe8222530c38312de703975f06397854776fe /src/radeon_atombios.c | |
parent | 435de6c4e46ff2bebd4cee58888a66b936cd3fdf (diff) |
R6xx: fix ddc after my i2c rework
Seems r6xx does something different for its i2c table,
revert to the old behavior for now.
Diffstat (limited to 'src/radeon_atombios.c')
-rw-r--r-- | src/radeon_atombios.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c index e8f9e912..913fafb0 100644 --- a/src/radeon_atombios.c +++ b/src/radeon_atombios.c @@ -1404,7 +1404,7 @@ const int object_connector_convert[] = static void rhdAtomParseI2CRecord(atomBiosHandlePtr handle, - ATOM_I2C_RECORD *Record, int *line) + ATOM_I2C_RECORD *Record, int *ddc_line) { ErrorF(" %s: I2C Record: %s[%x] EngineID: %x I2CAddr: %x\n", __func__, @@ -1414,13 +1414,22 @@ rhdAtomParseI2CRecord(atomBiosHandlePtr handle, Record->ucI2CAddr); if (!*(unsigned char *)&(Record->sucI2cId)) - *line = 0; + *ddc_line = 0; else { - if (Record->ucI2CAddr != 0) return; - *line = Record->sucI2cId.bfI2C_LineMux; - 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 */ + } } } @@ -1470,7 +1479,7 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn) unsigned short size; atomDataTablesPtr atomDataPtr; ATOM_CONNECTOR_OBJECT_TABLE *con_obj; - int i, j, line = 0; + int i, j, ddc_line; atomDataPtr = info->atomBIOS->atomDataPtr; if (!rhdAtomGetTableRevisionAndSize((ATOM_COMMON_TABLE_HEADER *)(atomDataPtr->Object_Header), &crev, &frev, &size)) @@ -1558,8 +1567,8 @@ RADEONGetATOMConnectorInfoFromBIOSObject (ScrnInfoPtr pScrn) case ATOM_I2C_RECORD_TYPE: rhdAtomParseI2CRecord(info->atomBIOS, (ATOM_I2C_RECORD *)Record, - &line); - info->BiosConnector[i].ddc_i2c = RADEONLookupGPIOLineForDDC(pScrn, line); + &ddc_line); + info->BiosConnector[i].ddc_i2c = atom_setup_i2c_bus(ddc_line); break; case ATOM_HPD_INT_RECORD_TYPE: break; |