Commit d95c368a authored by Kent Russell's avatar Kent Russell Committed by Alex Deucher

drm/amdkfd: Fix getting unique_id in topology

Since the unique_id is now obtained in amdgpu in smu_late_init,
topology misses getting the value during KFD device initialization.
To work around this, we use amdgpu_amdkfd_get_unique_id to get
the unique_id at read time. Due to this, we can remove unique_id from
the kfd_dev structure, since we only need it in the KFD node properties
struct
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>
parent 51a7e938
...@@ -757,8 +757,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd, ...@@ -757,8 +757,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
kfd->hive_id = amdgpu_amdkfd_get_hive_id(kfd->kgd); kfd->hive_id = amdgpu_amdkfd_get_hive_id(kfd->kgd);
kfd->unique_id = amdgpu_amdkfd_get_unique_id(kfd->kgd);
kfd->noretry = amdgpu_amdkfd_get_noretry(kfd->kgd); kfd->noretry = amdgpu_amdkfd_get_noretry(kfd->kgd);
if (kfd_interrupt_init(kfd)) { if (kfd_interrupt_init(kfd)) {
......
...@@ -292,9 +292,6 @@ struct kfd_dev { ...@@ -292,9 +292,6 @@ struct kfd_dev {
/* xGMI */ /* xGMI */
uint64_t hive_id; uint64_t hive_id;
/* UUID */
uint64_t unique_id;
bool pci_atomic_requested; bool pci_atomic_requested;
/* Use IOMMU v2 flag */ /* Use IOMMU v2 flag */
......
...@@ -1340,7 +1340,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu) ...@@ -1340,7 +1340,7 @@ int kfd_topology_add_device(struct kfd_dev *gpu)
dev->gpu->dqm->sched_policy != KFD_SCHED_POLICY_NO_HWS) ? dev->gpu->dqm->sched_policy != KFD_SCHED_POLICY_NO_HWS) ?
amdgpu_amdkfd_get_num_gws(dev->gpu->kgd) : 0; amdgpu_amdkfd_get_num_gws(dev->gpu->kgd) : 0;
dev->node_props.num_cp_queues = get_cp_queues_num(dev->gpu->dqm); dev->node_props.num_cp_queues = get_cp_queues_num(dev->gpu->dqm);
dev->node_props.unique_id = gpu->unique_id; dev->node_props.unique_id = amdgpu_amdkfd_get_unique_id(dev->gpu->kgd);
kfd_fill_mem_clk_max_info(dev); kfd_fill_mem_clk_max_info(dev);
kfd_fill_iolink_non_crat_info(dev); kfd_fill_iolink_non_crat_info(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment