Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Sunil Khatri and committed by
Alex Deucher
4c86e12a 1e57e72a

+4 -5
+4 -5
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
··· 1023 1023 mutex_unlock(&uq_mgr->userq_mutex); 1024 1024 1025 1025 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); 1027 1028 return ret; 1028 1029 } 1029 1030 ··· 1231 1230 1232 1231 ret = amdgpu_userq_vm_validate(uq_mgr); 1233 1232 if (ret) { 1234 - drm_file_err(uq_mgr->file, "Failed to validate BOs to restore\n"); 1233 + drm_file_err(uq_mgr->file, "Failed to validate BOs to restore ret=%d\n", ret); 1235 1234 goto put_fence; 1236 1235 } 1237 1236 1238 - ret = amdgpu_userq_restore_all(uq_mgr); 1239 - if (ret) 1240 - drm_file_err(uq_mgr->file, "Failed to restore all queues\n"); 1237 + amdgpu_userq_restore_all(uq_mgr); 1241 1238 1242 1239 put_fence: 1243 1240 dma_fence_put(ev_fence);