intel: Return a bool from intel_aux_map_add_mapping

Make intel_aux_map_add_mapping return false if a mapping is attempted
that would conflict with an existing one. If this function doesn't
return false, it will either fail to return or return true.

The Vulkan driver will make use of this feature to opportunistically
enable CCS if a BO's VMA range has not been already mapped.

Reviewed-by: Jianxun Zhang <jianxun.zhang@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25003>
This commit is contained in:
Nanley Chery
2023-10-10 15:14:28 -04:00
committed by Marge Bot
parent 16e1163651
commit b1a14fe923
4 changed files with 33 additions and 11 deletions

View File

@@ -109,7 +109,9 @@ intel_aux_map_get_entry(struct intel_aux_map_context *ctx,
uint64_t main_address,
uint64_t *aux_entry_address);
void
/* Fails if a mapping is attempted that would conflict with an existing one.
*/
bool
intel_aux_map_add_mapping(struct intel_aux_map_context *ctx, uint64_t main_address,
uint64_t aux_address, uint64_t main_size_B,
uint64_t format_bits);