From 58301c00da873ddae78cdd9dd1dfdd75d6572d4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Wed, 13 Sep 2023 06:53:29 -0700 Subject: [PATCH] anv: Change default PAT entry to WC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit i915 mmap_calc_flags() is calculating WC caching for all MTL memory types. It will be fixed in the next patch but doing so causes tests to fail due to incoherency in BOs not allocated with VK_MEMORY_PROPERTY_HOST_COHERENT_BIT. So here switching the default/non-coherent BO allocation to a WC PAT entry. Signed-off-by: José Roberto de Souza Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 206f384868c..17c76fe14c0 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -4965,5 +4965,5 @@ anv_device_get_pat_entry(struct anv_device *device, else if (alloc_flags & (ANV_BO_ALLOC_EXTERNAL | ANV_BO_ALLOC_SCANOUT)) return &device->info->pat.scanout; else - return &device->info->pat.writeback; + return &device->info->pat.writecombining; }