mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
drm/amdgpu: Retire get_xgmi_info callback for gfxhub v12_1
gfxhub v12_1 is not always on. querying xgmi info from it may not work consistently Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Le Ma <le.ma@amd.com> Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
be3f235bb6
commit
ec5d2d2d55
|
|
@ -822,47 +822,6 @@ static void gfxhub_v12_1_init(struct amdgpu_device *adev)
|
|||
gfxhub_v12_1_xcc_init(adev, xcc_mask);
|
||||
}
|
||||
|
||||
static int gfxhub_v12_1_get_xgmi_info(struct amdgpu_device *adev)
|
||||
{
|
||||
u32 max_num_physical_nodes;
|
||||
u32 max_physical_node_id;
|
||||
u32 xgmi_lfb_cntl;
|
||||
u32 max_region;
|
||||
u64 seg_size;
|
||||
|
||||
xgmi_lfb_cntl = RREG32_SOC15(GC, GET_INST(GC, 0),
|
||||
regGCMC_VM_XGMI_LFB_CNTL);
|
||||
seg_size = REG_GET_FIELD(RREG32_SOC15(GC, GET_INST(GC, 0),
|
||||
regGCMC_VM_XGMI_LFB_SIZE),
|
||||
GCMC_VM_XGMI_LFB_SIZE, PF_LFB_SIZE) << 24;
|
||||
max_region = REG_GET_FIELD(xgmi_lfb_cntl,
|
||||
GCMC_VM_XGMI_LFB_CNTL,
|
||||
PF_MAX_REGION);
|
||||
|
||||
max_num_physical_nodes = 8;
|
||||
max_physical_node_id = 7;
|
||||
|
||||
/* PF_MAX_REGION=0 means xgmi is disabled */
|
||||
if (max_region || adev->gmc.xgmi.connected_to_cpu) {
|
||||
adev->gmc.xgmi.num_physical_nodes = max_region + 1;
|
||||
|
||||
if (adev->gmc.xgmi.num_physical_nodes > max_num_physical_nodes)
|
||||
return -EINVAL;
|
||||
|
||||
adev->gmc.xgmi.physical_node_id =
|
||||
REG_GET_FIELD(xgmi_lfb_cntl,
|
||||
GCMC_VM_XGMI_LFB_CNTL,
|
||||
PF_LFB_REGION);
|
||||
|
||||
if (adev->gmc.xgmi.physical_node_id > max_physical_node_id)
|
||||
return -EINVAL;
|
||||
|
||||
adev->gmc.xgmi.node_segment_size = seg_size;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
const struct amdgpu_gfxhub_funcs gfxhub_v12_1_funcs = {
|
||||
.get_fb_location = gfxhub_v12_1_get_fb_location,
|
||||
.get_mc_fb_offset = gfxhub_v12_1_get_mc_fb_offset,
|
||||
|
|
@ -871,7 +830,6 @@ const struct amdgpu_gfxhub_funcs gfxhub_v12_1_funcs = {
|
|||
.gart_disable = gfxhub_v12_1_gart_disable,
|
||||
.set_fault_enable_default = gfxhub_v12_1_set_fault_enable_default,
|
||||
.init = gfxhub_v12_1_init,
|
||||
.get_xgmi_info = gfxhub_v12_1_get_xgmi_info,
|
||||
};
|
||||
|
||||
static int gfxhub_v12_1_xcp_resume(void *handle, uint32_t inst_mask)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user