From: Mario Limonciello <mario.limonciello@amd.com>
To: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org
Cc: Julian Sikorski <belegdol@gmail.com>,
teohhanhui@gmail.com, Shyam-sundar.S-k@amd.com,
Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Subject: [PATCH 3/5] ACPI: PM: s2idle: Add support for multiple func mask
Date: Thu, 17 Jun 2021 11:42:10 -0500 [thread overview]
Message-ID: <20210617164212.584-3-mario.limonciello@amd.com> (raw)
In-Reply-To: <20210617164212.584-1-mario.limonciello@amd.com>
From: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Required for follow-up patch adding new UUID
needing new function mask.
Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
---
drivers/acpi/x86/s2idle.c | 31 ++++++++++++++++++++-----------
1 file changed, 20 insertions(+), 11 deletions(-)
diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c
index c0cba025072f..0d19669ac7ad 100644
--- a/drivers/acpi/x86/s2idle.c
+++ b/drivers/acpi/x86/s2idle.c
@@ -309,14 +309,15 @@ static void lpi_check_constraints(void)
}
}
-static void acpi_sleep_run_lps0_dsm(unsigned int func)
+static void acpi_sleep_run_lps0_dsm(unsigned int func, unsigned int func_mask, guid_t dsm_guid)
{
union acpi_object *out_obj;
- if (!(lps0_dsm_func_mask & (1 << func)))
+ if (!(func_mask & (1 << func)))
return;
- out_obj = acpi_evaluate_dsm(lps0_device_handle, &lps0_dsm_guid, rev_id, func, NULL);
+ out_obj = acpi_evaluate_dsm(lps0_device_handle, &dsm_guid,
+ rev_id, func, NULL);
ACPI_FREE(out_obj);
acpi_handle_debug(lps0_device_handle, "_DSM function %u evaluation %s\n",
@@ -412,11 +413,15 @@ int acpi_s2idle_prepare_late(void)
lpi_check_constraints();
if (acpi_s2idle_vendor_amd()) {
- acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF_AMD);
- acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY_AMD);
+ acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF_AMD,
+ lps0_dsm_func_mask, lps0_dsm_guid);
+ acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY_AMD,
+ lps0_dsm_func_mask, lps0_dsm_guid);
} else {
- acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF);
- acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY);
+ acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_OFF,
+ lps0_dsm_func_mask, lps0_dsm_guid);
+ acpi_sleep_run_lps0_dsm(ACPI_LPS0_ENTRY,
+ lps0_dsm_func_mask, lps0_dsm_guid);
}
return 0;
@@ -428,11 +433,15 @@ 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);
+ acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT_AMD,
+ lps0_dsm_func_mask, lps0_dsm_guid);
+ acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON_AMD,
+ lps0_dsm_func_mask, lps0_dsm_guid);
} else {
- acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT);
- acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON);
+ acpi_sleep_run_lps0_dsm(ACPI_LPS0_EXIT,
+ lps0_dsm_func_mask, lps0_dsm_guid);
+ acpi_sleep_run_lps0_dsm(ACPI_LPS0_SCREEN_ON,
+ lps0_dsm_func_mask, lps0_dsm_guid);
}
}
--
2.25.1
next prev parent reply other threads:[~2021-06-17 16:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 16:42 [PATCH 1/5] ACPI: PM: s2idle: Use correct revision id Mario Limonciello
2021-06-17 16:42 ` [PATCH 2/5] ACPI: PM: s2idle: Refactor common code Mario Limonciello
2021-06-17 18:28 ` Julian Sikorski
2021-06-17 16:42 ` Mario Limonciello [this message]
2021-06-17 18:28 ` [PATCH 3/5] ACPI: PM: s2idle: Add support for multiple func mask Julian Sikorski
2021-06-18 16:30 ` Rafael J. Wysocki
2021-06-18 16:34 ` Limonciello, Mario
2021-06-18 16:41 ` Rafael J. Wysocki
2021-06-17 16:42 ` [PATCH 4/5] ACPI: PM: s2idle: Add support for new Microsoft UUID Mario Limonciello
2021-06-17 18:28 ` Julian Sikorski
2021-06-17 16:42 ` [PATCH 5/5] ACPI: PM: Adjust behavior for field problems on AMD systems Mario Limonciello
2021-06-17 18:28 ` Julian Sikorski
2021-06-18 8:05 ` Kai-Heng Feng
2021-06-17 18:28 ` [PATCH 1/5] ACPI: PM: s2idle: Use correct revision id Julian Sikorski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210617164212.584-3-mario.limonciello@amd.com \
--to=mario.limonciello@amd.com \
--cc=Pratik.Vishwakarma@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=belegdol@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=teohhanhui@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.