drm/radeon/kms: re-enable gui idle interrupts on r6xx+
authorAlex Deucher <alexdeucher@gmail.com>
Thu, 29 Apr 2010 20:14:02 +0000 (16:14 -0400)
committerDave Airlie <airlied@redhat.com>
Tue, 18 May 2010 08:21:38 +0000 (18:21 +1000)
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/radeon_pm.c

index 2eb675e78440ed375e600ba5fb7a4823a8f13a6a..bded834afa5d9aabfd69915fcab62c056f60bffc 100644 (file)
@@ -64,17 +64,19 @@ static void radeon_pm_set_clocks(struct radeon_device *rdev, int static_switch)
        mutex_lock(&rdev->ddev->struct_mutex);
        mutex_lock(&rdev->vram_mutex);
        mutex_lock(&rdev->cp.mutex);
-#if 0
-       /* wait for GPU idle */
-       rdev->pm.gui_idle = false;
-       rdev->irq.gui_idle = true;
-       radeon_irq_set(rdev);
-       wait_event_interruptible_timeout(
-               rdev->irq.idle_queue, rdev->pm.gui_idle,
-               msecs_to_jiffies(RADEON_WAIT_IDLE_TIMEOUT));
-       rdev->irq.gui_idle = false;
-       radeon_irq_set(rdev);
-#endif
+
+       /* gui idle int has issues on older chips it seems */
+       if (rdev->family >= CHIP_R600) {
+               /* wait for GPU idle */
+               rdev->pm.gui_idle = false;
+               rdev->irq.gui_idle = true;
+               radeon_irq_set(rdev);
+               wait_event_interruptible_timeout(
+                       rdev->irq.idle_queue, rdev->pm.gui_idle,
+                       msecs_to_jiffies(RADEON_WAIT_IDLE_TIMEOUT));
+               rdev->irq.gui_idle = false;
+               radeon_irq_set(rdev);
+       }
        radeon_unmap_vram_bos(rdev);
 
        if (!static_switch) {