summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-08-27 18:22:21 -0400
committerAlex Deucher <alexdeucher@gmail.com>2010-08-27 18:22:21 -0400
commit966ac1be81da76c8aa4ea46b63f3ca5358a2c021 (patch)
tree6d4ef017f6f43a15dfee56a34072952a6a54b246
parent91f707d308d4bbf16c3d62d046cf280fef5a8f4c (diff)
evergreen: work around bad data in some i2c tables
The 7th entry in a lot of evergreen i2c gpio tables is partially zeroed. Fix the entry. Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r--src/radeon_atombios.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/radeon_atombios.c b/src/radeon_atombios.c
index 61b5372b..27231cde 100644
--- a/src/radeon_atombios.c
+++ b/src/radeon_atombios.c
@@ -1538,6 +1538,19 @@ RADEONLookupGPIOLineForDDC(ScrnInfoPtr pScrn, uint8_t id)
for (i = 0; i < num_indices; i++) {
gpio = &atomDataPtr->GPIO_I2C_Info->asGPIO_Info[i];
+
+ if (IS_DCE4_VARIANT) {
+ if ((i == 7) &&
+ (gpio->usClkMaskRegisterIndex == 0x1936) &&
+ (gpio->sucI2cId.ucAccess == 0)) {
+ gpio->sucI2cId.ucAccess = 0x97;
+ gpio->ucDataMaskShift = 8;
+ gpio->ucDataEnShift = 8;
+ gpio->ucDataY_Shift = 8;
+ gpio->ucDataA_Shift = 8;
+ }
+ }
+
if (gpio->sucI2cId.ucAccess == id) {
i2c.mask_clk_reg = le16_to_cpu(gpio->usClkMaskRegisterIndex) * 4;
i2c.mask_data_reg = le16_to_cpu(gpio->usDataMaskRegisterIndex) * 4;