summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreekant Somasekharan <Sreekant.Somasekharan@amd.com>2025-11-07 07:49:08 +0300
committerAlex Deucher <alexander.deucher@amd.com>2025-12-08 21:56:30 +0300
commit5287e7ef748e4bad63c6f5f05348b022ec867407 (patch)
treec1b1a5e8079c0e7df1d897f8e26b2989484535e9
parentcf856ca9b999bc81d27bf8c4e1d7b5c7740bcea8 (diff)
downloadlinux-5287e7ef748e4bad63c6f5f05348b022ec867407.tar.xz
drm/amdkfd: Remove hard‑coded GC IP version checks from kfd_node_by_irq_ids
Replace the GC IP version hard-coded check with multi-aid check in kfd_node_by_irq_ids(). If aid_mask is not set, we immediately return dev->nodes[0] otherwise we iterate and match using kfd_irq_is_from_node(). Signed-off-by: Sreekant Somasekharan <Sreekant.Somasekharan@amd.com> Reviewed-by: Philip Yang <Philip.Yang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_priv.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index 6c05d7f57196..76842bb8e78b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -1162,9 +1162,11 @@ static inline struct kfd_node *kfd_node_by_irq_ids(struct amdgpu_device *adev,
struct kfd_dev *dev = adev->kfd.dev;
uint32_t i;
- if (KFD_GC_VERSION(dev) != IP_VERSION(9, 4, 3) &&
- KFD_GC_VERSION(dev) != IP_VERSION(9, 4, 4) &&
- KFD_GC_VERSION(dev) != IP_VERSION(9, 5, 0))
+ /*
+ * On multi-aid system, attempt per-node matching. Otherwise,
+ * fall back to the first node.
+ */
+ if (!amdgpu_is_multi_aid(adev))
return dev->nodes[0];
for (i = 0; i < dev->num_nodes; i++)