From: Yang Wang Date: Mon, 6 May 2024 02:41:28 +0000 (+0800) Subject: drm/amdgpu: ignoring unsupported ras blocks when MCA bank dispatches X-Git-Tag: microblaze-v6.13~537^2~32^2~308 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=85a24a3ea09e93c05ff59609fde6c3d825a014c2;p=linux-2.6-microblaze.git drm/amdgpu: ignoring unsupported ras blocks when MCA bank dispatches This patch is used to solve the problem of incorrect parsing of error counts. When the UE trigger gpu is reset, the driver will attempt to parse all possible ras blocks. For ras blocks that are not supported by the current ASIC, the driver should ignore this error. Signed-off-by: Yang Wang Reviewed-by: Candice Li Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c index 7b7040ec61bd..e0fe47c54e75 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c @@ -415,7 +415,7 @@ static int amdgpu_mca_dispatch_mca_set(struct amdgpu_device *adev, enum amdgpu_r count = 0; ret = amdgpu_mca_smu_parse_mca_error_count(adev, blk, type, entry, &count); - if (ret) + if (ret && ret != -EOPNOTSUPP) return ret; if (!count)