[PATCH 06/14] drm/amdgpu: accumulate the num_links in xgmi topology info for gfx9.4.3
Alex Deucher
alexander.deucher at amd.com
Wed Mar 29 20:14:18 UTC 2023
From: Shiwu Zhang <shiwu.zhang at amd.com>
Since extended data is not supported, num_links should
be accumulated to reflect the xgmi topology info.
Signed-off-by: Shiwu Zhang <shiwu.zhang at amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 2dffbea1d72e..130a66f5ea8b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -1377,8 +1377,8 @@ int psp_xgmi_get_topology_info(struct psp_context *psp,
link_info_output = &xgmi_cmd->xgmi_out_message.get_link_info;
for (i = 0; i < topology->num_nodes; i++) {
- /* accumulate num_links on extended data */
- topology->nodes[i].num_links = get_extended_data ?
+ /* accumulate num_links both on extended data and GC 9.4.3 onwards */
+ topology->nodes[i].num_links = (requires_reflection || get_extended_data) ?
topology->nodes[i].num_links +
link_info_output->nodes[i].num_links :
link_info_output->nodes[i].num_links;
--
2.39.2
More information about the amd-gfx
mailing list