mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-08 10:40:11 +01: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> (cherry picked from commitaea9ac47d2)
This commit is contained in:
parent
a24d356a17
commit
d53e1c07bd
2 changed files with 11 additions and 8 deletions
|
|
@ -234,7 +234,7 @@
|
|||
"description": "anv/trtt: fix error handling when adding binds",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "7da5b1caef21ca1da75573737f553fa301d25b2c",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -685,6 +685,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -694,14 +696,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);
|
||||
|
|
@ -746,6 +746,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