mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
anv/trtt: fix error handling when adding binds
We're missing a check for 'result' in the middle of a loop and we have
an unnecessary check for 'result' after the loop.
Fixes: 7da5b1caef ("anv: move trtt submissions over to the anv_async_submit")
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30953>
This commit is contained in:
parent
fd43c4a973
commit
aea9ac47d2
1 changed files with 10 additions and 7 deletions
|
|
@ -786,6 +786,8 @@ anv_sparse_bind_trtt(struct anv_device *device,
|
|||
result = anv_trtt_bind_add(device, trtt_addr, dest_addr,
|
||||
l3l2_binds, &n_l3l2_binds,
|
||||
l1_binds, &n_l1_binds);
|
||||
if (result != VK_SUCCESS)
|
||||
goto error_stack_arrays;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -795,14 +797,12 @@ anv_sparse_bind_trtt(struct anv_device *device,
|
|||
/* Convert the L3/L2/L1 TRTT page table updates in anv_trtt_bind elements
|
||||
* into MI commands.
|
||||
*/
|
||||
if (result == VK_SUCCESS) {
|
||||
sparse_debug("trtt_binds: num_vm_binds:%02d l3l2:%04d l1:%04d\n",
|
||||
sparse_submit->binds_len, n_l3l2_binds, n_l1_binds);
|
||||
sparse_debug("trtt_binds: num_vm_binds:%02d l3l2:%04d l1:%04d\n",
|
||||
sparse_submit->binds_len, n_l3l2_binds, n_l1_binds);
|
||||
|
||||
if (n_l3l2_binds || n_l1_binds) {
|
||||
anv_genX(device->info, write_trtt_entries)(
|
||||
&submit->base, l3l2_binds, n_l3l2_binds, l1_binds, n_l1_binds);
|
||||
}
|
||||
if (n_l3l2_binds || n_l1_binds) {
|
||||
anv_genX(device->info, write_trtt_entries)(
|
||||
&submit->base, l3l2_binds, n_l3l2_binds, l1_binds, n_l1_binds);
|
||||
}
|
||||
|
||||
STACK_ARRAY_FINISH(l1_binds);
|
||||
|
|
@ -847,6 +847,9 @@ anv_sparse_bind_trtt(struct anv_device *device,
|
|||
|
||||
return VK_SUCCESS;
|
||||
|
||||
error_stack_arrays:
|
||||
STACK_ARRAY_FINISH(l1_binds);
|
||||
STACK_ARRAY_FINISH(l3l2_binds);
|
||||
error_add_bind:
|
||||
simple_mtx_unlock(&trtt->mutex);
|
||||
anv_async_submit_fini(&submit->base);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue