]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amd: Add concept of running prepare_suspend() sequence for IP blocks
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 6 Oct 2023 18:50:21 +0000 (13:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:35:55 +0000 (16:35 +0200)
commitda67a1139f054fc59c9c18f135729bc16aef93d4
tree63e9df6cdca3486e546d877e81b8de263c3b8009
parent8b5f720486ca87e102ee722a73ae0894c12f1e7a
drm/amd: Add concept of running prepare_suspend() sequence for IP blocks

[ Upstream commit cb11ca3233aa3303dc11dca25977d2e7f24be00f ]

If any IP blocks allocate memory during their hw_fini() sequence
this can cause the suspend to fail under memory pressure.  Introduce
a new phase that IP blocks can use to allocate memory before suspend
starts so that it can potentially be evicted into swap instead.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: ca299b4512d4 ("drm/amd: Flush GFXOFF requests in prepare stage")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/include/amd_shared.h