]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
i915: suspend/resume interrupt state
authorJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 23 Feb 2009 23:41:09 +0000 (15:41 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 Feb 2009 01:23:57 +0000 (17:23 -0800)
In the KMS case, enter/leavevt won't fix up the interrupt handler for
us, so we need to do it at suspend/resume time.  Make sure we don't fail
the resume if the chip is hung either.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/gpu/drm/i915/i915_drv.c

index 0692622ee2b3dc3d75e47c086a344b1e0fd8bb3b..b293ef0bae7153805d587201c8ce6c84f3703f4c 100644 (file)
@@ -68,9 +68,11 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
        i915_save_state(dev);
 
        /* If KMS is active, we do the leavevt stuff here */
-       if (drm_core_check_feature(dev, DRIVER_MODESET) && i915_gem_idle(dev)) {
-               dev_err(&dev->pdev->dev, "GEM idle failed, aborting suspend\n");
-               return -EBUSY;
+       if (drm_core_check_feature(dev, DRIVER_MODESET)) {
+               if (i915_gem_idle(dev))
+                       dev_err(&dev->pdev->dev,
+                               "GEM idle failed, resume may fail\n");
+               drm_irq_uninstall(dev);
        }
 
        intel_opregion_free(dev);
@@ -108,6 +110,8 @@ static int i915_resume(struct drm_device *dev)
                if (ret != 0)
                        ret = -1;
                mutex_unlock(&dev->struct_mutex);
+
+               drm_irq_install(dev);
        }
 
        return ret;