diff options
-rw-r--r-- | drivers/gpu/drm/radeon/evergreen.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_atombios.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_pm.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/radeon/rv770.c | 9 |
6 files changed, 22 insertions, 7 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) | |||
45 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; | 45 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; |
46 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; | 46 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; |
47 | 47 | ||
48 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) | 48 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { |
49 | radeon_atom_set_voltage(rdev, voltage->voltage); | 49 | if (voltage->voltage != rdev->pm.current_vddc) { |
50 | radeon_atom_set_voltage(rdev, voltage->voltage); | ||
51 | rdev->pm.current_vddc = voltage->voltage; | ||
52 | } | ||
53 | } | ||
50 | } | 54 | } |
51 | 55 | ||
52 | void evergreen_pm_prepare(struct radeon_device *rdev) | 56 | void evergreen_pm_prepare(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index d152ceca5d37..acec26b70d0d 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -561,9 +561,12 @@ void r600_pm_misc(struct radeon_device *rdev) | |||
561 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; | 561 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; |
562 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; | 562 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; |
563 | 563 | ||
564 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) | 564 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { |
565 | radeon_atom_set_voltage(rdev, voltage->voltage); | 565 | if (voltage->voltage != rdev->pm.current_vddc) { |
566 | 566 | radeon_atom_set_voltage(rdev, voltage->voltage); | |
567 | rdev->pm.current_vddc = voltage->voltage; | ||
568 | } | ||
569 | } | ||
567 | } | 570 | } |
568 | 571 | ||
569 | bool r600_gui_idle(struct radeon_device *rdev) | 572 | bool r600_gui_idle(struct radeon_device *rdev) |
diff --git a/drivers/gpu/drm/radeon/radeon.h b/drivers/gpu/drm/radeon/radeon.h index 2ad0e0304294..8e1d44ca26ec 100644 --- a/drivers/gpu/drm/radeon/radeon.h +++ b/drivers/gpu/drm/radeon/radeon.h | |||
@@ -748,6 +748,7 @@ struct radeon_pm { | |||
748 | int default_power_state_index; | 748 | int default_power_state_index; |
749 | u32 current_sclk; | 749 | u32 current_sclk; |
750 | u32 current_mclk; | 750 | u32 current_mclk; |
751 | u32 current_vddc; | ||
751 | struct radeon_i2c_chan *i2c_bus; | 752 | struct radeon_i2c_chan *i2c_bus; |
752 | /* selected pm method */ | 753 | /* selected pm method */ |
753 | enum radeon_pm_method pm_method; | 754 | enum radeon_pm_method pm_method; |
diff --git a/drivers/gpu/drm/radeon/radeon_atombios.c b/drivers/gpu/drm/radeon/radeon_atombios.c index f0fcd6c3d38c..99bd8a9c56b3 100644 --- a/drivers/gpu/drm/radeon/radeon_atombios.c +++ b/drivers/gpu/drm/radeon/radeon_atombios.c | |||
@@ -1966,6 +1966,7 @@ void radeon_atombios_get_power_modes(struct radeon_device *rdev) | |||
1966 | 1966 | ||
1967 | rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; | 1967 | rdev->pm.current_power_state_index = rdev->pm.default_power_state_index; |
1968 | rdev->pm.current_clock_mode_index = 0; | 1968 | rdev->pm.current_clock_mode_index = 0; |
1969 | rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.voltage; | ||
1969 | } | 1970 | } |
1970 | 1971 | ||
1971 | void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable) | 1972 | void radeon_atom_set_clock_gating(struct radeon_device *rdev, int enable) |
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index fcdf1db1e3ce..f2e1c60afda5 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c | |||
@@ -387,6 +387,7 @@ void radeon_pm_resume(struct radeon_device *rdev) | |||
387 | rdev->pm.current_clock_mode_index = 0; | 387 | rdev->pm.current_clock_mode_index = 0; |
388 | rdev->pm.current_sclk = rdev->clock.default_sclk; | 388 | rdev->pm.current_sclk = rdev->clock.default_sclk; |
389 | rdev->pm.current_mclk = rdev->clock.default_mclk; | 389 | rdev->pm.current_mclk = rdev->clock.default_mclk; |
390 | rdev->pm.current_vddc = rdev->pm.power_state[rdev->pm.default_power_state_index].clock_info[0].voltage.voltage; | ||
390 | mutex_unlock(&rdev->pm.mutex); | 391 | mutex_unlock(&rdev->pm.mutex); |
391 | radeon_pm_compute_clocks(rdev); | 392 | radeon_pm_compute_clocks(rdev); |
392 | } | 393 | } |
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c index 33952da65340..7bde6eecf8c2 100644 --- a/drivers/gpu/drm/radeon/rv770.c +++ b/drivers/gpu/drm/radeon/rv770.c | |||
@@ -48,8 +48,13 @@ void rv770_pm_misc(struct radeon_device *rdev) | |||
48 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; | 48 | struct radeon_power_state *ps = &rdev->pm.power_state[requested_index]; |
49 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; | 49 | struct radeon_voltage *voltage = &ps->clock_info[0].voltage; |
50 | 50 | ||
51 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) | 51 | |
52 | radeon_atom_set_voltage(rdev, voltage->voltage); | 52 | if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { |
53 | if (voltage->voltage != rdev->pm.current_vddc) { | ||
54 | radeon_atom_set_voltage(rdev, voltage->voltage); | ||
55 | rdev->pm.current_vddc = voltage->voltage; | ||
56 | } | ||
57 | } | ||
53 | } | 58 | } |
54 | 59 | ||
55 | /* | 60 | /* |