aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLijo Lazar <[email protected]>2024-08-07 21:41:59 +0530
committerAlex Deucher <[email protected]>2024-08-13 12:12:52 -0400
commit42b3a6f12aa56dcf789464d29fdf11f33bf0e793 (patch)
tree3782e2be061738bcefe2cc12757845d2e6aa1fee
parent61cffacb3a1c590b15c0e9ff987de02d293e0dd8 (diff)
drm/amdkfd: Add node_id to location_id generically
If there are multiple nodes per kfd device, add nodeid to location_id to differentiate. Signed-off-by: Lijo Lazar <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_topology.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 27d452e50ca9..3871591c9aec 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -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);