aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2012-08-10 13:12:08 -0400
committerAlex Deucher <alexander.deucher@amd.com>2012-09-20 13:10:33 -0400
commit95f5a3acfaf6f5672420398e01ca32220b36bb90 (patch)
tree76347e7893deac6eb5c7f589f0d459c0b26e2fb2
parent62444b7462a2b98bc78d68736c03a7c4e66ba7e2 (diff)
drm/radeon/dynpm: wait for fences on all rings when reclocking
1. Drop gui idle stuff, it's not as reliable as fences and only covers the 3D engine. 2. Wait for fences on all rings. This makes sure all rings are idle when reclocking. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index 7ae606600107..2c2c901226f4 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -253,18 +253,13 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev)
253 down_write(&rdev->pm.mclk_lock); 253 down_write(&rdev->pm.mclk_lock);
254 mutex_lock(&rdev->ring_lock); 254 mutex_lock(&rdev->ring_lock);
255 255
256 /* gui idle int has issues on older chips it seems */ 256 /* wait for the rings to drain */
257 if (rdev->family >= CHIP_R600) { 257 for (i = 0; i < RADEON_NUM_RINGS; i++) {
258 if (rdev->irq.installed) { 258 struct radeon_ring *ring = &rdev->ring[i];
259 /* wait for GPU to become idle */ 259 if (ring->ready)
260 radeon_irq_kms_wait_gui_idle(rdev); 260 radeon_fence_wait_empty_locked(rdev, i);
261 }
262 } else {
263 struct radeon_ring *ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX];
264 if (ring->ready) {
265 radeon_fence_wait_empty_locked(rdev, RADEON_RING_TYPE_GFX_INDEX);
266 }
267 } 261 }
262
268 radeon_unmap_vram_bos(rdev); 263 radeon_unmap_vram_bos(rdev);
269 264
270 if (rdev->irq.installed) { 265 if (rdev->irq.installed) {