From: kettenis Date: Sat, 17 Aug 2024 10:33:56 +0000 (+0000) Subject: Linux doesn't consider S4 to be a suspend target state. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e1b86a0ab613f27d5424017f0aa1233ef0d88a5f;p=openbsd Linux doesn't consider S4 to be a suspend target state. ok jsg@ --- diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index 3cf746c6d54..bdb8ed5a05f 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -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