Commit 469d80a3 authored by Mario Limonciello (AMD)'s avatar Mario Limonciello (AMD) Committed by Rafael J. Wysocki
Browse files

PM: hibernate: Fix hybrid-sleep



Hybrid sleep will hibernate the system followed by running through
the suspend routine.  Since both the hibernate and the suspend routine
will call pm_restrict_gfp_mask(), pm_restore_gfp_mask() must be called
before starting the suspend sequence.

Add an explicit call to pm_restore_gfp_mask() to power_down() before
the suspend sequence starts. Add an extra call for pm_restrict_gfp_mask()
when exiting suspend so that the pm_restore_gfp_mask() call in hibernate()
is balanced.

Reported-by: default avatarIonut Nechita <ionut_n2001@yahoo.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4573


Tested-by: default avatarIonut Nechita <ionut_n2001@yahoo.com>
Fixes: 12ffc3b1 ("PM: Restrict swap use to later in the suspend sequence")
Tested-by: default avatarKenneth Crudup <kenny@panix.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarMario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/20250925185108.2968494-2-superm1@kernel.org


[ rjw: Add comment explainig the new pm_restrict_gfp_mask() call purpose ]
Cc: 6.16+ <stable@vger.kernel.org> # 6.16+
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent bd03c702
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment