]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita61c394115e9b524ab7c3d79a318670f5df55dcd
tree564cf1e1f1121956475ae8b44b26f3b5ad169d19
parentad952a73fc1f7b524fdaf6ecbcfadfc8344c3c72
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