On 5/19/26 13:17, Sunil Khatri wrote:
> During queue creation failure, when we clean up mqd via
> mqd_destroy we arent doing the wptr_obj cleanup and hence
> adding that clean up.
>
> Signed-off-by: Sunil Khatri <[email protected]>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> index 0737636fac43..47a38fefad89 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> @@ -835,6 +835,10 @@ amdgpu_userq_create(struct drm_file *filp, union
> drm_amdgpu_userq *args)
> erase_doorbell:
> xa_erase_irq(&adev->userq_doorbell_xa, index);
> clean_mqd:
> + amdgpu_bo_reserve(queue->wptr_obj.obj, true);
> + amdgpu_bo_unpin(queue->wptr_obj.obj);
> + amdgpu_bo_unreserve(queue->wptr_obj.obj);
> + amdgpu_bo_unref(&queue->wptr_obj.obj);
That should probably be a function in mes_userqueue.c instead of here.
Regards,
Christian.
> uq_funcs->mqd_destroy(queue);
> clean_doorbell_bo:
> amdgpu_bo_reserve(queue->db_obj.obj, true);