]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/gpu/drm/radeon/r600.c
drm/radeon/kms/pm: track current voltage (v2)
[net-next-2.6.git] / drivers / gpu / drm / radeon / r600.c
index d152ceca5d37709263c655e9f524ae679744b1db..acec26b70d0de17e0dbec645170b3ba6d34432c9 100644 (file)
@@ -561,9 +561,12 @@ void r600_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;
+               }
+       }
 }
 
 bool r600_gui_idle(struct radeon_device *rdev)