mesa/src/intel/vulkan/i915
José Roberto de Souza 7bdfabb641 anv: Calculate mmap mode based on alloc_flags
When anv_device_map_bo() is called from anv_device_alloc_bo() it gets
VkMemoryPropertyFlags set to 0 so it ends up with a write-combine
caching for integrated platforms with LLC, see 'if (!(property_flags &
VK_MEMORY_PROPERTY_HOST_CACHED_BIT)))'.

Current approach also has issues when mapping with anv_MapMemory2KHR()
as it would not have information to know that BO is a scanout.

It was also not properly calculating mmap mode for platforms with PAT
uAPI before "anv: Change default PAT entry to WC".

So here storing alloc_flags to anv_bo so there is no mismatches
between different code paths then using it to properly
calculate the mmap mode.

alloc_flags in anv_bo will also be used to calculate PAT index in
future patches.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26099>
2023-11-08 01:20:42 +00:00
..
anv_batch_chain.c anv: dynamically allocate utrace batch buffers 2023-11-07 17:48:11 +00:00
anv_batch_chain.h anv: move utrace flush out of backends 2023-09-25 13:05:45 +00:00
anv_device.c anv: Create companion RCS engine 2023-09-07 06:39:06 +00:00
anv_device.h anv: create individual logical engines on i915 when possible 2023-09-07 06:39:06 +00:00
anv_gem.c anv: Move i915 handling of imported bos bo_flags 2023-09-13 13:10:59 -07:00
anv_gem.h anv: Move i915 handling of imported bos bo_flags 2023-09-13 13:10:59 -07:00
anv_kmd_backend.c anv: Calculate mmap mode based on alloc_flags 2023-11-08 01:20:42 +00:00
anv_queue.c anv: Create companion RCS engine 2023-09-07 06:39:06 +00:00
anv_queue.h anv: hide exec_flags selection inside the i915 backend 2023-07-13 17:12:26 +00:00