Skip to contentSkip to conversation

drm/amdgpu: Clear reset flags from ras context

PATCH In review Lijo Lazar 2 participants 2 messages Jun 4, 2025

Subsystems (2)
lore
Share & tools
lore

Lijo Lazar

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Clear reset flags from ras context

Once RAS errors are cleared with appropriate recovery mechanism, clear reset flags also from RAS context. Otherwise, stale flag values could affect the subsequent RAS reset handling on the device.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -1
index b275e464ae4f..b14d08f8feba 100644
@@ -4415,8 +4415,10 @@ void amdgpu_ras_clear_err_state(struct amdgpu_device *adev)
 	struct amdgpu_ras *ras;
 
 	ras = amdgpu_ras_get_context(adev);
-	if (ras)
+	if (ras) {
 		ras->ras_err_state = 0;
+		ras->gpu_reset_flags = 0;
+	}
 }
 
 void amdgpu_ras_set_err_poison(struct amdgpu_device *adev,
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Regards,
Hawking
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, June 4, 2025 12:10
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>; Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: Clear reset flags from ras context

Once RAS errors are cleared with appropriate recovery mechanism, clear reset flags also from RAS context. Otherwise, stale flag values could affect the subsequent RAS reset handling on the device.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -1
index b275e464ae4f..b14d08f8feba 100644
@@ -4415,8 +4415,10 @@ void amdgpu_ras_clear_err_state(struct amdgpu_device *adev)
        struct amdgpu_ras *ras;
 
        ras = amdgpu_ras_get_context(adev);
-       if (ras)
+       if (ras) {
                ras->ras_err_state = 0;
+               ras->gpu_reset_flags = 0;
+       }
 }
 
 void amdgpu_ras_set_err_poison(struct amdgpu_device *adev,

--
2.25.1