aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/r100.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/r100.c')
-rw-r--r--drivers/gpu/drm/radeon/r100.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 14b7541df38a..4161a35dd3d3 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -87,7 +87,7 @@ void r100_get_power_state(struct radeon_device *rdev,
87 } else { 87 } else {
88 if (rdev->pm.active_crtc_count > 1) { 88 if (rdev->pm.active_crtc_count > 1) {
89 for (i = 0; i < rdev->pm.num_power_states; i++) { 89 for (i = 0; i < rdev->pm.num_power_states; i++) {
90 if (rdev->pm.power_state[i].flags & RADEON_PM_SINGLE_DISPLAY_ONLY) 90 if (rdev->pm.power_state[i].flags & RADEON_PM_STATE_SINGLE_DISPLAY_ONLY)
91 continue; 91 continue;
92 else if (i >= rdev->pm.current_power_state_index) { 92 else if (i >= rdev->pm.current_power_state_index) {
93 rdev->pm.requested_power_state_index = rdev->pm.current_power_state_index; 93 rdev->pm.requested_power_state_index = rdev->pm.current_power_state_index;
@@ -101,6 +101,12 @@ void r100_get_power_state(struct radeon_device *rdev,
101 rdev->pm.requested_power_state_index = 101 rdev->pm.requested_power_state_index =
102 rdev->pm.current_power_state_index - 1; 102 rdev->pm.current_power_state_index - 1;
103 } 103 }
104 /* don't use the power state if crtcs are active and no display flag is set */
105 if ((rdev->pm.active_crtc_count > 0) &&
106 (rdev->pm.power_state[rdev->pm.requested_power_state_index].clock_info[0].flags &
107 RADEON_PM_MODE_NO_DISPLAY)) {
108 rdev->pm.requested_power_state_index++;
109 }
104 break; 110 break;
105 case PM_ACTION_UPCLOCK: 111 case PM_ACTION_UPCLOCK:
106 if (rdev->pm.current_power_state_index == (rdev->pm.num_power_states - 1)) { 112 if (rdev->pm.current_power_state_index == (rdev->pm.num_power_states - 1)) {
@@ -109,7 +115,7 @@ void r100_get_power_state(struct radeon_device *rdev,
109 } else { 115 } else {
110 if (rdev->pm.active_crtc_count > 1) { 116 if (rdev->pm.active_crtc_count > 1) {
111 for (i = (rdev->pm.num_power_states - 1); i >= 0; i--) { 117 for (i = (rdev->pm.num_power_states - 1); i >= 0; i--) {
112 if (rdev->pm.power_state[i].flags & RADEON_PM_SINGLE_DISPLAY_ONLY) 118 if (rdev->pm.power_state[i].flags & RADEON_PM_STATE_SINGLE_DISPLAY_ONLY)
113 continue; 119 continue;
114 else if (i <= rdev->pm.current_power_state_index) { 120 else if (i <= rdev->pm.current_power_state_index) {
115 rdev->pm.requested_power_state_index = rdev->pm.current_power_state_index; 121 rdev->pm.requested_power_state_index = rdev->pm.current_power_state_index;
@@ -215,7 +221,7 @@ void r100_set_power_state(struct radeon_device *rdev, bool static_switch)
215 rdev->pm.current_power_state_index = rdev->pm.requested_power_state_index; 221 rdev->pm.current_power_state_index = rdev->pm.requested_power_state_index;
216 rdev->pm.current_clock_mode_index = rdev->pm.requested_clock_mode_index; 222 rdev->pm.current_clock_mode_index = rdev->pm.requested_clock_mode_index;
217 } else 223 } else
218 DRM_INFO("GUI not idle!!!\n"); 224 DRM_INFO("pm: GUI not idle!!!\n");
219} 225}
220 226
221void r100_pm_misc(struct radeon_device *rdev) 227void r100_pm_misc(struct radeon_device *rdev)