[PATCH] drm/amd/amdgpu: add fini virt data exchange to ip_suspend
Zhang, Jack (Jian)
Jack.Zhang1 at amd.com
Fri Mar 5 06:14:33 UTC 2021
[AMD Official Use Only - Internal Distribution Only]
Reviewed-by: Jack Zhang <Jack.Zhang1 at amd.com>
-----Original Message-----
From: Jingwen Chen <Jingwen.Chen2 at amd.com>
Sent: Friday, March 5, 2021 2:12 PM
To: amd-gfx at lists.freedesktop.org
Cc: Chen, Horace <Horace.Chen at amd.com>; Zhang, Jack (Jian) <Jack.Zhang1 at amd.com>; Chen, JingWen <JingWen.Chen2 at amd.com>
Subject: [PATCH] drm/amd/amdgpu: add fini virt data exchange to ip_suspend
[Why]
when try to shutdown guest vm in sriov mode, virt data exchange is not fini. After vram lost, trying to write vram could hang cpu.
[How]
add fini virt data exchange in ip_suspend
Signed-off-by: Jingwen Chen <Jingwen.Chen2 at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index a11760ec3924..bec725b50c1b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2774,8 +2774,10 @@ int amdgpu_device_ip_suspend(struct amdgpu_device *adev) {
int r;
-if (amdgpu_sriov_vf(adev))
+if (amdgpu_sriov_vf(adev)) {
+amdgpu_virt_fini_data_exchange(adev);
amdgpu_virt_request_full_gpu(adev, false);
+}
r = amdgpu_device_ip_suspend_phase1(adev);
if (r)
--
2.25.1
More information about the amd-gfx
mailing list