summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdkfd
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2024-01-22 08:10:49 +0300
committerAlex Deucher <alexander.deucher@amd.com>2024-02-26 19:15:38 +0300
commitc37ce764cd492f044dcdbb39616298f02b0dbc7f (patch)
tree90c7f0d14d7d85191be2156aafbd33e75c90a7af /drivers/gpu/drm/amd/amdkfd
parent93d64097f741f1f07a8da9d7882d0d2657d3642a (diff)
downloadlinux-c37ce764cd492f044dcdbb39616298f02b0dbc7f.tar.xz
drm/amdkfd: Add partition id field to location_id
On devices which have multi-partition nodes, keep partition id in location_id[31:28]. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Jonathan Kim <jonathan.kim@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_topology.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index bc9eb847ecfe..c51f131eaa2f 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -1997,8 +1997,9 @@ 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))
- dev->node_props.location_id |= dev->gpu->node_id;
+ /* On multi-partition nodes, node id = location_id[31:28] */
+ if (gpu->kfd->num_nodes > 1)
+ dev->node_props.location_id |= (dev->gpu->node_id << 28);
dev->node_props.domain = pci_domain_nr(gpu->adev->pdev->bus);
dev->node_props.max_engine_clk_fcompute =