From e1b86a0ab613f27d5424017f0aa1233ef0d88a5f Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 17 Aug 2024 10:33:56 +0000 Subject: [PATCH] Linux doesn't consider S4 to be a suspend target state. ok jsg@ --- sys/dev/pci/drm/drm_drv.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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 -- 2.20.1