From cf8112f6714eb3b955cf663371ce44b70a1d220d Mon Sep 17 00:00:00 2001 From: Horatio Zhang Date: Mon, 7 Sep 2026 17:17:27 +0800 Subject: [PATCH] drm/amdkfd: allow 255 queues per process on GFX 12.1.0 GFX 12.1.0 queues are managed by MES, not by the HWS runlist, so the 127 queue limit does not apply. The topology advertises 32 CP queues plus 16 SDMA engines with 6 queues each, so creating every queue needs 128 and the last one fails with -ENOSPC. Signed-off-by: Horatio Zhang Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c index fb2d8ad9c2c5..a15a826519ad 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c @@ -339,12 +339,13 @@ int pqm_create_queue(struct process_queue_manager *pqm, unsigned int max_queues = 127; /* HWS limit */ /* - * On GFX 9.4.3/9.5.0, increase the number of queues that - * can be created to 255. No HWS limit on GFX 9.4.3/9.5.0. + * On GFX 9.4.3/9.5.0/12.1.0, increase the number of queues that + * can be created to 255. No HWS limit on GFX 9.4.3/9.5.0/12.1.0. */ 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)) + KFD_GC_VERSION(dev) == IP_VERSION(9, 5, 0) || + KFD_GC_VERSION(dev) == IP_VERSION(12, 1, 0)) max_queues = 255; q = NULL;