Skip to contentSkip to conversation

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

PATCH In review Patrik Jakobsson 5 participants 5 messages Aug 25, 2015 – Aug 29, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

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 <[email protected]>
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.

---
 drivers/gpu/drm/i915/i915_drv.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +6 -0
index 1d88745..6e3391c 100644
@@ -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;
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 10 lines · Patrik Jakobsson

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 <[email protected]>
Date:   Thu Aug 13 17:06:39 2015 -0300

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

Quoted 7 lines

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

There is no legacy KMS any more, please just kill the hooks entirely. -Daniel

Quoted 24 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +6 -0
index 1d88745..6e3391c 100644
@@ -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;
Signature · 1 line
2.1.4
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer
#2 lore raw
Quoted 14 lines · Daniel Vetter
Quoted 13 lines · Patrik Jakobsson

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 <[email protected]>
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.

Quoted 6 lines
Quoted 4 lines

There is no legacy KMS any more, please just kill the hooks entirely.

http://mid.gmane.org/[email protected]

BR,
Jani.

Quoted 35 lines

-Daniel

Quoted 24 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_drv.c +6 -0
index 1d88745..6e3391c 100644
@@ -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;
Signature · 1 line
2.1.4
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 18 lines · Jani Nikula
Quoted 17 lines · Daniel Vetter
Quoted 16 lines · Patrik Jakobsson

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 <[email protected]>
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.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

There is no legacy KMS any more, please just kill the hooks entirely.

http://mid.gmane.org/[email protected]

BR,
Jani.

Perfect, pick that one. Any reason why it's not merged yet?

-Patrik
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Tested-by on v1 1/1
#4 lore raw
In reply to Patrik Jakobsson

Task id: 7249 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
ILK -1 302/302 301/302

SNB                                  315/315              315/315
IVB                                  336/336              336/336
BYT                                  283/283              283/283
HSW                                  378/378              378/378

-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*ILK igt@kms_flip@wf_vblank-vs-modeset-interruptible PASS(1) DMESG_WARN(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx