mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-27 22:50:31 +01:00
v3dv: Add missing unlocks on errors.
Fix defects reported by Coverity Scan. Missing unlock (LOCK) missing_unlock: Returning without unlocking. Fixes:a7052dcf2c("v3dv: enable multiple semaphores for csd job") Fixes:ad09e50129("v3dv: enable multiple semaphores for tfu job") Fixes:ff8586c345("v3dv: enable multiple semaphores on cl submission") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14663>
This commit is contained in:
parent
dc70dd8c7d
commit
a97ec3eb13
1 changed files with 9 additions and 3 deletions
|
|
@ -918,8 +918,10 @@ handle_cl_job(struct v3dv_queue *queue,
|
|||
enum v3d_queue wait_stage = needs_rcl_sync ? V3D_RENDER : V3D_BIN;
|
||||
set_multisync(&ms, sems_info, NULL, device, job, out_syncs, in_syncs,
|
||||
V3DV_QUEUE_CL, wait_stage);
|
||||
if (!ms.base.id)
|
||||
if (!ms.base.id) {
|
||||
mtx_unlock(&queue->device->mutex);
|
||||
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
}
|
||||
|
||||
submit.flags |= DRM_V3D_SUBMIT_EXTENSION;
|
||||
submit.extensions = (uintptr_t)(void *)&ms;
|
||||
|
|
@ -975,8 +977,10 @@ handle_tfu_job(struct v3dv_queue *queue,
|
|||
struct drm_v3d_multi_sync ms = { 0 };
|
||||
set_multisync(&ms, sems_info, NULL, device, job, out_syncs, in_syncs,
|
||||
V3DV_QUEUE_TFU, V3D_TFU);
|
||||
if (!ms.base.id)
|
||||
if (!ms.base.id) {
|
||||
mtx_unlock(&device->mutex);
|
||||
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
}
|
||||
|
||||
job->tfu.flags |= DRM_V3D_SUBMIT_EXTENSION;
|
||||
job->tfu.extensions = (uintptr_t)(void *)&ms;
|
||||
|
|
@ -1034,8 +1038,10 @@ handle_csd_job(struct v3dv_queue *queue,
|
|||
struct drm_v3d_multi_sync ms = { 0 };
|
||||
set_multisync(&ms, sems_info, NULL, device, job, out_syncs, in_syncs,
|
||||
V3DV_QUEUE_CSD, V3D_CSD);
|
||||
if (!ms.base.id)
|
||||
if (!ms.base.id) {
|
||||
mtx_unlock(&queue->device->mutex);
|
||||
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
}
|
||||
|
||||
submit->flags |= DRM_V3D_SUBMIT_EXTENSION;
|
||||
submit->extensions = (uintptr_t)(void *)&ms;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue