ACPI: PM: s2idle: Run both AMD and Microsoft methods if both are supported
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 1 Sep 2021 14:21:11 +0000 (09:21 -0500)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 2 Sep 2021 16:14:34 +0000 (18:14 +0200)
commitfa209644a7124b3f4cf811ced55daef49ae39ac6
tree52899f4f76e0407ffeed332dd964d5ed6fc1d5f2
parent6f1e8b12eec44ee047dc9e0a9544b2cfed739503
ACPI: PM: s2idle: Run both AMD and Microsoft methods if both are supported

It was reported that on "HP ENVY x360" that power LED does not come
back, certain keys like brightness controls do not work, and the fan
never spins up, even under load on 5.14 final.

In analysis of the SSDT it's clear that the Microsoft UUID doesn't
provide functional support, but rather the AMD UUID should be
supporting this system.

Because this is a gap in the expected logic, we checked back with
internal team.  The conclusion was that on Windows AMD uPEP *does*
run even when Microsoft UUID present, but most OEM systems have
adopted value of "0x3" for supported functions and hence nothing
runs.

Henceforth add support for running both Microsoft and AMD methods.
This approach will also allow the same logic on Intel systems if
desired at a future time as well by pulling the evaluation of
`lps0_dsm_func_mask_microsoft` out of the `if` block for
`acpi_s2idle_vendor_amd`.

Link: https://gitlab.freedesktop.org/drm/amd/uploads/9fbcd7ec3a385cc6949c9bacf45dc41b/acpi-f.20.bin
BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1691
Reported-by: Maxwell Beck <max@ryt.one>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
[ rjw: Edits of the new comments ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/x86/s2idle.c