[Intel-gfx] [PATCH 15/15] drm/i915: don't touch console_lock for I915_FBDEV=n

Daniel Vetter daniel.vetter at ffwll.ch
Wed Aug 6 15:04:58 CEST 2014


We still have locking hilarity between the console_lock and the world,
so really don't bother with it if at all possible. This shuts up a
locdep splat I'm seeing after a system s/r cycle followed by reloading
i915.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 drivers/gpu/drm/i915/i915_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 6c4b25ce8bb0..f522a6371bc0 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -554,9 +554,11 @@ static int i915_drm_freeze(struct drm_device *dev)
 	intel_uncore_forcewake_reset(dev, false);
 	intel_opregion_fini(dev);
 
+#ifdef CONFIG_DRM_I915_FBDEV
 	console_lock();
 	intel_fbdev_set_suspend(dev, FBINFO_STATE_SUSPENDED);
 	console_unlock();
+#endif
 
 	dev_priv->suspend_count++;
 
@@ -677,6 +679,7 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
 
 	intel_opregion_init(dev);
 
+#ifdef CONFIG_DRM_I915_FBDEV
 	/*
 	 * The console lock can be pretty contented on resume due
 	 * to all the printk activity.  Try to keep it out of the hot
@@ -688,6 +691,7 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings)
 	} else {
 		schedule_work(&dev_priv->console_resume_work);
 	}
+#endif
 
 	mutex_lock(&dev_priv->modeset_restore_lock);
 	dev_priv->modeset_restore = MODESET_DONE;
-- 
1.9.3




More information about the Intel-gfx mailing list