提交 95f5a3ac 编写于 作者: A Alex Deucher

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: NAlex Deucher <alexander.deucher@amd.com>
上级 62444b74
...@@ -253,18 +253,13 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev) ...@@ -253,18 +253,13 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev)
down_write(&rdev->pm.mclk_lock); down_write(&rdev->pm.mclk_lock);
mutex_lock(&rdev->ring_lock); mutex_lock(&rdev->ring_lock);
/* gui idle int has issues on older chips it seems */ /* wait for the rings to drain */
if (rdev->family >= CHIP_R600) { for (i = 0; i < RADEON_NUM_RINGS; i++) {
if (rdev->irq.installed) { struct radeon_ring *ring = &rdev->ring[i];
/* wait for GPU to become idle */ if (ring->ready)
radeon_irq_kms_wait_gui_idle(rdev); radeon_fence_wait_empty_locked(rdev, i);
}
} else {
struct radeon_ring *ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX];
if (ring->ready) {
radeon_fence_wait_empty_locked(rdev, RADEON_RING_TYPE_GFX_INDEX);
}
} }
radeon_unmap_vram_bos(rdev); radeon_unmap_vram_bos(rdev);
if (rdev->irq.installed) { if (rdev->irq.installed) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册