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 <jbar...@virtuousgeek.org>
---
 drivers/gpu/drm/i915/i915_drv.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 3ac0175..ee32221 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -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;
-- 
1.5.6.3


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to