<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Calibri;font-size:10pt;color:#008000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Reviewed-by: Yiqing Yao <yiqing.yao@amd.com></div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Tested-by: Yiqing Yao <yiqing.yao@amd.com></div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Thanks,</div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Yiqing(James).</div>
<div id="appendonsend"></div>
<div class="elementToProof" style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Lijo Lazar <lijo.lazar@amd.com><br>
<b>Sent:</b> Monday, December 9, 2024 11:52 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Zhang, Hawking <Hawking.Zhang@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Skvortsov, Victor <Victor.Skvortsov@amd.com>; Zhao, Victor <Victor.Zhao@amd.com>; Tomasevic, Vojislav <Vojislav.Tomasevic@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: Avoid VF for RAS recovery source check</span>
<div> </div>
</div>
<div style="font-size: 11pt;">VF device sets the RAS flag when mailbox data can't be read properly.<br>
There is no conclusive way to tell if the real source is RAS error.<br>
Therefore VF schedules a KFD based reset which doesn't set RAS source.<br>
SKip checking RAS source for any VF scheduled recovery.<br>
<br>
Signed-off-by: Lijo Lazar <lijo.lazar@amd.com><br>
Reported-by: Vojislav Tomasevic <vojislav.tomasevic@amd.com><br>
<br>
Fixes: 2211660c20a0 ("drm/amdgpu: Prefer RAS recovery for scheduler hang")<br>
---<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 +<br>
1 file changed, 1 insertion(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
index 735a01c58cd7..eb3fd55a3702 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c<br>
@@ -5864,6 +5864,7 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,<br>
* detected at the same time, let RAS recovery take care of it.<br>
*/<br>
if (amdgpu_ras_is_err_state(adev, AMDGPU_RAS_BLOCK__ANY) &&<br>
+ !amdgpu_sriov_vf(adev) &&<br>
reset_context->src != AMDGPU_RESET_SRC_RAS) {<br>
dev_dbg(adev->dev,<br>
"Gpu recovery from source: %d yielding to RAS error recovery handling",<br>
--<br>
2.25.1<br>
<br>
</div>
</div>
</body>
</html>