diff options
-rw-r--r-- | drivers/gpu/drm/radeon/r100.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c index 7675827c3a8d..87c4ffaf545e 100644 --- a/drivers/gpu/drm/radeon/r100.c +++ b/drivers/gpu/drm/radeon/r100.c | |||
@@ -188,9 +188,13 @@ void r100_set_power_state(struct radeon_device *rdev, bool static_switch) | |||
188 | #endif | 188 | #endif |
189 | radeon_pm_finish(rdev); | 189 | radeon_pm_finish(rdev); |
190 | } else { | 190 | } else { |
191 | radeon_sync_with_vblank(rdev); | ||
192 | |||
193 | if (!radeon_pm_in_vbl(rdev)) | ||
194 | return; | ||
195 | |||
191 | /* set engine clock */ | 196 | /* set engine clock */ |
192 | if (sclk != rdev->pm.current_sclk) { | 197 | if (sclk != rdev->pm.current_sclk) { |
193 | radeon_sync_with_vblank(rdev); | ||
194 | radeon_pm_debug_check_in_vbl(rdev, false); | 198 | radeon_pm_debug_check_in_vbl(rdev, false); |
195 | radeon_set_engine_clock(rdev, sclk); | 199 | radeon_set_engine_clock(rdev, sclk); |
196 | radeon_pm_debug_check_in_vbl(rdev, true); | 200 | radeon_pm_debug_check_in_vbl(rdev, true); |
@@ -198,10 +202,8 @@ void r100_set_power_state(struct radeon_device *rdev, bool static_switch) | |||
198 | DRM_INFO("Setting: e: %d\n", sclk); | 202 | DRM_INFO("Setting: e: %d\n", sclk); |
199 | } | 203 | } |
200 | 204 | ||
201 | #if 0 | ||
202 | /* set memory clock */ | 205 | /* set memory clock */ |
203 | if (rdev->asic->set_memory_clock && (mclk != rdev->pm.current_mclk)) { | 206 | if (rdev->asic->set_memory_clock && (mclk != rdev->pm.current_mclk)) { |
204 | radeon_sync_with_vblank(rdev); | ||
205 | radeon_pm_debug_check_in_vbl(rdev, false); | 207 | radeon_pm_debug_check_in_vbl(rdev, false); |
206 | radeon_pm_prepare(rdev); | 208 | radeon_pm_prepare(rdev); |
207 | radeon_set_memory_clock(rdev, mclk); | 209 | radeon_set_memory_clock(rdev, mclk); |
@@ -210,7 +212,6 @@ void r100_set_power_state(struct radeon_device *rdev, bool static_switch) | |||
210 | rdev->pm.current_mclk = mclk; | 212 | rdev->pm.current_mclk = mclk; |
211 | DRM_INFO("Setting: m: %d\n", mclk); | 213 | DRM_INFO("Setting: m: %d\n", mclk); |
212 | } | 214 | } |
213 | #endif | ||
214 | } | 215 | } |
215 | 216 | ||
216 | rdev->pm.current_power_state_index = rdev->pm.requested_power_state_index; | 217 | rdev->pm.current_power_state_index = rdev->pm.requested_power_state_index; |