Skip to content

Commit

Permalink
i915: suspend/resume interrupt state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesse Barnes authored and Linus Torvalds committed Feb 24, 2009
1 parent 6c0594a commit 226485e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/gpu/drm/i915/i915_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 226485e

Please sign in to comment.