Skip to content

Commit

Permalink
drm/amdkfd: Add node_id to location_id generically
Browse files Browse the repository at this point in the history
If there are multiple nodes per kfd device, add nodeid to location_id to
differentiate.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Lijo Lazar authored and Alex Deucher committed Aug 13, 2024
1 parent 61cffac commit 42b3a6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdkfd/kfd_topology.c
Original file line number Diff line number Diff line change
Expand Up @@ -2078,7 +2078,7 @@ int kfd_topology_add_device(struct kfd_node *gpu)
HSA_CAP_ASIC_REVISION_MASK);

dev->node_props.location_id = pci_dev_id(gpu->adev->pdev);
if (KFD_GC_VERSION(dev->gpu->kfd) == IP_VERSION(9, 4, 3))
if (gpu->kfd->num_nodes > 1)
dev->node_props.location_id |= dev->gpu->node_id;

dev->node_props.domain = pci_domain_nr(gpu->adev->pdev->bus);
Expand Down

0 comments on commit 42b3a6f

Please sign in to comment.