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>
This commit is contained in:

committed by
Dave Airlie

parent
aa1df0f229
commit
4d60173fc1
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user