SWDEV-410230 - Added slot_type to amd-smi static --bus
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I2006a3525a8aa9091bf54501461d364f7237f00f
[ROCm/amdsmi commit: fadf1b6cc9]
This commit is contained in:
committed by
Maisam Arif
orang tua
a489c16044
melakukan
76d025cff0
@@ -1817,7 +1817,7 @@ amdsmi_get_pcie_link_status(amdsmi_processor_handle processor_handle, amdsmi_pci
|
||||
}
|
||||
|
||||
// default to PCIe
|
||||
info->pcie_slot_type = 0;
|
||||
info->pcie_slot_type = AMDSMI_SLOT_TYPE__PCIE;
|
||||
amd::smi::AMDSmiGPUDevice* gpu_device = nullptr;
|
||||
status = get_gpu_device_from_handle(
|
||||
processor_handle, &gpu_device);
|
||||
@@ -1829,7 +1829,7 @@ amdsmi_get_pcie_link_status(amdsmi_processor_handle processor_handle, amdsmi_pci
|
||||
// bits [16:17] in ids_flags field as slot type
|
||||
if (status == AMDSMI_STATUS_SUCCESS) {
|
||||
// two bits starts with index 16
|
||||
info->pcie_slot_type = (dev_info.ids_flags >> 16) & 0x03;
|
||||
info->pcie_slot_type = static_cast<amdsmi_pcie_slot_type_t>((dev_info.ids_flags >> 16) & 0x03);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1908,7 +1908,7 @@ amdsmi_status_t amdsmi_get_pcie_link_caps(amdsmi_processor_handle processor_hand
|
||||
}
|
||||
|
||||
// default to PCIe
|
||||
info->pcie_slot_type = 0;
|
||||
info->pcie_slot_type = AMDSMI_SLOT_TYPE__PCIE;
|
||||
if (gpu_device->check_if_drm_is_supported()) {
|
||||
struct drm_amdgpu_info_device dev_info = {};
|
||||
status = gpu_device->amdgpu_query_info(AMDGPU_INFO_DEV_INFO,
|
||||
@@ -1916,7 +1916,7 @@ amdsmi_status_t amdsmi_get_pcie_link_caps(amdsmi_processor_handle processor_hand
|
||||
// bits [16:17] in ids_flags field as slot type
|
||||
if (status == AMDSMI_STATUS_SUCCESS) {
|
||||
// two bits starts with index 16
|
||||
info->pcie_slot_type = (dev_info.ids_flags >> 16) & 0x03;
|
||||
info->pcie_slot_type = static_cast<amdsmi_pcie_slot_type_t>((dev_info.ids_flags >> 16) & 0x03);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user