summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorSunil Khatri <sunil.khatri@amd.com>2026-03-26 13:06:07 +0530
committerAlex Deucher <alexander.deucher@amd.com>2026-04-03 13:59:10 -0400
commit4c86e12ab1be971ddb0748e373cf6d25d68bdc22 (patch)
treea18d42b6dafd3d02318787a59c2a2a7e55b96152 /drivers/gpu/drm/amd/amdgpu
parent1e57e72ae3c34144ccecb0a0b77e5c397ec0668a (diff)
downloadlwn-4c86e12ab1be971ddb0748e373cf6d25d68bdc22.tar.gz
lwn-4c86e12ab1be971ddb0748e373cf6d25d68bdc22.zip
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>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
index 4323fd4c7fe1..999d8e298bce 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
@@ -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);