ACPI: PM: s2idle: Add missing LPS0 functions for AMD
PATCH 1/1 ACPI: PM: s2idle: Add missing LPS0 functions for AMD
These are supposedly not required for AMD platforms, but at least some HP laptops seem to require it to properly turn off the keyboard backlight.
Based on a patch from Marcin Bachry <[email protected]>.
---
Resend with updated subject.
drivers/acpi/x86/s2idle.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/acpi/x86/s2idle.c +4 -0
@@ -42,6 +42,8 @@ static const struct acpi_device_id lps0_device_ids[] = {/* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" +#define ACPI_LPS0_ENTRY_AMD 2 +#define ACPI_LPS0_EXIT_AMD 3#define ACPI_LPS0_SCREEN_OFF_AMD 4#define ACPI_LPS0_SCREEN_ON_AMD 5
@@ -408,6 +410,7 @@ int acpi_s2idle_prepare_late(void)if (acpi_s2idle_vendor_amd ()) {acpi_sleep_run_lps0_dsm (ACPI_LPS0_SCREEN_OFF_AMD ); +acpi_sleep_run_lps0_dsm (ACPI_LPS0_ENTRY_AMD ); }else {acpi_sleep_run_lps0_dsm (ACPI_LPS0_SCREEN_OFF );acpi_sleep_run_lps0_dsm (ACPI_LPS0_ENTRY );
@@ -422,6 +425,7 @@ void acpi_s2idle_restore_early(void)return ;if (acpi_s2idle_vendor_amd ()) { +acpi_sleep_run_lps0_dsm (ACPI_LPS0_EXIT_AMD );acpi_sleep_run_lps0_dsm (ACPI_LPS0_SCREEN_ON_AMD ); }else {acpi_sleep_run_lps0_dsm (ACPI_LPS0_EXIT );
Signature · 6 lines
2.30.2 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Rafael J. Wysocki
maintainerQuoted 41 lines · Alex Deucher
These are supposedly not required for AMD platforms, but at least some HP laptops seem to require it to properly turn off the keyboard backlight.
Based on a patch from Marcin Bachry <[email protected]>.
Reviewed-by Hans de Goede <[email protected]>Signed-off-by Alex Deucher <[email protected]>Cc Marcin Bachry <[email protected]>Cc Mario Limonciello <[email protected]>---
Resend with updated subject.
drivers/acpi/x86/s2idle.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/acpi/x86/s2idle.c +3
-0@@ -42,6 +42,8 @@ static const struct acpi_device_id lps0_device_ids[] = {/* AMD */ #define ACPI_LPS0_DSM_UUID_AMD "e3f32452-febc-43ce-9039-932122d37721" +#define ACPI_LPS0_ENTRY_AMD 2 +#define ACPI_LPS0_EXIT_AMD 3#define ACPI_LPS0_SCREEN_OFF_AMD 4#define ACPI_LPS0_SCREEN_ON_AMD 5@@ -408,6 +410,7 @@ int acpi_s2idle_prepare_late(void)if (acpi_s2idle_vendor_amd ()) {acpi_sleep_run_lps0_dsm (ACPI_LPS0_SCREEN_OFF_AMD ); +acpi_sleep_run_lps0_dsm (ACPI_LPS0_ENTRY_AMD ); }else {acpi_sleep_run_lps0_dsm (ACPI_LPS0_SCREEN_OFF );acpi_sleep_run_lps0_dsm (ACPI_LPS0_ENTRY );
drivers/acpi/x86/s2idle.c void acpi_s2idle_restore_early(void)
Quoted 8 lines
drivers/acpi/x86/s2idle.c +1
-1@@ -422,6 +425,7 @@ void acpi_s2idle_restore_early(void)return ;if (acpi_s2idle_vendor_amd ()) { +acpi_sleep_run_lps0_dsm (ACPI_LPS0_EXIT_AMD );acpi_sleep_run_lps0_dsm (ACPI_LPS0_SCREEN_ON_AMD ); }else {acpi_sleep_run_lps0_dsm (ACPI_LPS0_EXIT ); --
Applied as 5.14 material, thanks!
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx