Linux doesn't consider S4 to be a suspend target state.
authorkettenis <kettenis@openbsd.org>
Sat, 17 Aug 2024 10:33:56 +0000 (10:33 +0000)
committerkettenis <kettenis@openbsd.org>
Sat, 17 Aug 2024 10:33:56 +0000 (10:33 +0000)
ok jsg@

sys/dev/pci/drm/drm_drv.c

index 3cf746c..bdb8ed5 100644 (file)
@@ -1550,10 +1550,16 @@ drm_activate(struct device *self, int act)
        switch (act) {
        case DVACT_QUIESCE:
 #ifdef CONFIG_ACPI
-               if (acpi_softc && acpi_softc->sc_state == ACPI_STATE_S3)
-                       pm_suspend_target_state = PM_SUSPEND_MEM;
-               else
-                       pm_suspend_target_state = PM_SUSPEND_TO_IDLE;
+               if (acpi_softc) {
+                       switch (acpi_softc->sc_state) {
+                       case ACPI_STATE_S0:
+                               pm_suspend_target_state = PM_SUSPEND_TO_IDLE;
+                               break;
+                       case ACPI_STATE_S3:
+                               pm_suspend_target_state = PM_SUSPEND_MEM;
+                               break;
+                       }
+               }
 #else
                pm_suspend_target_state = PM_SUSPEND_TO_IDLE;
 #endif