Skip to contentSkip to conversation

drm/amdgpu: skip ras error reset in gpu reset only when uniras is enabled

PATCH In review Ce Sun 2 participants 2 messages Sep 15 – Sep 16

Subsystems (2)
lore
Share & tools
lore

Ce Sun

author
#0 lore raw

PATCH 1/1 drm/amdgpu: skip ras error reset in gpu reset only when uniras is enabled

The original logic skips RAS error reset whenever GPU is in reset or RAS recovery. This change adds amdgpu_uniras_enabled() condition, so we only skip the reset when uniras is enabled. For ASICs without uniras, we still perform RAS error reset during GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
index 6b2b8acdbf9b..c65916d84683 100644
@@ -1513,7 +1513,8 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev,
 		return -EOPNOTSUPP;
 
 	/* skip ras error reset in gpu reset */
-	if (amdgpu_in_reset(adev) || amdgpu_ras_in_recovery(adev))
+	if ((amdgpu_in_reset(adev) || amdgpu_ras_in_recovery(adev)) &&
+	     amdgpu_uniras_enabled(adev))
 		return -EOPNOTSUPP;
 
 	if (block_obj->hw_ops->reset_ras_error_count)
Signature · 1 line
2.34.1
#1 lore raw

AMD General

It's better to explain why unias can skip the operation and ASICs without uniras needs it.

Regards,
Tao

Quoted 38 lines

-----Original Message-----
From: Sun, Ce(Overlord) <[email protected]>
Sent: Tuesday, September 15, 2026 5:45 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Chai, Thomas <[email protected]>; Zhou1, Tao <[email protected]>; Yang, Stanley <[email protected]>; Sun, Ce(Overlord) <[email protected]>
Subject: [PATCH] drm/amdgpu: skip ras error reset in gpu reset only when uniras is enabled

The original logic skips RAS error reset whenever GPU is in reset or RAS recovery. This change adds amdgpu_uniras_enabled() condition, so we only skip the reset when uniras is enabled. For ASICs without uniras, we still perform RAS error reset during GPU reset.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +2 -1
index 6b2b8acdbf9b..c65916d84683 100644
@@ -1513,7 +1513,8 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device
 *adev,
              return -EOPNOTSUPP;
 
      /* skip ras error reset in gpu reset */
-     if (amdgpu_in_reset(adev) || amdgpu_ras_in_recovery(adev))
+     if ((amdgpu_in_reset(adev) || amdgpu_ras_in_recovery(adev)) &&
+          amdgpu_uniras_enabled(adev))
              return -EOPNOTSUPP;
 
      if (block_obj->hw_ops->reset_ras_error_count)

--
2.34.1