drm/radeon/kms/pm: enable SetVoltage on r7xx/evergreen
authorAlex Deucher <alexdeucher@gmail.com>
Fri, 28 May 2010 23:35:01 +0000 (19:35 -0400)
committerDave Airlie <airlied@redhat.com>
Thu, 3 Jun 2010 03:13:28 +0000 (13:13 +1000)
I missed these in the r6xx commit.

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

index 8c8e4d3cbaa377773d9fc39b5035a928f93ddf55..0440c0939bdd00e4efc71f09b0b02de16b3788da 100644 (file)
@@ -41,7 +41,12 @@ void evergreen_fini(struct radeon_device *rdev);
 
 void evergreen_pm_misc(struct radeon_device *rdev)
 {
+       int requested_index = rdev->pm.requested_power_state_index;
+       struct radeon_power_state *ps = &rdev->pm.power_state[requested_index];
+       struct radeon_voltage *voltage = &ps->clock_info[0].voltage;
 
+       if ((voltage->type == VOLTAGE_SW) && voltage->voltage)
+               radeon_atom_set_voltage(rdev, voltage->voltage);
 }
 
 void evergreen_pm_prepare(struct radeon_device *rdev)
index 253f24aec031e48e1cf2bd99d8595a50275b1f0d..33952da65340503ad3e07bbb428bf4487b027737 100644 (file)
@@ -44,7 +44,12 @@ void rv770_fini(struct radeon_device *rdev);
 
 void rv770_pm_misc(struct radeon_device *rdev)
 {
+       int requested_index = rdev->pm.requested_power_state_index;
+       struct radeon_power_state *ps = &rdev->pm.power_state[requested_index];
+       struct radeon_voltage *voltage = &ps->clock_info[0].voltage;
 
+       if ((voltage->type == VOLTAGE_SW) && voltage->voltage)
+               radeon_atom_set_voltage(rdev, voltage->voltage);
 }
 
 /*