linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI: PM: s2idle: Invert Microsoft UUID entry and exit
@ 2021-08-10  1:40 Mario Limonciello
  2021-08-16 16:30 ` Rafael J. Wysocki
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2021-08-10  1:40 UTC (permalink / raw)
  To: Rafael J . Wysocki, linux-acpi; +Cc: Pratik.Vishwakarma, Mario Limonciello

It was reported by a user with a Dell m15 R5 (5800H) that
the keyboard backlight was turning on when entering suspend
and turning off when exiting (the opposite of how it should be).

The user bisected it back to commit 5dbf50997578 ("ACPI: PM:
s2idle: Add support for new Microsoft UUID").  Previous to that
commit the LEDs didn't turn off at all.  Confirming in the spec,
these were reversed when introduced.

Fix them to match the spec.

BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1230#note_1021836
Fixes: 5dbf50997578 ("ACPI: PM: s2idle: Add support for new Microsoft UUID")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/acpi/x86/s2idle.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index fbdbef0ab552..3a308461246a 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -452,7 +452,7 @@ int acpi_s2idle_prepare_late(void)
 	if (lps0_dsm_func_mask_microsoft > 0) {
 		acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF,
 				lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
-		acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT,
+		acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY,
 				lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
 		acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY,
 				lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
@@ -479,7 +479,7 @@ void acpi_s2idle_restore_early(void)
 	if (lps0_dsm_func_mask_microsoft > 0) {
 		acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT,
 				lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
-		acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY,
+		acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT,
 				lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
 		acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON,
 				lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ACPI: PM: s2idle: Invert Microsoft UUID entry and exit
  2021-08-10  1:40 [PATCH] ACPI: PM: s2idle: Invert Microsoft UUID entry and exit Mario Limonciello
@ 2021-08-16 16:30 ` Rafael J. Wysocki
  0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2021-08-16 16:30 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: Rafael J . Wysocki, ACPI Devel Maling List, Pratik Vishwakarma

On Tue, Aug 10, 2021 at 3:40 AM Mario Limonciello
<mario.limonciello@amd.com> wrote:
>
> It was reported by a user with a Dell m15 R5 (5800H) that
> the keyboard backlight was turning on when entering suspend
> and turning off when exiting (the opposite of how it should be).
>
> The user bisected it back to commit 5dbf50997578 ("ACPI: PM:
> s2idle: Add support for new Microsoft UUID").  Previous to that
> commit the LEDs didn't turn off at all.  Confirming in the spec,
> these were reversed when introduced.
>
> Fix them to match the spec.
>
> BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1230#note_1021836
> Fixes: 5dbf50997578 ("ACPI: PM: s2idle: Add support for new Microsoft UUID")
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---
>  drivers/acpi/x86/s2idle.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
> index fbdbef0ab552..3a308461246a 100644
> --- a/drivers/acpi/x86/s2idle.c
> +++ b/drivers/acpi/x86/s2idle.c
> @@ -452,7 +452,7 @@ int acpi_s2idle_prepare_late(void)
>         if (lps0_dsm_func_mask_microsoft > 0) {
>                 acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF,
>                                 lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
> -               acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT,
> +               acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY,
>                                 lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
>                 acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY,
>                                 lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
> @@ -479,7 +479,7 @@ void acpi_s2idle_restore_early(void)
>         if (lps0_dsm_func_mask_microsoft > 0) {
>                 acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT,
>                                 lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
> -               acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_ENTRY,
> +               acpi_sleep_run_lps0_dsm(ACPI_LPS0_MS_EXIT,
>                                 lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
>                 acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON,
>                                 lps0_dsm_func_mask_microsoft, lps0_dsm_guid_microsoft);
> --

Applied as 5.14-rc material, thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-16 16:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10  1:40 [PATCH] ACPI: PM: s2idle: Invert Microsoft UUID entry and exit Mario Limonciello
2021-08-16 16:30 ` Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).