Skip to contentSkip to conversation

drm/radeon/kms/pm: enable SetVoltage on r7xx/evergreen

PATCH New Alex Deucher 1 participant 1 message May 28, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms/pm: enable SetVoltage on r7xx/evergreen

I missed these in the r6xx commit.

---
 drivers/gpu/drm/radeon/evergreen.c |    5 +++++
 drivers/gpu/drm/radeon/rv770.c     |    5 +++++
 2 files changed, 10 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +5 -0
index e220c7e..69c4b27 100644
@@ -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)
drivers/gpu/drm/radeon/rv770.c +5 -0
index d285ca8..5f76938 100644
@@ -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);
 }
 
 /*
Signature · 1 line
1.5.6.3