lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251226102656.6296-7-lkml@antheas.dev>
Date: Fri, 26 Dec 2025 12:26:44 +0200
From: Antheas Kapenekakis <lkml@...heas.dev>
To: dmitry.osipenko@...labora.com
Cc: bob.beckett@...labora.com,
	bookeldor@...il.com,
	hadess@...ess.net,
	jaap@...tsma.org,
	kernel@...labora.com,
	lennart@...ttering.net,
	linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	lkml@...heas.dev,
	mccann@....edu,
	rafael@...nel.org,
	richard@...hsie.com,
	sebastian.reichel@...labora.com,
	superm1@...nel.org,
	systemd-devel@...ts.freedesktop.org,
	xaver.hugl@...il.com
Subject: [RFC v1 6/8] acpi/x86: s2idle: implement turn on display DSM as
 resume notification

Windows implements a DSM called "Turn On Display". This notification is
sent to the hardware while on the sleep state if the user interacted
with the device and caused it to wake up in such a way where the display
should turn on.

This allows the OEM to counter the effects of Sleep entry such as a
reduced power envelope to allow for the device to wake up faster.
Implement it as part of the "resume" state in the Microsoft-agnostic
kernel ABI.

Link: https://learn.microsoft.com/en-us/windows-hardware/design/device-experiences/modern-standby-firmware-notifications
Signed-off-by: Antheas Kapenekakis <lkml@...heas.dev>
---
 drivers/acpi/x86/s2idle.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index 7693162c68fd..965b78cc8bf5 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -39,12 +39,13 @@ static const struct acpi_device_id lps0_device_ids[] = {
 #define ACPI_LPS0_DSM_UUID	"c4eb40a0-6cd2-11e2-bcfd-0800200c9a66"
 
 #define ACPI_LPS0_GET_DEVICE_CONSTRAINTS	1
-#define ACPI_LPS0_DISPLAY_OFF	3
-#define ACPI_LPS0_DISPLAY_ON	4
-#define ACPI_LPS0_ENTRY		5
-#define ACPI_LPS0_EXIT		6
-#define ACPI_LPS0_SLEEP_ENTRY	7
-#define ACPI_LPS0_SLEEP_EXIT	8
+#define ACPI_LPS0_DISPLAY_OFF		3
+#define ACPI_LPS0_DISPLAY_ON		4
+#define ACPI_LPS0_ENTRY			5
+#define ACPI_LPS0_EXIT			6
+#define ACPI_LPS0_SLEEP_ENTRY		7
+#define ACPI_LPS0_SLEEP_EXIT		8
+#define ACPI_LPS0_TURN_ON_DISPLAY	9
 
 /* AMD */
 #define ACPI_LPS0_DSM_UUID_AMD      "e3f32452-febc-43ce-9039-932122d37721"
@@ -352,6 +353,8 @@ static const char *acpi_sleep_dsm_state_to_str(unsigned int state)
 			return "sleep entry";
 		case ACPI_LPS0_SLEEP_EXIT:
 			return "sleep exit";
+		case ACPI_LPS0_TURN_ON_DISPLAY:
+			return "turn on display";
 		}
 	} else {
 		switch (state) {
@@ -528,6 +531,9 @@ static u8 acpi_s2idle_get_standby_states(void)
 		if (lps0_dsm_func_mask_microsoft &
 		    (1 << ACPI_LPS0_SLEEP_ENTRY | 1 << ACPI_LPS0_SLEEP_EXIT))
 			states |= BIT(PM_STANDBY_SLEEP);
+		if (lps0_dsm_func_mask_microsoft &
+		    (1 << ACPI_LPS0_TURN_ON_DISPLAY))
+			states |= BIT(PM_STANDBY_RESUME);
 	}
 
 	if (lps0_dsm_func_mask > 0) {
@@ -587,6 +593,12 @@ static int acpi_s2idle_do_notification(standby_notification_t state)
 						lps0_dsm_func_mask_microsoft,
 						lps0_dsm_guid_microsoft);
 		break;
+	case PM_SN_RESUME:
+		if (lps0_dsm_func_mask_microsoft > 0)
+			acpi_sleep_run_lps0_dsm(ACPI_LPS0_TURN_ON_DISPLAY,
+						lps0_dsm_func_mask_microsoft,
+						lps0_dsm_guid_microsoft);
+		break;
 	default:
 		return -EINVAL;
 	}
-- 
2.52.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ