Skip to contentSkip to conversation

drm/amdgpu: Avoid VF for RAS recovery source check

PATCH In review Lijo Lazar 2 participants 2 messages Dec 9, 2024 – Dec 10, 2024

Subsystems (2)
lore
Share & tools
lore

Lijo Lazar

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Avoid VF for RAS recovery source check

VF device sets the RAS flag when mailbox data can't be read properly. There is no conclusive way to tell if the real source is RAS error. Therefore VF schedules a KFD based reset which doesn't set RAS source. SKip checking RAS source for any VF scheduled recovery.

Fixes 2211660c20a0 ("drm/amdgpu: Prefer RAS recovery for scheduler hang")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 735a01c58cd7..eb3fd55a3702 100644
@@ -5864,6 +5864,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
 	 * detected at the same time, let RAS recovery take care of it.
 	 */
 	if (amdgpu_ras_is_err_state(adev, AMDGPU_RAS_BLOCK__ANY) &&
+	    !amdgpu_sriov_vf(adev) &&
 	    reset_context->src != AMDGPU_RESET_SRC_RAS) {
 		dev_dbg(adev->dev,
 			"Gpu recovery from source: %d yielding to RAS error recovery handling",
Signature · 1 line
2.25.1
Reviewed-by Tested-by on v1 1/1
#1 lore raw

[Public]

Thanks,
Yiqing(James).

________________________________
From: amd-gfx <[email protected]> on behalf of Lijo Lazar <[email protected]>
Sent: Monday, December 9, 2024 11:52 PM
To: [email protected] <[email protected]>
Cc: Zhang, Hawking <[email protected]>; Deucher, Alexander <[email protected]>; Zhou1, Tao <[email protected]>; Skvortsov, Victor <[email protected]>; Zhao, Victor <[email protected]>; Tomasevic, Vojislav <[email protected]>
Subject: [PATCH] drm/amdgpu: Avoid VF for RAS recovery source check

VF device sets the RAS flag when mailbox data can't be read properly. There is no conclusive way to tell if the real source is RAS error. Therefore VF schedules a KFD based reset which doesn't set RAS source. SKip checking RAS source for any VF scheduled recovery.

Fixes 2211660c20a0 ("drm/amdgpu: Prefer RAS recovery for scheduler hang")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -0
index 735a01c58cd7..eb3fd55a3702 100644
@@ -5864,6 +5864,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
          * detected at the same time, let RAS recovery take care of it.
          */
         if (amdgpu_ras_is_err_state(adev, AMDGPU_RAS_BLOCK__ANY) &&
+           !amdgpu_sriov_vf(adev) &&
             reset_context->src != AMDGPU_RESET_SRC_RAS) {
                 dev_dbg(adev->dev,
                         "Gpu recovery from source: %d yielding to RAS error recovery handling",

--
2.25.1