aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_combios.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-05-04 11:14:44 -0400
committerDave Airlie <airlied@redhat.com>2011-05-08 22:41:01 -0400
commit776f2b7cb473baa52cdeee9804073342dee7d7cb (patch)
tree860cd10ebbde811fa128f3b059060d6b798e08ea /drivers/gpu/drm/radeon/radeon_combios.c
parentd4a3b10c16a1bdb09483233bd7aeac684ccc160a (diff)
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 Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_combios.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 0e350b74ea2e..5b991f7c6e2a 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -544,20 +544,26 @@ static struct radeon_i2c_bus_rec combios_setup_i2c_bus(struct radeon_device *rde
544 rdev->family == CHIP_RS480) 544 rdev->family == CHIP_RS480)
545 ddc_line = RADEON_GPIOPAD_MASK; 545 ddc_line = RADEON_GPIOPAD_MASK;
546 else if (rdev->family == CHIP_R300 || 546 else if (rdev->family == CHIP_R300 ||
547 rdev->family == CHIP_R350) 547 rdev->family == CHIP_R350) {
548 ddc_line = RADEON_GPIO_DVI_DDC; 548 ddc_line = RADEON_GPIO_DVI_DDC;
549 else 549 ddc = DDC_DVI;
550 } else
550 ddc_line = RADEON_GPIO_MONID; 551 ddc_line = RADEON_GPIO_MONID;
551 break; 552 break;
552 case DDC_CRT2: 553 case DDC_CRT2:
553 if (rdev->family == CHIP_R200 || 554 if (rdev->family == CHIP_R200 ||
554 rdev->family == CHIP_R300 || 555 rdev->family == CHIP_R300 ||
555 rdev->family == CHIP_R350) 556 rdev->family == CHIP_R350) {
556 ddc_line = RADEON_GPIO_DVI_DDC; 557 ddc_line = RADEON_GPIO_DVI_DDC;
557 else if (rdev->family == CHIP_RS300 || 558 ddc = DDC_DVI;
558 rdev->family >= CHIP_RV350) 559 } else if (rdev->family == CHIP_RS300 ||
560 rdev->family == CHIP_RS400 ||
561 rdev->family == CHIP_RS480)
559 ddc_line = RADEON_GPIO_MONID; 562 ddc_line = RADEON_GPIO_MONID;
560 else 563 else if (rdev->family >= CHIP_RV350) {
564 ddc_line = RADEON_GPIO_MONID;
565 ddc = DDC_MONID;
566 } else
561 ddc_line = RADEON_GPIO_CRT2_DDC; 567 ddc_line = RADEON_GPIO_CRT2_DDC;
562 break; 568 break;
563 } 569 }