diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-02-23 18:41:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-23 20:23:57 -0500 |
commit | 226485e9a91ee89c941d8cb7714f85644a8071d0 (patch) | |
tree | ff0839054edbd810dbaa384bd76871fed96d2fa7 /drivers/gpu | |
parent | 6c0594a306790ab03db345086c0c6c922a900bf6 (diff) |
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: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | 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 0692622ee2b3..b293ef0bae71 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) | |||
68 | i915_save_state(dev); | 68 | i915_save_state(dev); |
69 | 69 | ||
70 | /* If KMS is active, we do the leavevt stuff here */ | 70 | /* If KMS is active, we do the leavevt stuff here */ |
71 | if (drm_core_check_feature(dev, DRIVER_MODESET) && i915_gem_idle(dev)) { | 71 | if (drm_core_check_feature(dev, DRIVER_MODESET)) { |
72 | dev_err(&dev->pdev->dev, "GEM idle failed, aborting suspend\n"); | 72 | if (i915_gem_idle(dev)) |
73 | return -EBUSY; | 73 | dev_err(&dev->pdev->dev, |
74 | "GEM idle failed, resume may fail\n"); | ||
75 | drm_irq_uninstall(dev); | ||
74 | } | 76 | } |
75 | 77 | ||
76 | intel_opregion_free(dev); | 78 | intel_opregion_free(dev); |
@@ -108,6 +110,8 @@ static int i915_resume(struct drm_device *dev) | |||
108 | if (ret != 0) | 110 | if (ret != 0) |
109 | ret = -1; | 111 | ret = -1; |
110 | mutex_unlock(&dev->struct_mutex); | 112 | mutex_unlock(&dev->struct_mutex); |
113 | |||
114 | drm_irq_install(dev); | ||
111 | } | 115 | } |
112 | 116 | ||
113 | return ret; | 117 | return ret; |