Skip to content

Commit 4c86e12

Browse files
amd-sukhatrialexdeucher
authored andcommitted
drm/amdgpu/userq: add the return code too in error condition
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>
1 parent 1e57e72 commit 4c86e12

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,8 @@ amdgpu_userq_restore_all(struct amdgpu_userq_mgr *uq_mgr)
10231023
mutex_unlock(&uq_mgr->userq_mutex);
10241024

10251025
if (ret)
1026-
drm_file_err(uq_mgr->file, "Failed to map all the queues\n");
1026+
drm_file_err(uq_mgr->file,
1027+
"Failed to map all the queues, restore failed ret=%d\n", ret);
10271028
return ret;
10281029
}
10291030

@@ -1230,13 +1231,11 @@ static void amdgpu_userq_restore_worker(struct work_struct *work)
12301231

12311232
ret = amdgpu_userq_vm_validate(uq_mgr);
12321233
if (ret) {
1233-
drm_file_err(uq_mgr->file, "Failed to validate BOs to restore\n");
1234+
drm_file_err(uq_mgr->file, "Failed to validate BOs to restore ret=%d\n", ret);
12341235
goto put_fence;
12351236
}
12361237

1237-
ret = amdgpu_userq_restore_all(uq_mgr);
1238-
if (ret)
1239-
drm_file_err(uq_mgr->file, "Failed to restore all queues\n");
1238+
amdgpu_userq_restore_all(uq_mgr);
12401239

12411240
put_fence:
12421241
dma_fence_put(ev_fence);

0 commit comments

Comments
 (0)