From 2be0aa11ca8c27f286f7c2a2d84001d4075a08b9 Mon Sep 17 00:00:00 2001 From: Alexander Müller Date: Sat, 24 Dec 2011 23:41:31 +0100 Subject: [PATCH 1/1] Fixed issue with radeon cards that have no power states registered. --- drivers/gpu/drm/radeon/radeon_atombios.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index d24baf3..1d03d24 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c @@ -2560,7 +2560,14 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; rdev->pm.current_clock_mode_index = 0; - rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.voltage; + + /* set default power state (if supported) */ + if (rdev->pm.default_power_state_index >= 0) { + rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.voltage; + } + else { + rdev->pm.current_vddc = 0; + } } void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable) -- 1.7.0.4