]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/userq: unmap_helper dont return the queue state
authorSunil Khatri <sunil.khatri@amd.com>
Mon, 13 Apr 2026 06:16:47 +0000 (11:46 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Apr 2026 19:41:12 +0000 (15:41 -0400)
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 <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 ea63273b8be6454f08d07a86d6a4093a076bdb83..87b0d291859aa98c78bf9a8f24ca812976bc6826 100644 (file)
@@ -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;
        }