Add support for reading GPU's unique ID

Add support and testing for reading the Unique ID associated with a
specific GPU. This ID will persist across reboots, even if the GPU is
moved to a different machine. Note that this is per-GPU, not per-card,
as some cards have multiple GPUs, and each GPU will get a unique
identifier

Change-Id: Idce50c6febc2ceb1a4c1200d2489ec8b9d8fe174
Este commit está contenido en:
Kent Russell
2019-06-20 06:55:56 -04:00
padre dbdb1a9248
commit 35d2807196
Se han modificado 6 ficheros con 48 adiciones y 0 borrados
+11
Ver fichero
@@ -2107,3 +2107,14 @@ rsmi_dev_pci_replay_counter_get(uint32_t dv_ind, uint64_t *counter) {
CATCH
}
rsmi_status_t
rsmi_dev_unique_id_get(uint32_t dv_ind, uint64_t *unique_id) {
TRY
DEVICE_MUTEX
rsmi_status_t ret;
ret = get_dev_value_int(amd::smi::kDevUniqueId, dv_ind, unique_id);
return ret;
CATCH
}