[PATCH] drm/amdgpu: fix for suspend/resume sequence under sriov
Chickanayakanahalli, Sirish
sirish.c at amd.com
Wed Nov 9 18:38:51 UTC 2022
[AMD Official Use Only - General]
@Deucher, Alexander<mailto:Alexander.Deucher at amd.com>
Following up on this to see if the patch reviewed and approved for up streaming?
Thanks,
SIRISH
-----Original Message-----
From: Zhao, Victor <Victor.Zhao at amd.com>
Sent: Thursday, November 3, 2022 12:08 AM
To: Zhao, Victor <Victor.Zhao at amd.com>; amd-gfx at lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher at amd.com>
Cc: Zhang, Bokun <Bokun.Zhang at amd.com>; Chickanayakanahalli, Sirish <sirish.c at amd.com>
Subject: RE: [PATCH] drm/amdgpu: fix for suspend/resume sequence under sriov
[AMD Official Use Only - General]
Hi Alex,
This is a patch fixing the sriov suspend/resume sequence. Please help review.
Thanks,
Victor
-----Original Message-----
From: Victor Zhao <Victor.Zhao at amd.com<mailto:Victor.Zhao at amd.com>>
Sent: Thursday, November 3, 2022 12:06 PM
To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher at amd.com<mailto:Alexander.Deucher at amd.com>>
Cc: Zhao, Victor <Victor.Zhao at amd.com<mailto:Victor.Zhao at amd.com>>
Subject: [PATCH] drm/amdgpu: fix for suspend/resume sequence under sriov
- clear kiq ring after suspend/resume under sriov to aviod kiq ring test failure
- update irq after resume to fix kiq interrput loss
Signed-off-by: Victor Zhao <Victor.Zhao at amd.com<mailto:Victor.Zhao at amd.com>>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 522820eeaa59..5b9f992e4607 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -4197,6 +4197,8 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
}
/* Make sure IB tests flushed */
+ if (amdgpu_sriov_vf(adev))
+ amdgpu_irq_gpu_reset_resume_helper(adev);
flush_delayed_work(&adev->delayed_init_work);
if (adev->in_s0ix) {
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 7853d3ca58cf..49d34c7bbf20 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -6909,6 +6909,8 @@ static int gfx_v10_0_kiq_init_queue(struct amdgpu_ring *ring)
mutex_unlock(&adev->srbm_mutex);
} else {
memset((void *)mqd, 0, sizeof(*mqd));
+ if (amdgpu_sriov_vf(adev) && adev->in_suspend)
+ amdgpu_ring_clear_ring(ring);
mutex_lock(&adev->srbm_mutex);
nv_grbm_select(adev, ring->me, ring->pipe, ring->queue, 0);
amdgpu_ring_init_mqd(ring);
--
2.25.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20221109/1281f646/attachment-0001.htm>
More information about the amd-gfx
mailing list