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

Jack Xiao Jack.Xiao at amd.com
Tue May 21 07:35:35 UTC 2024


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