]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
ACPI / PM: Do not reconfigure GPEs for suspend-to-idle
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 17 May 2018 04:19:00 +0000 (06:19 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 23 May 2018 07:08:45 +0000 (09:08 +0200)
commitfc2ced8f5bcc63201fc37def116dd0193594b4e2
treea960aea3c7dd8edeec18d7de8ce9040f4069e68d
parent0e07362e1ad97d03cea758a51b86669b9b98b7d7
ACPI / PM: Do not reconfigure GPEs for suspend-to-idle

BugLink: http://bugs.launchpad.net/bugs/1771542
It is reported that commit 235d81a630ca (ACPI / PM: Clean up device
wakeup enable/disable code) broke wakeup from suspend-to-idle on
some platforms.  That is due to the acpi_enable_all_wakeup_gpes() in
acpi_s2idle_prepare() which needs acpi_enable_wakeup_devices() to be
called before it as the latter sets up the GPE masks used by the
former and commit 235d81a630ca removed acpi_enable_wakeup_devices()
invocation from the suspend-to-idle path.

However, acpi_enable_wakeup_devices() does more than just setting
the GPE masks and the remaining part of it is not necessary for
suspend-to-idle.  Moreover, non-wakeup GPEs are disabled on suspend-
to-idle entry to avoid spurious wakeups, but that should not be
strictly necessary any more after commit 33e4f80ee69b (ACPI / PM:
Ignore spurious SCI wakeups from suspend-to-idle) which prevents
spurious GPE wakeups from resuming the system.  The only consequence
of leaving non-wakeup GPEs enabled may be more interrupt-related
activity while suspended, which is not ideal (more energy is used
if that happens), but it is not critical too.

For this reason, drop the GPE reconfiguration from the suspend-to-idle
path entirely.

This change also allows Dells XPS13 9360 blacklisted by commit
71630b7a832f (ACPI / PM: Blacklist Low Power S0 Idle _DSM for Dell
XPS13 9360) to use the power button for waking up from suspend-
to-idle and it helps at least one other older Dell system (the
wakeup button GPE on that one is not listed in _PRW for any
devices, so it is not regarded as a wakeup one and gets disabled
on suspend-to-idle entry today).

Fixes: 235d81a630ca (ACPI / PM: Clean up device wakeup enable/disable code)
Reported-by: Du Wenkai <wenkai.du@intel.com>
Tested-by: Du Wenkai <wenkai.du@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 147a7d9d25ca2551aab15071cb1f048ecd9b7953)
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Acked-by: AceLan Kao <acelan.kao@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/acpi/sleep.c