aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2010-04-30 15:48:23 -0400
committerDave Airlie <airlied@redhat.com>2010-05-18 04:21:47 -0400
commit01434b4bfba17626fe93a602e540f0004694d9df (patch)
tree852129f63829472b7a6f638c9d27fd251a2169a4 /drivers/gpu/drm
parent91700f3cac56a1998a56d41e4459a5cebdb4f752 (diff)
radeon: Use fences to gate entry to reclocking on <r600
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@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c8
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 bded834afa5d..1ee7fc9918ac 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)
76 msecs_to_jiffies(RADEON_WAIT_IDLE_TIMEOUT)); 76 msecs_to_jiffies(RADEON_WAIT_IDLE_TIMEOUT));
77 rdev->irq.gui_idle = false; 77 rdev->irq.gui_idle = false;
78 radeon_irq_set(rdev); 78 radeon_irq_set(rdev);
79 } else {
80 struct radeon_fence *fence;
81 radeon_ring_alloc(rdev, 64);
82 radeon_fence_create(rdev, &fence);
83 radeon_fence_emit(rdev, fence);
84 radeon_ring_commit(rdev);
85 radeon_fence_wait(fence, false);
86 radeon_fence_unref(&fence);
79 } 87 }
80 radeon_unmap_vram_bos(rdev); 88 radeon_unmap_vram_bos(rdev);
81 89