]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu/userq: remove queue from doorbell xa during clean up
authorSunil Khatri <sunil.khatri@amd.com>
Tue, 3 Mar 2026 17:00:04 +0000 (22:30 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 6 Mar 2026 21:25:52 +0000 (16:25 -0500)
If function amdgpu_userq_map_helper fails we do need to clean
up and remove the queue from the userq_doorbell_xa.

Signed-off-by: Sunil Khatri <sunil.khatri@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c

index 2716811756d2c4ed380a4a40d156ca04b0d5e30c..3ae7d1f5d115b4e0cb5c20d1209a6fe2d3a9f743 100644 (file)
@@ -885,6 +885,7 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args)
                r = amdgpu_userq_map_helper(queue);
                if (r) {
                        drm_file_err(uq_mgr->file, "Failed to map Queue\n");
+                       xa_erase_irq(&adev->userq_doorbell_xa, index);
                        xa_erase(&uq_mgr->userq_xa, qid);
                        amdgpu_userq_fence_driver_free(queue);
                        uq_funcs->mqd_destroy(queue);