drm/amdgpu: Direct ret in ras_reset_err_cnt on VF
Subsystems (2)
PATCH 1/1 drm/amdgpu: Direct ret in ras_reset_err_cnt on VF
With adding sriov_vf check, we directly return EOPNOTSUPP in ras_reset_error_count as we should not do anything on VF to reset RAS error count.
This also fixes the issue that loading guest driver causes register violations.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -0
@@ -1498,6 +1498,9 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev, !amdgpu_ras_get_aca_debug_mode(adev))return -EOPNOTSUPP ; +if (amdgpu_sriov_vf (adev)) +return -EOPNOTSUPP ; +/* skip ras error reset in gpu reset */ if ((amdgpu_in_reset(adev) || amdgpu_ras_in_recovery(adev)) && ((smu_funcs && smu_funcs->set_debug_mode) ||
Signature · 1 line
2.34.1
[AMD Official Use Only - AMD Internal Distribution Only]
Thanks,
Ahmad
-----Original Message-----
From: Pan, Ellen <[email protected]>
Sent: Thursday, April 3, 2025 10:40 AM
To: [email protected]
Cc: Skvortsov, Victor <[email protected]>; Rehman, Ahmad <[email protected]>; Gande, Shravan kumar <[email protected]>; Pan, Ellen <[email protected]>
Subject: [PATCH] drm/amdgpu: Direct ret in ras_reset_err_cnt on VF
With adding sriov_vf check, we directly return EOPNOTSUPP in ras_reset_error_count as we should not do anything on VF to reset RAS error count.
This also fixes the issue that loading guest driver causes register violations.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +3 -0
@@ -1498,6 +1498,9 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev, !amdgpu_ras_get_aca_debug_mode(adev))return -EOPNOTSUPP ; +if (amdgpu_sriov_vf (adev)) +return -EOPNOTSUPP ; +/* skip ras error reset in gpu reset */ if ((amdgpu_in_reset(adev) || amdgpu_ras_in_recovery(adev)) && ((smu_funcs && smu_funcs->set_debug_mode) ||
--
2.34.1