Skip to content

Commit 61fe553

Browse files
Tao Zhoualexdeucher
authored andcommitted
drm/amdgpu: handle extra UE register entries for gfx v9_4_3
The UE registe list is larger than CE list. Reported-by: yipeng.chai@amd.com Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Stanley.Yang <Stanley.Yang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent d78fa1c commit 61fe553

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3799,6 +3799,27 @@ static void gfx_v9_4_3_inst_query_ras_err_count(struct amdgpu_device *adev,
37993799
}
38003800
}
38013801

3802+
/* handle extra register entries of UE */
3803+
for (; i < ARRAY_SIZE(gfx_v9_4_3_ue_reg_list); i++) {
3804+
for (j = 0; j < gfx_v9_4_3_ue_reg_list[i].se_num; j++) {
3805+
for (k = 0; k < gfx_v9_4_3_ue_reg_list[i].reg_entry.reg_inst; k++) {
3806+
/* no need to select if instance number is 1 */
3807+
if (gfx_v9_4_3_ue_reg_list[i].se_num > 1 ||
3808+
gfx_v9_4_3_ue_reg_list[i].reg_entry.reg_inst > 1)
3809+
gfx_v9_4_3_xcc_select_se_sh(adev, j, 0, k, xcc_id);
3810+
3811+
amdgpu_ras_inst_query_ras_error_count(adev,
3812+
&(gfx_v9_4_3_ue_reg_list[i].reg_entry),
3813+
1,
3814+
gfx_v9_4_3_ras_mem_list_array[gfx_v9_4_3_ue_reg_list[i].mem_id_type].mem_id_ent,
3815+
gfx_v9_4_3_ras_mem_list_array[gfx_v9_4_3_ue_reg_list[i].mem_id_type].size,
3816+
GET_INST(GC, xcc_id),
3817+
AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE,
3818+
&ue_count);
3819+
}
3820+
}
3821+
}
3822+
38023823
gfx_v9_4_3_xcc_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff,
38033824
xcc_id);
38043825
mutex_unlock(&adev->grbm_idx_mutex);
@@ -3838,6 +3859,23 @@ static void gfx_v9_4_3_inst_reset_ras_err_count(struct amdgpu_device *adev,
38383859
}
38393860
}
38403861

3862+
/* handle extra register entries of UE */
3863+
for (; i < ARRAY_SIZE(gfx_v9_4_3_ue_reg_list); i++) {
3864+
for (j = 0; j < gfx_v9_4_3_ue_reg_list[i].se_num; j++) {
3865+
for (k = 0; k < gfx_v9_4_3_ue_reg_list[i].reg_entry.reg_inst; k++) {
3866+
/* no need to select if instance number is 1 */
3867+
if (gfx_v9_4_3_ue_reg_list[i].se_num > 1 ||
3868+
gfx_v9_4_3_ue_reg_list[i].reg_entry.reg_inst > 1)
3869+
gfx_v9_4_3_xcc_select_se_sh(adev, j, 0, k, xcc_id);
3870+
3871+
amdgpu_ras_inst_reset_ras_error_count(adev,
3872+
&(gfx_v9_4_3_ue_reg_list[i].reg_entry),
3873+
1,
3874+
GET_INST(GC, xcc_id));
3875+
}
3876+
}
3877+
}
3878+
38413879
gfx_v9_4_3_xcc_select_se_sh(adev, 0xffffffff, 0xffffffff, 0xffffffff,
38423880
xcc_id);
38433881
mutex_unlock(&adev->grbm_idx_mutex);

0 commit comments

Comments
 (0)