[PATCH 5/9] radeon: Use fences to gate entry to reclocking on <r600
Alex Deucher
alexdeucher at gmail.com
Fri May 7 14:16:16 PDT 2010
From: Matthew Garrett <mjg at redhat.com>
GUI idle interrupts don't seem to work terribly well on r500 and earlier,
so let's use a fence instead.
Signed-off-by: Matthew Garrett <mjg at redhat.com>
---
drivers/gpu/drm/radeon/radeon_pm.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index bded834..1ee7fc9 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -76,6 +76,14 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev, int static_switch)
msecs_to_jiffies(RADEON_WAIT_IDLE_TIMEOUT));
rdev->irq.gui_idle = false;
radeon_irq_set(rdev);
+ } else {
+ struct radeon_fence *fence;
+ radeon_ring_alloc(rdev, 64);
+ radeon_fence_create(rdev, &fence);
+ radeon_fence_emit(rdev, fence);
+ radeon_ring_commit(rdev);
+ radeon_fence_wait(fence, false);
+ radeon_fence_unref(&fence);
}
radeon_unmap_vram_bos(rdev);
--
1.5.6.3
More information about the dri-devel
mailing list