drm/amdgpu: check RAS supported first in ras_reset_error_count
Subsystems (2)
PATCH 1/1 drm/amdgpu: check RAS supported first in ras_reset_error_count
Not all platforms support RAS.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -4
@@ -1233,15 +1233,15 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev,return -EOPNOTSUPP ; } +if (!amdgpu_ras_is_supported (adev, block) || + !amdgpu_ras_get_mca_debug_mode (adev)) +return -EOPNOTSUPP ; +/* skip ras error reset in gpu reset */ if ((amdgpu_in_reset (adev) ||atomic_read (&ras->in_recovery)) && mca_funcs && mca_funcs->mca_set_debug_mode)return -EOPNOTSUPP ; -if (!amdgpu_ras_is_supported (adev, block) || - !amdgpu_ras_get_mca_debug_mode (adev)) -return -EOPNOTSUPP ; -if (block_obj->hw_ops->reset_ras_error_count) block_obj->hw_ops->reset_ras_error_count (adev);
Signature · 1 line
2.35.1
[AMD Official Use Only - General]
Reviewed-by Yang Wang <[email protected]>
Best Regards,
Kevin
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, October 25, 2023 11:59 AM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: check RAS supported first in ras_reset_error_count
Not all platforms support RAS.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -4
@@ -1233,15 +1233,15 @@ int amdgpu_ras_reset_error_count(struct amdgpu_device *adev,return -EOPNOTSUPP ; } +if (!amdgpu_ras_is_supported (adev, block) || + !amdgpu_ras_get_mca_debug_mode (adev)) +return -EOPNOTSUPP ; +/* skip ras error reset in gpu reset */ if ((amdgpu_in_reset (adev) ||atomic_read (&ras->in_recovery)) && mca_funcs && mca_funcs->mca_set_debug_mode)return -EOPNOTSUPP ; -if (!amdgpu_ras_is_supported (adev, block) || - !amdgpu_ras_get_mca_debug_mode (adev)) -return -EOPNOTSUPP ; -if (block_obj->hw_ops->reset_ras_error_count) block_obj->hw_ops->reset_ras_error_count (adev);
--
2.35.1