[PATCH] drm/i915: Unhook legacy suspend/resume when KMS is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It's not allowed to have legacy suspend/resume hooked up when
DRIVER_MODESET is set. Doing so results in a warning introduced by the
commit below.

commit e8b4855b5dd3e285d0ec18ed15468025abc1be9a
Author: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
Date:   Thu Aug 13 17:06:39 2015 -0300

    drm: WARN_ON if a modeset driver uses legacy suspend/resume helpers

    Legacy s/r hooks are only used for shadow-attaching drivers, warn
    when a KMS driver tries to use them.

    Signed-off-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
    Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>

Signed-off-by: Patrik Jakobsson <patrik.jakobsson@xxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_drv.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 1d88745..6e3391c 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1706,6 +1706,12 @@ static int __init i915_init(void)
 	if (i915.modeset == 0)
 		driver.driver_features &= ~DRIVER_MODESET;
 
+	/* Unhook legacy suspend and resume when KMS is enabled */
+	if (driver.driver_features & DRIVER_MODESET) {
+		driver.suspend = NULL;
+		driver.resume = NULL;
+	}
+
 #ifdef CONFIG_VGA_CONSOLE
 	if (vgacon_text_force() && i915.modeset == -1)
 		driver.driver_features &= ~DRIVER_MODESET;
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux