diff mbox

drm/radeon/kms: fix i2c map for rv250/280

Message ID 1311444124-12209-1-git-send-email-alexdeucher@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Deucher July 23, 2011, 6:02 p.m. UTC
From: Alex Deucher <alexander.deucher@amd.com>

Those chips have crt2_ddc bus.

Fixes:
https://bugzilla.kernel.org/show_bug.cgi?id=39672

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@kernel.org
---
 drivers/gpu/drm/radeon/radeon_combios.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Comments

Thierry Vignaud Aug. 3, 2011, 9:21 a.m. UTC | #1
On 23 July 2011 20:02,  <alexdeucher@gmail.com> wrote:
> From: Alex Deucher <alexander.deucher@amd.com>
>
> Those chips have crt2_ddc bus.

Maybe adding a comment in the code'll make sure nobody will ever "clean up" or
"optimize" the tests by replacing them back by "else if (rdev->family
>= CHIP_R200)"...

> -       } else if (rdev->family >= CHIP_R200) {
> +       } else if ((rdev->family == CHIP_R200) ||
> +                  (rdev->family >= CHIP_R300)) {
>                /* 0x68 */
>                i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0);
>                rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID");

My 2 cents
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index e459467..a74217c 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -779,7 +779,8 @@  void radeon_combios_i2c_init(struct radeon_device *rdev)
 				}
 			}
 		}
-	} else if (rdev->family >= CHIP_R200) {
+	} else if ((rdev->family == CHIP_R200) ||
+		   (rdev->family >= CHIP_R300)) {
 		/* 0x68 */
 		i2c = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0);
 		rdev->i2c_bus[3] = radeon_i2c_create(dev, &i2c, "MONID");