From: Sunil Khatri Date: Mon, 13 Apr 2026 06:16:47 +0000 (+0530) Subject: drm/amdgpu/userq: unmap_helper dont return the queue state X-Git-Tag: v7.1-rc1~24^2~3^2~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=1e8b7062d2a8f7cecdbf7ae3fd07efc49a300d0f;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu/userq: unmap_helper dont return the queue state We check for return value of amdgpu_userq_unmap_helper and compare it against the queue->state which is logically wrong and we should just check for failure and do the needfull. Signed-off-by: Sunil Khatri Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c index ea63273b8be6..87b0d291859a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c @@ -645,7 +645,7 @@ amdgpu_userq_destroy(struct amdgpu_userq_mgr *uq_mgr, struct amdgpu_usermode_que amdgpu_userq_detect_and_reset_queues(uq_mgr); r = amdgpu_userq_unmap_helper(queue); /*TODO: It requires a reset for userq hw unmap error*/ - if (unlikely(r != AMDGPU_USERQ_STATE_UNMAPPED)) { + if (r) { drm_warn(adev_to_drm(uq_mgr->adev), "trying to destroy a HW mapping userq\n"); queue->state = AMDGPU_USERQ_STATE_HUNG; }