diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2010-06-25 16:21:27 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-06-30 21:59:46 -0400 |
commit | 773c3fa3a04bf6c9aa7147813beaab66f38e658f (patch) | |
tree | a7966c885cfecf8e9d5b2b1fa96fdd6a8a54f2cc /drivers/gpu | |
parent | 3f53eb6f84545a7fc55a36657755371f42c63fca (diff) |
drm/radeon/kms/pm: fix power state indexing on igp chips in dynpm mode
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=28745
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Tested-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/r600.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 90f28175a7bc..3d6645ce2151 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c | |||
@@ -130,9 +130,14 @@ void r600_pm_get_dynpm_state(struct radeon_device *rdev) | |||
130 | break; | 130 | break; |
131 | } | 131 | } |
132 | } | 132 | } |
133 | } else | 133 | } else { |
134 | rdev->pm.requested_power_state_index = | 134 | if (rdev->pm.current_power_state_index == 0) |
135 | rdev->pm.current_power_state_index - 1; | 135 | rdev->pm.requested_power_state_index = |
136 | rdev->pm.num_power_states - 1; | ||
137 | else | ||
138 | rdev->pm.requested_power_state_index = | ||
139 | rdev->pm.current_power_state_index - 1; | ||
140 | } | ||
136 | } | 141 | } |
137 | rdev->pm.requested_clock_mode_index = 0; | 142 | rdev->pm.requested_clock_mode_index = 0; |
138 | /* don't use the power state if crtcs are active and no display flag is set */ | 143 | /* don't use the power state if crtcs are active and no display flag is set */ |