[Intel-gfx] [PATCH] CHROMIUM: drm/i915: fix resume
james.ausmus at intel.com
james.ausmus at intel.com
Fri Aug 16 02:30:55 CEST 2013
From: Stéphane Marchesin <marcheu at chromium.org>
i915 resume relies on vt switch in kernel 3.8.
This is wrong on systems which don't vt switch, like Chrome OS.
Instead, we just save and restore the state properly across
suspend/resume by:
- not disabling everthying on suspend
- forcing a modeset on resume
- forcing a restore of the cursor state
BUG=chromium:221562
TEST=display is on after resume and I see a cursor
Change-Id: I4b59e91ac4770b847aa0821d1fd5394d7176af3c
Reviewed-on: https://gerrit.chromium.org/gerrit/50922
Reviewed-by: Sonny Rao <sonnyrao at chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu at chromium.org>
Tested-by: Stéphane Marchesin <marcheu at chromium.org>
---
drivers/gpu/drm/i915/i915_drv.c | 5 ++---
drivers/gpu/drm/i915/intel_display.c | 4 ++++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 7610fbc..f31b530 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -483,8 +483,6 @@ static int i915_drm_freeze(struct drm_device *dev)
cancel_delayed_work_sync(&dev_priv->rps.delayed_resume_work);
- intel_modeset_disable(dev);
-
drm_irq_uninstall(dev);
}
@@ -563,7 +561,8 @@ static int __i915_drm_thaw(struct drm_device *dev)
mutex_unlock(&dev->struct_mutex);
intel_modeset_init_hw(dev);
- intel_modeset_setup_hw_state(dev, false);
+ intel_modeset_setup_hw_state(dev, true);
+
drm_irq_install(dev);
}
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 0d0b3b3..5dca437 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9367,6 +9367,10 @@ void intel_modeset_setup_hw_state(struct drm_device *dev,
crtc = to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
intel_set_mode(&crtc->base, &crtc->base.mode,
crtc->base.x, crtc->base.y, crtc->base.fb);
+
+ /* Force-cycle the cursor */
+ crtc->cursor_visible = false;
+ intel_crtc_update_cursor(crtc, true);
}
i915_redisable_vga(dev);
--
1.8.3.2
More information about the Intel-gfx
mailing list