drm/amdgpu: Only overwrite serial if field is empty
On Aldebaran, the serial may be obtained from the FRU. Only overwrite the serial with the unique_id if the serial is empty. This will support printing serial numbers for mGPU devices where there are 2 unique_ids for the 2 GPUs, but only one serial number for the board Signed-off-by: Kent Russell <kent.russell@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Родитель
4ad31fa15b
Коммит
de0af8a65e
|
@ -1606,6 +1606,7 @@ out_unlock:
|
|||
mutex_unlock(&smu->metrics_lock);
|
||||
|
||||
adev->unique_id = ((uint64_t)upper32 << 32) | lower32;
|
||||
if (adev->serial[0] == '\0')
|
||||
sprintf(adev->serial, "%016llx", adev->unique_id);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче