From 53f90ce60198e2f9fb1ea793a6e12fcda15697f7 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 22 Jun 2010 12:10:52 -0400 Subject: [PATCH] drm/radeon/kms: avoid oops on mac r4xx cards They don't have an atombios so don't attempt to use it for eng/mem clocks. Reported by spoonb on #radeon Signed-off-by: Alex Deucher --- drivers/gpu/drm/radeon/radeon_asic.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index 87f7e2c..646f96f 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c @@ -780,6 +780,13 @@ int radeon_asic_init(struct radeon_device *rdev) case CHIP_R423: case CHIP_RV410: rdev->asic = &r420_asic; + /* handle macs */ + if (rdev->bios == NULL) { + rdev->asic->get_engine_clock = &radeon_legacy_get_engine_clock; + rdev->asic->set_engine_clock = &radeon_legacy_set_engine_clock; + rdev->asic->get_memory_clock = &radeon_legacy_get_memory_clock; + rdev->asic->set_memory_clock = NULL; + } break; case CHIP_RS400: case CHIP_RS480: -- 1.7.0.1