From: Alex Deucher Date: Wed, 4 May 2011 15:14:44 +0000 (+0000) Subject: drm/radeon/kms: fix some logic errors in combios i2c mapping X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=776f2b7cb473baa52cdeee9804073342dee7d7cb;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Dave Airlie --- 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 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; }