drm/amdgpu: Add Unique Identifier sysfs file unique_id v2

Add a file that provides a Unique ID for the GPU.
This will persist across machines and is guaranteed to be unique.
This is only available for GFX9 and newer, so older ASICs will not
have this file in the sysfs pool

v2: Store it in adev for ASICs that don't have a hwmgr

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Kent Russell <kent.russell@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Kent Russell
2019-05-15 08:35:29 -04:00
committed by Alex Deucher
parent 460960587a
commit fb2dbfd242
5 changed files with 63 additions and 0 deletions

View File

@@ -957,6 +957,8 @@ struct amdgpu_device {
long sdma_timeout;
long video_timeout;
long compute_timeout;
uint64_t unique_id;
};
static inline struct amdgpu_device *amdgpu_ttm_adev(struct ttm_bo_device *bdev)