Commit 226485e9 authored by Jesse Barnes's avatar Jesse Barnes Committed by Linus Torvalds

i915: suspend/resume interrupt state

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: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 6c0594a3
...@@ -68,9 +68,11 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state) ...@@ -68,9 +68,11 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
i915_save_state(dev); i915_save_state(dev);
/* If KMS is active, we do the leavevt stuff here */ /* If KMS is active, we do the leavevt stuff here */
if (drm_core_check_feature(dev, DRIVER_MODESET) && i915_gem_idle(dev)) { if (drm_core_check_feature(dev, DRIVER_MODESET)) {
dev_err(&dev->pdev->dev, "GEM idle failed, aborting suspend\n"); if (i915_gem_idle(dev))
return -EBUSY; dev_err(&dev->pdev->dev,
"GEM idle failed, resume may fail\n");
drm_irq_uninstall(dev);
} }
intel_opregion_free(dev); intel_opregion_free(dev);
...@@ -108,6 +110,8 @@ static int i915_resume(struct drm_device *dev) ...@@ -108,6 +110,8 @@ static int i915_resume(struct drm_device *dev)
if (ret != 0) if (ret != 0)
ret = -1; ret = -1;
mutex_unlock(&dev->struct_mutex); mutex_unlock(&dev->struct_mutex);
drm_irq_install(dev);
} }
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment