summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHawking Zhang <Hawking.Zhang@amd.com>2026-01-17 20:34:44 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-03-17 10:32:41 -0400
commitec5d2d2d55b596f2ada28b545c9cef78036c74ec (patch)
tree6d9d30d5062ac1fb3bb674a92ed0b0ad8d976a2d
parentbe3f235bb61b71fc5635c4459fee372252acd772 (diff)
downloadlinux-ec5d2d2d55b596f2ada28b545c9cef78036c74ec.tar.gz
linux-ec5d2d2d55b596f2ada28b545c9cef78036c74ec.zip
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>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c42
1 files changed, 0 insertions, 42 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c
index d086c23e4c2d..3544eb42dca6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v12_1.c
@@ -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)