intel/aux_map: fix fallback unmapping range on failure

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 7c6faa1efe ("intel/aux_map: introduce ref count of L1 entries")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27057>
(cherry picked from commit ff6041afdf2df9f048aa192f602c191e96ce92fd)
This commit is contained in:
Lionel Landwerlin 2024-01-14 10:49:57 +02:00 committed by Eric Engestrom
parent f19b7d8dfc
commit eb3d73073f
2 changed files with 2 additions and 2 deletions

View file

@ -64,7 +64,7 @@
"description": "intel/aux_map: fix fallback unmapping range on failure",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7c6faa1efe8f50263bfc1f71cb1c4a1c2302b5df",
"notes": null

View file

@ -728,7 +728,7 @@ intel_aux_map_add_mapping(struct intel_aux_map_context *ctx, uint64_t main_addre
if (!success && (main_inc_addr - main_address) > 0) {
/* If the mapping failed, remove the mapped portion. */
remove_mapping_locked(ctx, main_address,
main_size_B - (main_inc_addr - main_address),
main_inc_addr - main_address,
false /* reset_refcount */, &state_changed);
}
pthread_mutex_unlock(&ctx->mutex);