]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdkfd: Update queue properties for metadata ring
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 9 Dec 2025 21:01:10 +0000 (16:01 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Mar 2026 14:30:22 +0000 (10:30 -0400)
Metadata ring and queue ring is allocated as one buffer and map
to GPU, so update queue peoperties should add the queue metadata
size and ring size as buffer size to validate queue ring buffer.

Fixes: c51bb53d5c68 ("drm/amdkfd: Add metadata ring buffer for compute")
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Alex Sierra <alex.sierra@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

index cc2621ae12f9c6ae2bf2bc57bdc0dcb0695493ad..44e39ce222b78b95b010ed01651361db2b4a8db7 100644 (file)
@@ -590,7 +590,8 @@ int pqm_update_queue_properties(struct process_queue_manager *pqm,
                        return err;
 
                if (kfd_queue_buffer_get(vm, (void *)p->queue_address, &p->ring_bo,
-                                        p->queue_size)) {
+                                        p->queue_size +
+                                        pqn->q->properties.metadata_queue_size)) {
                        pr_debug("ring buf 0x%llx size 0x%llx not mapped on GPU\n",
                                 p->queue_address, p->queue_size);
                        amdgpu_bo_unreserve(vm->root.bo);