SWDEV-434348: Corrected Guest Vendor Name values
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Iee0d45fc64386f0417a0e30cce05608ca2186990
[ROCm/amdsmi commit: 53177525bf]
Tento commit je obsažen v:
@@ -329,6 +329,8 @@ class AMDSMICommands():
|
||||
asic_info['rev_id'] = hex(asic_info['rev_id'])
|
||||
if asic_info['asic_serial'] != '':
|
||||
asic_info['asic_serial'] = hex(int(asic_info['asic_serial'], base=16))
|
||||
else:
|
||||
asic_info['asic_serial'] = "N/A"
|
||||
if asic_info['oam_id'] == 0xFFFF: # uint 16 max
|
||||
asic_info['oam_id'] = "N/A"
|
||||
static_dict['asic'] = asic_info
|
||||
|
||||
@@ -1556,7 +1556,7 @@ def amdsmi_get_gpu_asic_info(
|
||||
"market_name": asic_info.market_name.decode("utf-8"),
|
||||
"vendor_id": asic_info.vendor_id,
|
||||
"vendor_name": asic_info.vendor_name.decode("utf-8"),
|
||||
"subvendor_id": asic_info.subvendor_id,
|
||||
"subvendor_id": hex(asic_info.subvendor_id),
|
||||
"device_id": asic_info.device_id,
|
||||
"rev_id": asic_info.rev_id,
|
||||
"asic_serial": asic_info.asic_serial.decode("utf-8"),
|
||||
|
||||
@@ -672,15 +672,21 @@ amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_i
|
||||
status = rsmi_wrapper(rsmi_dev_vendor_id_get, processor_handle,
|
||||
&vendor_id);
|
||||
if (status == AMDSMI_STATUS_SUCCESS) info->vendor_id = vendor_id;
|
||||
|
||||
status = rsmi_wrapper(rsmi_dev_subsystem_vendor_id_get, processor_handle,
|
||||
&subvendor_id);
|
||||
if (status == AMDSMI_STATUS_SUCCESS) info->subvendor_id = subvendor_id;
|
||||
}
|
||||
// For other sysfs related information, get from rocm-smi
|
||||
status = rsmi_wrapper(rsmi_dev_subsystem_vendor_id_get, processor_handle,
|
||||
&subvendor_id);
|
||||
if (status == AMDSMI_STATUS_SUCCESS) info->subvendor_id = subvendor_id;
|
||||
|
||||
status = rsmi_wrapper(rsmi_dev_pcie_vendor_name_get, processor_handle,
|
||||
info->vendor_name, AMDSMI_MAX_STRING_LENGTH);
|
||||
|
||||
// If vendor name is empty and the vendor id is 0x1002, set vendor name to AMD vendor string
|
||||
if ((info->vendor_name != NULL && info->vendor_name[0] == '\0') && info->vendor_id == 0x1002) {
|
||||
memset(info->vendor_name, 0, 38);
|
||||
strncpy(info->vendor_name, "Advanced Micro Devices Inc. [AMD/ATI]", 37);
|
||||
}
|
||||
|
||||
// default to 0xffff as not supported
|
||||
info->oam_id = std::numeric_limits<uint16_t>::max();
|
||||
status = rsmi_wrapper(rsmi_dev_oam_id_get, processor_handle,
|
||||
|
||||
Odkázat v novém úkolu
Zablokovat Uživatele