drm/amdkfd: Get unique_id dynamically v2
authorKent Russell <kent.russell@amd.com>
Wed, 3 Feb 2021 18:02:09 +0000 (13:02 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 9 Feb 2021 20:27:28 +0000 (15:27 -0500)
commit11964258fe733f82746b3d16c4448a3a9eea76b1
tree564cf1e1f1121956475ae8b44b26f3b5ad169d19
parent62826b86085dbcd38b88e8829e9650a85e2bc260
drm/amdkfd: Get unique_id dynamically v2

Instead of caching the value during amdgpu_device_init, just call the
function directly. This avoids issues where the unique_id hasn't been
saved by the time that KFD's topology snapshot is done (e.g. Arcturus).

KFD's topology information from the amdgpu_device was initially cached
at KFD initialization due to amdkfd and amdgpu being separate modules.
Now that they are combined together, we can directly call the functions
that we need and avoid this unnecessary duplication and complexity.

As a side-effect of this change, we also remove unique_id=0 for CPUs,
which is obviously not unique.

v2: Drop previous patch printing unique_id in hex

Signed-off-by: Kent Russell <kent.russell@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_topology.c
drivers/gpu/drm/amd/amdkfd/kfd_topology.h