[PATCH 06/14] drm/amdgpu: accumulate the num_links in xgmi topology info for gfx9.4.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Shiwu Zhang <shiwu.zhang@xxxxxxx>

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

Signed-off-by: Shiwu Zhang <shiwu.zhang@xxxxxxx>
Reviewed-by: Hawking Zhang <Hawking.Zhang@xxxxxxx>
Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
---
 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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux