[SWDEV-534605] Increase max devices supported and drm test link type (#625)

Increased the AMDSMI_MAX_DEVICES to 64 to accomodate all
devices in CPX mode. The link type has been modified in
amd-smi to match with rocm-smi types, updated the same
for drm tests.

---------

Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
This commit is contained in:
Kanangot Balakrishnan, Bindhiya
2025-09-17 16:30:04 -05:00
committed by GitHub
parent 902667db3c
commit 6715c5aa92
5 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -4807,8 +4807,8 @@ amdsmi_get_link_topology_nearest(amdsmi_processor_handle processor_handle,
}
uint32_t device_counter(AMDSMI_MAX_DEVICES);
amdsmi_processor_handle device_list[AMDSMI_MAX_DEVICES];
uint32_t device_counter(AMDSMI_MAX_DEVICES * AMDSMI_MAX_NUM_XCP);
amdsmi_processor_handle device_list[AMDSMI_MAX_DEVICES * AMDSMI_MAX_NUM_XCP];
for (auto socket_idx = uint32_t(0); socket_idx < socket_counter; ++socket_idx) {
if (auto api_status = amdsmi_get_processor_handles(socket_list[socket_idx], &device_counter, device_list);
(api_status != amdsmi_status_t::AMDSMI_STATUS_SUCCESS)) {
@@ -4856,14 +4856,14 @@ amdsmi_get_link_topology_nearest(amdsmi_processor_handle processor_handle,
/*
* Note: The link topology table is sorted by the number of hops and link weight.
*/
topology_nearest_info->processor_list[AMDSMI_MAX_DEVICES] = {nullptr};
topology_nearest_info->processor_list[AMDSMI_MAX_DEVICES * AMDSMI_MAX_NUM_XCP] = {nullptr};
topology_nearest_info->count = static_cast<uint32_t>(link_topology_order.size());
auto topology_nearest_counter = uint32_t(0);
while (!link_topology_order.empty()) {
auto link_info = link_topology_order.top();
link_topology_order.pop();
if (topology_nearest_counter < AMDSMI_MAX_DEVICES) {
if (topology_nearest_counter < (AMDSMI_MAX_DEVICES * AMDSMI_MAX_NUM_XCP)) {
topology_nearest_info->processor_list[topology_nearest_counter++] = link_info.target_processor_handle;
}
}