Skip to content

Commit

Permalink
drm/radeon/kms: fix some logic errors in combios i2c mapping
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alex Deucher authored and Dave Airlie committed May 9, 2011
1 parent d4a3b10 commit 776f2b7
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions drivers/gpu/drm/radeon/radeon_combios.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 776f2b7

Please sign in to comment.