Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: Fix channel_index table layout for Aldebaran

Fix the channel_index table layout to fetch the correct
channel_index when calculating physical address from
normalized address during page retirement.
Also, fix the number of UMC instances and number of channels
within each UMC instance for Aldebaran.

Signed-off-by: Mukul Joshi <mukul.joshi@amd.com>
Reviewed-By: John Clements <john.clements@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Mukul Joshi and committed by
Alex Deucher
719e433e 8d70136e

+12 -12
+2 -2
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
··· 1171 1171 break; 1172 1172 case CHIP_ALDEBARAN: 1173 1173 adev->umc.max_ras_err_cnt_per_query = UMC_V6_7_TOTAL_CHANNEL_NUM; 1174 - adev->umc.channel_inst_num = UMC_V6_7_UMC_INSTANCE_NUM; 1175 - adev->umc.umc_inst_num = UMC_V6_7_CHANNEL_INSTANCE_NUM; 1174 + adev->umc.channel_inst_num = UMC_V6_7_CHANNEL_INSTANCE_NUM; 1175 + adev->umc.umc_inst_num = UMC_V6_7_UMC_INSTANCE_NUM; 1176 1176 adev->umc.channel_offs = UMC_V6_7_PER_CHANNEL_OFFSET; 1177 1177 if (!adev->gmc.xgmi.connected_to_cpu) 1178 1178 adev->umc.ras_funcs = &umc_v6_7_ras_funcs;
+8 -8
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c
··· 30 30 31 31 const uint32_t 32 32 umc_v6_7_channel_idx_tbl_second[UMC_V6_7_UMC_INSTANCE_NUM][UMC_V6_7_CHANNEL_INSTANCE_NUM] = { 33 - {28, 12, 6, 22}, {19, 3, 9, 25}, 34 - {20, 4, 30, 14}, {11, 27, 1, 17}, 35 - {24, 8, 2, 18}, {15, 31, 5, 21}, 36 - {16, 0, 26, 10}, {7, 23, 29, 13} 33 + {28, 20, 24, 16, 12, 4, 8, 0}, 34 + {6, 30, 2, 26, 22, 14, 18, 10}, 35 + {19, 11, 15, 7, 3, 27, 31, 23}, 36 + {9, 1, 5, 29, 25, 17, 21, 13} 37 37 }; 38 38 const uint32_t 39 39 umc_v6_7_channel_idx_tbl_first[UMC_V6_7_UMC_INSTANCE_NUM][UMC_V6_7_CHANNEL_INSTANCE_NUM] = { 40 - {19, 3, 9, 25}, {28, 12, 6, 22}, 41 - {11, 27, 1, 17}, {20, 4, 30, 14}, 42 - {15, 31, 5, 21}, {24, 8, 2, 18}, 43 - {7, 23, 29, 13}, {16, 0, 26, 10} 40 + {19, 11, 15, 7, 3, 27, 31, 23}, 41 + {9, 1, 5, 29, 25, 17, 21, 13}, 42 + {28, 20, 24, 16, 12, 4, 8, 0}, 43 + {6, 30, 2, 26, 22, 14, 18, 10}, 44 44 }; 45 45 46 46 static inline uint32_t get_umc_v6_7_reg_offset(struct amdgpu_device *adev,
+2 -2
drivers/gpu/drm/amd/amdgpu/umc_v6_7.h
··· 36 36 #define UMC_V6_7_INST_DIST 0x40000 37 37 38 38 /* number of umc channel instance with memory map register access */ 39 - #define UMC_V6_7_CHANNEL_INSTANCE_NUM 4 39 + #define UMC_V6_7_UMC_INSTANCE_NUM 4 40 40 /* number of umc instance with memory map register access */ 41 - #define UMC_V6_7_UMC_INSTANCE_NUM 8 41 + #define UMC_V6_7_CHANNEL_INSTANCE_NUM 8 42 42 /* total channel instances in one umc block */ 43 43 #define UMC_V6_7_TOTAL_CHANNEL_NUM (UMC_V6_7_CHANNEL_INSTANCE_NUM * UMC_V6_7_UMC_INSTANCE_NUM) 44 44 /* UMC regiser per channel offset */