From: Shiwu Zhang <[email protected]>

Since extended data is not supported, num_links should
be accumulated to reflect the xgmi topology info.

Signed-off-by: Shiwu Zhang <[email protected]>
Reviewed-by: Hawking Zhang <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 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

Reply via email to