Skip to contentSkip to conversation

drm/radeon/kms: fix some logic errors in combios i2c mapping

PATCH New Alex Deucher 1 participant 1 message May 4, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: fix some logic errors in combios i2c mapping

The virtual i2c to real i2c channel mappings weren't setting the right id in some cases.

Spotted by: Andrew Randrianasulu

---
 drivers/gpu/drm/radeon/radeon_combios.c |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)
drivers/gpu/drm/radeon/radeon_combios.c +12 -6
index 0e350b7..5b991f7 100644
@@ -544,20 +544,26 @@ static struct radeon_i2c_bus_rec combios_setup_i2c_bus(struct radeon_device *rde
 		    rdev->family == CHIP_RS480)
 			ddc_line = RADEON_GPIOPAD_MASK;
 		else if (rdev->family == CHIP_R300 ||
-			 rdev->family == CHIP_R350)
+			 rdev->family == CHIP_R350) {
 			ddc_line = RADEON_GPIO_DVI_DDC;
-		else
+			ddc = DDC_DVI;
+		} else
 			ddc_line = RADEON_GPIO_MONID;
 		break;
 	case DDC_CRT2:
 		if (rdev->family == CHIP_R200 ||
 		    rdev->family == CHIP_R300 ||
-		    rdev->family == CHIP_R350)
+		    rdev->family == CHIP_R350) {
 			ddc_line = RADEON_GPIO_DVI_DDC;
-		else if (rdev->family == CHIP_RS300 ||
-			 rdev->family >= CHIP_RV350)
+			ddc = DDC_DVI;
+		} else if (rdev->family == CHIP_RS300 ||
+			   rdev->family == CHIP_RS400 ||
+			   rdev->family == CHIP_RS480)
 			ddc_line = RADEON_GPIO_MONID;
-		else
+		else if (rdev->family >= CHIP_RV350) {
+			ddc_line = RADEON_GPIO_MONID;
+			ddc = DDC_MONID;
+		} else
 			ddc_line = RADEON_GPIO_CRT2_DDC;
 		break;
 	}
Signature · 1 line
1.7.1.1