]> git.baikalelectronics.ru Git - kernel.git/commit
PM: hibernate: Allow hybrid sleep to work with s2idle
authorMario Limonciello <mario.limonciello@amd.com>
Thu, 13 Oct 2022 03:50:17 +0000 (22:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 14:56:55 +0000 (23:56 +0900)
commit00266a5d873a8b2f1faf7d9ad4713a6606b0feef
treeb05af0dda386f5106e6d5a7818a7d104ed73b10f
parentc0b2a8d7b80f48c147212ad3a49c559f4b08db1b
PM: hibernate: Allow hybrid sleep to work with s2idle

[ Upstream commit 176b6a133e34968aada61ca18e2a086f997553c9 ]

Hybrid sleep is currently hardcoded to only operate with S3 even
on systems that might not support it.

Instead of assuming this mode is what the user wants to use, for
hybrid sleep follow the setting of `mem_sleep_current` which
will respect mem_sleep_default kernel command line and policy
decisions made by the presence of the FADT low power idle bit.

Fixes: b0bd9ee1c371 ("PM / hibernate: Untangle power_down()")
Reported-and-tested-by: kolAflash <kolAflash@kolahilft.de>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216574
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/power/hibernate.c