summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/evergreen.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-06-07 18:15:18 -0400
committerDave Airlie <airlied@redhat.com>2010-06-08 09:35:53 +1000
commit4d60173fc1b12b0c308f861620fe8e2a84f6e5da (patch)
treedd42b72d50e0859e632b2e9ffd0b7c0961b7bf86 /drivers/gpu/drm/radeon/evergreen.c
parentaa1df0f229829109e49d1dc493252fd94a7af2a1 (diff)
downloadblackbird-op-linux-4d60173fc1b12b0c308f861620fe8e2a84f6e5da.tar.gz
blackbird-op-linux-4d60173fc1b12b0c308f861620fe8e2a84f6e5da.zip
drm/radeon/kms/pm: track current voltage (v2)
track the current voltage level and avoid setting it if the requested voltage is already set. v2: check voltage type before checking current voltage Signed-off-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/evergreen.c')
-rw-r--r--drivers/gpu/drm/radeon/evergreen.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/evergreen.c b/drivers/gpu/drm/radeon/evergreen.c
index 49c94aef0dda..b86d6ac9c5ba 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -45,8 +45,12 @@ void evergreen_pm_misc(struct radeon_device *rdev)
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);
+ if ((voltage->type == VOLTAGE_SW) && voltage->voltage) {
+ if (voltage->voltage != rdev->pm.current_vddc) {
+ radeon_atom_set_voltage(rdev, voltage->voltage);
+ rdev->pm.current_vddc = voltage->voltage;
+ }
+ }
}
void evergreen_pm_prepare(struct radeon_device *rdev)
OpenPOWER on IntegriCloud