]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu/userq: add the return code too in error condition
authorSunil Khatri <sunil.khatri@amd.com>
Thu, 26 Mar 2026 07:36:07 +0000 (13:06 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 3 Apr 2026 17:59:10 +0000 (13:59 -0400)
In function amdgpu_userq_restore
a. amdgpu_userq_vm_validate: add return code in error condition
b. amdgpu_userq_restore_all: It already prints the error log, just
   update the erorr log in the function and remove it from caller.

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 4323fd4c7fe1a150c3341b39a6ebc1b7e8f56e64..999d8e298bce4865ff01d25476d3dfaecba81eae 100644 (file)
@@ -1023,7 +1023,8 @@ amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mgr)
        mutex_unlock(&uq_mgr->userq_mutex);
 
        if (ret)
-               drm_file_err(uq_mgr->file, "Failed to map all the queues\n");
+               drm_file_err(uq_mgr->file,
+                            "Failed to map all the queues, restore failed ret=%d\n", ret);
        return ret;
 }
 
@@ -1230,13 +1231,11 @@ static void amdgpu_userq_restore_worker(struct work_struct *work)
 
        ret = amdgpu_userq_vm_validate(uq_mgr);
        if (ret) {
-               drm_file_err(uq_mgr->file, "Failed to validate BOs to restore\n");
+               drm_file_err(uq_mgr->file, "Failed to validate BOs to restore ret=%d\n", ret);
                goto put_fence;
        }
 
-       ret = amdgpu_userq_restore_all(uq_mgr);
-       if (ret)
-               drm_file_err(uq_mgr->file, "Failed to restore all queues\n");
+       amdgpu_userq_restore_all(uq_mgr);
 
 put_fence:
        dma_fence_put(ev_fence);