Skip to contentSkip to conversation

drm/amdgpu: fix a potential GPU hang on cyan skillfish

PATCH In review Lang Yu 3 participants 3 messages Jan 28, 2022 – Jan 29, 2022

Subsystems (2)
lore
Share & tools
lore

Lang Yu

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix a potential GPU hang on cyan skillfish

We observed a GPU hang when querying GMC CG state(i.e., cat amdgpu_pm_info) on cyan skillfish. Acctually, cyan skillfish doesn't support any CG features.

Just prevent cyan skillfish from accessing GMC CG registers.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +3 -0
index 73ab0eebe4e2..bddaf2417344 100644
@@ -1156,6 +1156,9 @@ static void gmc_v10_0_get_clockgating_state(void *handle, u32 *flags)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 3))
+		return;
+
 	adev->mmhub.funcs->get_clockgating(adev, flags);
 
 	if (adev->ip_versions[ATHUB_HWIP][0] >= IP_VERSION(2, 1, 0))
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Lang Yu

We observed a GPU hang when querying GMC CG state(i.e., cat amdgpu_pm_info) on cyan skillfish. Acctually, cyan skillfish doesn't support any CG features.

Just prevent cyan skillfish from accessing GMC CG registers.

Thanks,
Lijo

Quoted 19 lines
---
  drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +3 -0
index 73ab0eebe4e2..bddaf2417344 100644
@@ -1156,6 +1156,9 @@ static void gmc_v10_0_get_clockgating_state(void *handle, u32 *flags)
  {
  	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 3))
+		return;
+
  	adev->mmhub.funcs->get_clockgating(adev, flags);
 
  	if (adev->ip_versions[ATHUB_HWIP][0] >= IP_VERSION(2, 1, 0))
Reviewed-by on v1 1/1
#2 lore raw
In reply to Lang Yu
Quoted 7 lines · Lang

We observed a GPU hang when querying GMC CG state(i.e., cat amdgpu_pm_info) on cyan skillfish. Acctually, cyan skillfish doesn't support any CG features.

Just prevent cyan skillfish from accessing GMC CG registers.

Quoted 21 lines
---
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c +3 -0
index 73ab0eebe4e2..bddaf2417344 100644
@@ -1156,6 +1156,9 @@ static void gmc_v10_0_get_clockgating_state(void *handle, u32 *flags)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
+	if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 1, 3))
+		return;
+
 	adev->mmhub.funcs->get_clockgating(adev, flags);
 
 	if (adev->ip_versions[ATHUB_HWIP][0] >= IP_VERSION(2, 1, 0))
Signature · 1 line
2.25.1