aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/evergreen.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 0440c0939bdd..4b6623df3b96 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -41,12 +41,18 @@ void evergreen_fini(struct radeon_device *rdev);
41 41
42void evergreen_pm_misc(struct radeon_device *rdev) 42void evergreen_pm_misc(struct radeon_device *rdev)
43{ 43{
44 int requested_index = rdev->pm.requested_power_state_index; 44 int req_ps_idx = rdev->pm.requested_power_state_index;
45 struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; 45 int req_cm_idx = rdev->pm.requested_clock_mode_index;
46 struct radeon_voltage *voltage = &ps->clock_info[0].voltage; 46 struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx];
47 47 struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage;
48 if ((voltage->type == VOLTAGE_SW) && voltage->voltage) 48
49 radeon_atom_set_voltage(rdev, voltage->voltage); 49 if ((voltage->type == VOLTAGE_SW) && voltage->voltage) {
50 if (voltage->voltage != rdev->pm.current_vddc) {
51 radeon_atom_set_voltage(rdev, voltage->voltage);
52 rdev->pm.current_vddc = voltage->voltage;
53 DRM_DEBUG("Setting: v: %d\n", voltage->voltage);
54 }
55 }
50} 56}
51 57
52void evergreen_pm_prepare(struct radeon_device *rdev) 58void evergreen_pm_prepare(struct radeon_device *rdev)
@@ -2153,7 +2159,7 @@ int evergreen_init(struct radeon_device *rdev)
2153 if (r) 2159 if (r)
2154 return r; 2160 return r;
2155 2161
2156 rdev->accel_working = false; 2162 rdev->accel_working = true;
2157 r = evergreen_startup(rdev); 2163 r = evergreen_startup(rdev);
2158 if (r) { 2164 if (r) {
2159 dev_err(rdev->dev, "disabling GPU acceleration\n"); 2165 dev_err(rdev->dev, "disabling GPU acceleration\n");