diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c index 8c8e4d3cbaa3..4b6623df3b96 100644 --- a/drivers/gpu/drm/radeon/evergreen.c +++ b/drivers/gpu/drm/radeon/evergreen.c | |||
@@ -41,7 +41,18 @@ void evergreen_fini(struct radeon_device *rdev); | |||
41 | 41 | ||
42 | void evergreen_pm_misc(struct radeon_device *rdev) | 42 | void evergreen_pm_misc(struct radeon_device *rdev) |
43 | { | 43 | { |
44 | 44 | int req_ps_idx = rdev->pm.requested_power_state_index; | |
45 | int req_cm_idx = rdev->pm.requested_clock_mode_index; | ||
46 | struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx]; | ||
47 | struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; | ||
48 | |||
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 | } | ||
45 | } | 56 | } |
46 | 57 | ||
47 | void evergreen_pm_prepare(struct radeon_device *rdev) | 58 | void evergreen_pm_prepare(struct radeon_device *rdev) |
@@ -2148,7 +2159,7 @@ int evergreen_init(struct radeon_device *rdev) | |||
2148 | if (r) | 2159 | if (r) |
2149 | return r; | 2160 | return r; |
2150 | 2161 | ||
2151 | rdev->accel_working = false; | 2162 | rdev->accel_working = true; |
2152 | r = evergreen_startup(rdev); | 2163 | r = evergreen_startup(rdev); |
2153 | if (r) { | 2164 | if (r) { |
2154 | dev_err(rdev->dev, "disabling GPU acceleration\n"); | 2165 | dev_err(rdev->dev, "disabling GPU acceleration\n"); |