drm/amdkfd: allow 255 queues per process on GFX 12.1.0
Subsystems (3)
PATCH 1/1 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:
[ RUN ] KFDQMTest.AllQueues
KFDQMTest.cpp:365: Failure
Value of: (sdmaQueues[j].Create(gpuNode))
Actual: 1
Expected: HSAKMT_STATUS_SUCCESS
[ FAILED ] KFDQMTest.AllQueues
--- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +4 -3
@@ -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 ;
Signature · 1 line
2.43.0
AMD General
Regards,
Hawking
-----Original Message-----
From: Horatio Zhang <[email protected]>
Sent: Monday, September 7, 2026 5:50 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Xiao, Jack <[email protected]>; Zhang, Horatio <[email protected]>
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:
[ RUN ] KFDQMTest.AllQueues
KFDQMTest.cpp:365: Failure
Value of: (sdmaQueues[j].Create(gpuNode))
Actual: 1
Expected: HSAKMT_STATUS_SUCCESS
[ FAILED ] KFDQMTest.AllQueues
--- drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c +4 -3
@@ -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 ;
--
2.43.0