diff options
author | Yang Wang <kevinyang.wang@amd.com> | 2024-02-26 16:30:46 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-03-22 15:48:03 -0400 |
commit | f7bcfb7a56b2b6165daa9930429ec5bcd7e00e62 (patch) | |
tree | e8538672b1980bc394f689f88ada217d9f88414e /drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | |
parent | e2680ee222d705597c4ff42c46e86b4bd3860d8e (diff) |
drm/amdgpu: retrieve umc odecc error count for aca umc v12.0
retrieve umc odecc error count for aca umc v12.0
Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/umc_v12_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/umc_v12_0.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c index d29ea2fde025..5f08d3dcf174 100644 --- a/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/umc_v12_0.c @@ -510,7 +510,8 @@ static int umc_v12_0_aca_bank_parser(struct aca_handle *handle, struct aca_bank struct amdgpu_device *adev = handle->adev; struct aca_bank_info info; enum aca_error_type err_type; - u64 status; + u64 status, count; + u32 ext_error_code; int ret; status = bank->regs[ACA_REG_IDX_STATUS]; @@ -527,7 +528,11 @@ static int umc_v12_0_aca_bank_parser(struct aca_handle *handle, struct aca_bank if (ret) return ret; - return aca_error_cache_log_bank_error(handle, &info, err_type, 1ULL); + ext_error_code = ACA_REG__STATUS__ERRORCODEEXT(status); + count = ext_error_code == 0 ? + ACA_REG__MISC0__ERRCNT(bank->regs[ACA_REG_IDX_MISC0]) : 1ULL; + + return aca_error_cache_log_bank_error(handle, &info, err_type, count); } static const struct aca_bank_ops umc_v12_0_aca_bank_ops = { |