anv: flag BO for write combine when CPU visible and potentially in lmem
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 23 Sep 2022 19:21:10 +0000 (22:21 +0300)
committerMarge Bot <emma+marge@anholt.net>
Wed, 28 Sep 2022 09:51:31 +0000 (09:51 +0000)
commit582bf4d9f72f35bb56f06386ab3fb6b5384a4593
treea3838490b44317fe5fa9c82380ae3d5aae21282f
parentc8f563b633e4a5cb73183a62918de9ea04fcbb07
anv: flag BO for write combine when CPU visible and potentially in lmem

This should fix a performance regression with the internal kernel
branch which does not support the upstream I915_MMAP_OFFSET_FIXED.

With I915_MMAP_OFFSET_FIXED we defer the mapping flags to the kernel
since it knows better where buffers are going to end up (lmem or smem).

The internal kernel doesn´t have that and there we should use write
combined for anything that can be in lmem.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18841>
src/intel/vulkan/anv_device.c