]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/radeon/kms: avoid oops on mac r4xx cards
authorAlex Deucher <alexdeucher@gmail.com>
Wed, 23 Jun 2010 01:58:26 +0000 (21:58 -0400)
committerDave Airlie <airlied@redhat.com>
Thu, 1 Jul 2010 01:59:36 +0000 (11:59 +1000)
They don't have an atombios so don't attempt to use it for
eng/mem clocks.

Reported by spoonb on #radeon
fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=28671

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_asic.c

index 87f7e2cc52d4ef81be592d50891769740d9bf4e8..646f96f97c77d8538919325be4bde664a7f3df8b 100644 (file)
@@ -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: