Skip to content

Commit e69c785

Browse files
Tao Zhoualexdeucher
authored andcommitted
drm/amdgpu: add umc retire unit element
It records how many bad pages are retired in one uncorrectable error. 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 6761c4b commit e69c785

4 files changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_umc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ struct amdgpu_umc {
7474

7575
/* UMC regiser per channel offset */
7676
uint32_t channel_offs;
77+
/* how many pages are retired in one UE */
78+
uint32_t retire_unit;
7779
/* channel index table of interleaved memory */
7880
const uint32_t *channel_idx_tbl;
7981
struct ras_common_if *ras_if;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ static void gmc_v10_0_set_umc_funcs(struct amdgpu_device *adev)
692692
adev->umc.channel_inst_num = UMC_V8_7_CHANNEL_INSTANCE_NUM;
693693
adev->umc.umc_inst_num = UMC_V8_7_UMC_INSTANCE_NUM;
694694
adev->umc.channel_offs = UMC_V8_7_PER_CHANNEL_OFFSET_SIENNA;
695+
adev->umc.retire_unit = 1;
695696
adev->umc.channel_idx_tbl = &umc_v8_7_channel_idx_tbl[0][0];
696697
adev->umc.ras = &umc_v8_7_ras;
697698
break;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ static void gmc_v11_0_set_umc_funcs(struct amdgpu_device *adev)
570570
adev->umc.node_inst_num = adev->gmc.num_umc;
571571
adev->umc.max_ras_err_cnt_per_query = UMC_V8_10_TOTAL_CHANNEL_NUM(adev);
572572
adev->umc.channel_offs = UMC_V8_10_PER_CHANNEL_OFFSET;
573+
adev->umc.retire_unit = UMC_V8_10_NA_COL_2BITS_POWER_OF_2_NUM;
573574
if (adev->umc.node_inst_num == 4)
574575
adev->umc.channel_idx_tbl = &umc_v8_10_channel_idx_tbl_ext0[0][0][0];
575576
else

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,6 +1288,7 @@ static void gmc_v9_0_set_umc_funcs(struct amdgpu_device *adev)
12881288
adev->umc.channel_inst_num = UMC_V6_1_CHANNEL_INSTANCE_NUM;
12891289
adev->umc.umc_inst_num = UMC_V6_1_UMC_INSTANCE_NUM;
12901290
adev->umc.channel_offs = UMC_V6_1_PER_CHANNEL_OFFSET_VG20;
1291+
adev->umc.retire_unit = 1;
12911292
adev->umc.channel_idx_tbl = &umc_v6_1_channel_idx_tbl[0][0];
12921293
adev->umc.ras = &umc_v6_1_ras;
12931294
break;
@@ -1296,6 +1297,7 @@ static void gmc_v9_0_set_umc_funcs(struct amdgpu_device *adev)
12961297
adev->umc.channel_inst_num = UMC_V6_1_CHANNEL_INSTANCE_NUM;
12971298
adev->umc.umc_inst_num = UMC_V6_1_UMC_INSTANCE_NUM;
12981299
adev->umc.channel_offs = UMC_V6_1_PER_CHANNEL_OFFSET_ARCT;
1300+
adev->umc.retire_unit = 1;
12991301
adev->umc.channel_idx_tbl = &umc_v6_1_channel_idx_tbl[0][0];
13001302
adev->umc.ras = &umc_v6_1_ras;
13011303
break;
@@ -1305,6 +1307,7 @@ static void gmc_v9_0_set_umc_funcs(struct amdgpu_device *adev)
13051307
adev->umc.channel_inst_num = UMC_V6_7_CHANNEL_INSTANCE_NUM;
13061308
adev->umc.umc_inst_num = UMC_V6_7_UMC_INSTANCE_NUM;
13071309
adev->umc.channel_offs = UMC_V6_7_PER_CHANNEL_OFFSET;
1310+
adev->umc.retire_unit = (UMC_V6_7_NA_MAP_PA_NUM * 2);
13081311
if (!adev->gmc.xgmi.connected_to_cpu)
13091312
adev->umc.ras = &umc_v6_7_ras;
13101313
if (1 & adev->smuio.funcs->get_die_id(adev))

0 commit comments

Comments
 (0)