SWDEV-425887 - Corrected vbios population
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I3728064c77fae8cfa006254769a2cc821b4d5362
[ROCm/amdsmi commit: 6441abdc1a]
Dieser Commit ist enthalten in:
committet von
Maisam Arif
Ursprung
37a41c3bc8
Commit
888f0d67cb
@@ -293,6 +293,10 @@ class AMDSMICommands():
|
||||
if args.vbios:
|
||||
try:
|
||||
vbios_info = amdsmi_interface.amdsmi_get_gpu_vbios_info(args.gpu)
|
||||
for key, value in vbios_info.items():
|
||||
if isinstance(value, str):
|
||||
if value.strip() == '':
|
||||
vbios_info[key] = "N/A"
|
||||
static_dict['vbios'] = vbios_info
|
||||
except amdsmi_exception.AmdSmiLibraryException as e:
|
||||
static_dict['vbios'] = "N/A"
|
||||
|
||||
@@ -1499,20 +1499,19 @@ amdsmi_get_gpu_vbios_info(amdsmi_processor_handle processor_handle, amdsmi_vbios
|
||||
amdsmi_status_t status;
|
||||
|
||||
amd::smi::AMDSmiGPUDevice* gpu_device = nullptr;
|
||||
amdsmi_status_t r = get_gpu_device_from_handle(processor_handle, &gpu_device);
|
||||
if (r != AMDSMI_STATUS_SUCCESS)
|
||||
return r;
|
||||
status = get_gpu_device_from_handle(processor_handle, &gpu_device);
|
||||
if (status != AMDSMI_STATUS_SUCCESS)
|
||||
return status;
|
||||
|
||||
|
||||
if (gpu_device->check_if_drm_is_supported()) {
|
||||
status = gpu_device->amdgpu_query_vbios(&vbios);
|
||||
if (status != AMDSMI_STATUS_SUCCESS) {
|
||||
return status;
|
||||
if (status == AMDSMI_STATUS_SUCCESS) {
|
||||
strncpy(info->name, (char *) vbios.name, AMDSMI_MAX_STRING_LENGTH);
|
||||
strncpy(info->build_date, (char *) vbios.date, AMDSMI_MAX_DATE_LENGTH);
|
||||
strncpy(info->part_number, (char *) vbios.vbios_pn, AMDSMI_MAX_STRING_LENGTH);
|
||||
strncpy(info->version, (char *) vbios.vbios_ver_str, AMDSMI_NORMAL_STRING_LENGTH);
|
||||
}
|
||||
strncpy(info->name, (char *) vbios.name, AMDSMI_MAX_STRING_LENGTH);
|
||||
strncpy(info->build_date, (char *) vbios.date, AMDSMI_MAX_DATE_LENGTH);
|
||||
strncpy(info->part_number, (char *) vbios.vbios_pn, AMDSMI_MAX_STRING_LENGTH);
|
||||
strncpy(info->version, (char *) vbios.vbios_ver_str, AMDSMI_NORMAL_STRING_LENGTH);
|
||||
}
|
||||
else {
|
||||
// get vbios version string from rocm_smi
|
||||
@@ -1528,7 +1527,7 @@ amdsmi_get_gpu_vbios_info(amdsmi_processor_handle processor_handle, amdsmi_vbios
|
||||
}
|
||||
}
|
||||
|
||||
return AMDSMI_STATUS_SUCCESS;
|
||||
return status;
|
||||
}
|
||||
|
||||
amdsmi_status_t
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren