]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/amdgpu: fix gpu page fault after hibernation on PF passthrough
authorSamuel Zhang <guoqing.zhang@amd.com>
Wed, 5 Nov 2025 03:04:08 +0000 (03:04 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Dec 2025 10:46:06 +0000 (11:46 +0100)
commiteef72d856f978955e633c270abb1f7ec7b61c6d2
tree1269339d7eaafa7b373f8498f678ee0e5e511972
parent7c2a888605b553ae8ef8b2d6e0c985b02543a3ef
drm/amdgpu: fix gpu page fault after hibernation on PF passthrough

[ Upstream commit eb6e7f520d6efa4d4ebf1671455abe4a681f7a05 ]

On PF passthrough environment, after hibernate and then resume, coralgemm
will cause gpu page fault.

Mode1 reset happens during hibernate, but partition mode is not restored
on resume, register mmCP_HYP_XCP_CTL and mmCP_PSP_XCP_CTL is not right
after resume. When CP access the MQD BO, wrong stride size is used,
this will cause out of bound access on the MQD BO, resulting page fault.

The fix is to ensure gfx_v9_4_3_switch_compute_partition() is called
when resume from a hibernation.
KFD resume is called separately during a reset recovery or resume from
suspend sequence. Hence it's not required to be called as part of
partition switch.

Signed-off-by: Samuel Zhang <guoqing.zhang@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 5d1b32cfe4a676fe552416cb5ae847b215463a1a)
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/aqua_vanjaram.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c