Hi, This series fixes MES queue type handling for KFD queues.
MES ADD_QUEUE programs the firmware using the queue type supplied by the driver, but REMOVE_QUEUE was leaving queue_type zero-initialized. Since zero decodes as GFX in the REMOVE_QUEUE packet, a KFD compute queue could be removed as a GFX queue. This was observed during a debug-trap suspend/remove sequence: the failing REMOVE_QUEUE packet used queue_type=GFX for doorbell 0x1002, while the matching ADD_QUEUE packet for that doorbell had used queue_type=COMPUTE. MES can then search in the wrong queue class and the REMOVE_QUEUE command may not complete. The first patch sets queue_type for REMOVE_QUEUE using the same queue information as ADD_QUEUE. The second patch fixes the type abstraction used by KFD. The MES input interface expects enum amdgpu_ring_type values; conversion to MES_QUEUE_TYPE is handled by the MES backend when building firmware packets. KFD now returns AMDGPU_RING_TYPE_* values from the helper, renames the helper to make that explicit, and uses it consistently for add, remove, and reset paths. Geoffrey McRae (2): drm/amdgpu,amdkfd: correct setting MES queue type drm/amdkfd: use amdgpu ring types for MES queue drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 + drivers/gpu/drm/amd/amdgpu/mes_userqueue.c | 1 + drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 2 ++ drivers/gpu/drm/amd/amdgpu/mes_v12_1.c | 3 +++ .../drm/amd/amdkfd/kfd_device_queue_manager.c | 19 +++++++++++-------- 6 files changed, 20 insertions(+), 8 deletions(-) -- 2.43.0
