From c0ff84cb58faff9fdb8d955c6e1e07fd75d88c16 Mon Sep 17 00:00:00 2001
From: Likun Gao <Likun.Gao@amd.com>
Date: Tue, 31 May 2022 10:30:14 +0800
Subject: [PATCH] drm/amdgpu: enable soft reset for gfx 11

Enable soft reset for gfx 11.
V2: enable both gfx v11.0.0 and gfx v11.0.2.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/soc21.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c
index 495848515edfa..765c3543ad183 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc21.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc21.c
@@ -417,7 +417,13 @@ static uint32_t soc21_get_rev_id(struct amdgpu_device *adev)
 
 static bool soc21_need_full_reset(struct amdgpu_device *adev)
 {
-	return true;
+	switch (adev->ip_versions[GC_HWIP][0]) {
+	case IP_VERSION(11, 0, 0):
+	case IP_VERSION(11, 0, 2):
+		return false;
+	default:
+		return true;
+	}
 }
 
 static bool soc21_need_reset_on_init(struct amdgpu_device *adev)
-- 
GitLab