drm/radeon/kms: avoid oops on mac r4xx cards

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, July 1, 2010 - 12:59 pm

Gitweb:     http://git.kernel.org/linus/07bb084c9306107204ef5691d4ce6f61213af6c2
Commit:     07bb084c9306107204ef5691d4ce6f61213af6c2
Parent:     b26c949755c06ec79e55a75817210083bd78fc9a
Author:     Alex Deucher <alexdeucher@gmail.com>
AuthorDate: Tue Jun 22 21:58:26 2010 -0400
Committer:  Dave Airlie <airlied@redhat.com>
CommitDate: Thu Jul 1 11:59:36 2010 +1000

    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
    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 |    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:
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
drm/radeon/kms: avoid oops on mac r4xx cards, Linux Kernel Mailing ..., (Thu Jul 1, 12:59 pm)