Skip to content

Commit 015bae7

Browse files
candicelicyalexdeucher
authored andcommitted
drm/amd/pm: Retrieve UMC ODECC error count from aca bank
Instead of software managed counters. Signed-off-by: Candice Li <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent a9b1a4f commit 015bae7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2552,8 +2552,12 @@ static int mca_umc_mca_get_err_count(const struct mca_ras_info *mca_ras, struct
25522552
enum amdgpu_mca_error_type type, struct mca_bank_entry *entry, uint32_t *count)
25532553
{
25542554
uint64_t status0;
2555+
uint32_t ext_error_code;
2556+
uint32_t odecc_err_cnt;
25552557

25562558
status0 = entry->regs[MCA_REG_IDX_STATUS];
2559+
ext_error_code = MCA_REG__STATUS__ERRORCODEEXT(status0);
2560+
odecc_err_cnt = MCA_REG__MISC0__ERRCNT(entry->regs[MCA_REG_IDX_MISC0]);
25572561

25582562
if (!REG_GET_FIELD(status0, MCMP1_STATUST0, Val)) {
25592563
*count = 0;
@@ -2563,7 +2567,7 @@ static int mca_umc_mca_get_err_count(const struct mca_ras_info *mca_ras, struct
25632567
if (umc_v12_0_is_deferred_error(adev, status0) ||
25642568
umc_v12_0_is_uncorrectable_error(adev, status0) ||
25652569
umc_v12_0_is_correctable_error(adev, status0))
2566-
*count = 1;
2570+
*count = (ext_error_code == 0) ? odecc_err_cnt : 1;
25672571

25682572
return 0;
25692573
}

0 commit comments

Comments
 (0)