ASIC serial updates
Corrected asic serial fallback to use rsmi's unique id
Removed product serial due to duplication
Change-Id: Ib4e9ac00d2bf31ccbc35060bc84f7e79e5332d37
Signed-off-by: Maisam Arif <maisarif@amd.com>
[ROCm/amdsmi commit: d705801adf]
このコミットが含まれているのは:
@@ -259,9 +259,10 @@ class AMDSMICommands():
|
||||
board_info = amdsmi_interface.amdsmi_get_gpu_board_info(args.gpu)
|
||||
board_info['serial_number'] = hex(board_info['serial_number'])
|
||||
board_info['model_number'] = board_info['model_number'].strip()
|
||||
board_info['product_serial'] = '0x' + board_info['product_serial']
|
||||
board_info['product_name'] = board_info['product_name'].strip()
|
||||
board_info['manufacturer_name'] = board_info['manufacturer_name'].strip()
|
||||
board_info.pop('product_serial')
|
||||
board_info.pop('manufacturer_name')
|
||||
|
||||
static_dict['board'] = board_info
|
||||
except amdsmi_exception.AmdSmiLibraryException as e:
|
||||
|
||||
@@ -392,7 +392,7 @@ typedef struct {
|
||||
char market_name[AMDSMI_MAX_STRING_LENGTH];
|
||||
uint32_t vendor_id; //< Use 32 bit to be compatible with other platform.
|
||||
uint32_t subvendor_id; //< The subsystem vendor id
|
||||
uint64_t device_id; //< The unique id of a GPU
|
||||
uint64_t device_id; //< The device id of a GPU
|
||||
uint32_t rev_id;
|
||||
char asic_serial[AMDSMI_NORMAL_STRING_LENGTH];
|
||||
uint32_t reserved[3];
|
||||
|
||||
@@ -668,8 +668,9 @@ amdsmi_get_gpu_asic_info(amdsmi_processor_handle processor_handle, amdsmi_asic_i
|
||||
}
|
||||
// For other sysfs related information, get from rocm-smi
|
||||
else {
|
||||
status = rsmi_wrapper(rsmi_dev_serial_number_get, processor_handle,
|
||||
info->asic_serial, AMDSMI_NORMAL_STRING_LENGTH);
|
||||
uint64_t dv_uid = 0;
|
||||
status = rsmi_wrapper(rsmi_dev_unique_id_get, processor_handle, &dv_uid);
|
||||
if (status == AMDSMI_STATUS_SUCCESS) snprintf(info->asic_serial, sizeof(info->asic_serial), "%d", dv_uid);
|
||||
|
||||
status = rsmi_wrapper(rsmi_dev_brand_get, processor_handle,
|
||||
info->market_name, AMDSMI_NORMAL_STRING_LENGTH);
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする