[PATCH] drm/amdgpu/mes12: mes hw_fini fix for mode1 reset

Zhang, Hawking Hawking.Zhang at amd.com
Tue May 21 07:54:17 UTC 2024


[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>

Regards,
Hawking
-----Original Message-----
From: Xiao, Jack <Jack.Xiao at amd.com>
Sent: Tuesday, May 21, 2024 15:36
To: amd-gfx at lists.freedesktop.org; Deucher, Alexander <Alexander.Deucher at amd.com>; Zhang, Hawking <Hawking.Zhang at amd.com>; Min, Frank <Frank.Min at amd.com>; Gao, Likun <Likun.Gao at amd.com>; Feng, Kenneth <Kenneth.Feng at amd.com>
Cc: Xiao, Jack <Jack.Xiao at amd.com>
Subject: [PATCH] drm/amdgpu/mes12: mes hw_fini fix for mode1 reset

Port mes11 hw_fini to mes12, fix for mode1 reset.

Signed-off-by: Jack Xiao <Jack.Xiao at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
index 45b70a4c4ada..f18fdda023c9 100644
--- a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
@@ -1380,11 +1380,12 @@ static int mes_v12_0_kiq_hw_init(struct amdgpu_device *adev)

 static int mes_v12_0_kiq_hw_fini(struct amdgpu_device *adev)  {
-       if (!adev->enable_uni_mes && adev->mes.ring.sched.ready)
+       if (adev->mes.ring.sched.ready) {
                mes_v12_0_kiq_dequeue_sched(adev);
+               adev->mes.ring.sched.ready = false;
+       }

-       if (!amdgpu_sriov_vf(adev))
-               mes_v12_0_enable(adev, false);
+       mes_v12_0_enable(adev, false);

        return 0;
 }
--
2.41.0



More information about the amd-gfx mailing list