]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/gpu/drm/radeon/rv770.c
drm/radeon/kms/pm: track current voltage (v2)
[mv-sheeva.git] / drivers / gpu / drm / radeon / rv770.c
index 33952da65340503ad3e07bbb428bf4487b027737..7bde6eecf8c2344413ebcfbecb43d8ea0fc2b4cd 100644 (file)
@@ -48,8 +48,13 @@ void rv770_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;
+               }
+       }
 }
 
 /*