Skip to contentSkip to conversation

drm/amdkfd: Remove hard‑coded GC IP version checks from kfd_node_by_irq_ids

PATCH New Alex Deucher 1 participant 1 message Nov 17, 2025

Subsystems (3)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdkfd: Remove hard‑coded GC IP version checks from kfd_node_by_irq_ids

From: Sreekant Somasekharan <[email protected]>

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().

---
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_priv.h +5 -3
index 70ef051511bb1..7bf0fac50fa2d 100644
@@ -1163,9 +1163,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++)
Signature · 1 line
2.51.1