• Kent Russell's avatar
    drm/amdkfd: Get unique_id dynamically v2 · 11964258
    Kent Russell authored
    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: default avatarKent Russell <kent.russell@amd.com>
    Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    11964258
kfd_topology.h 6.01 KB