From 9d8d5cf8c9a04b164d1becff6b1be93b24149c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Tue, 18 Jun 2024 07:34:15 -0700 Subject: [PATCH] anv: Remove block promoting non CPU mapped bos to coherent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The intention of this block was to set one of the flags that is used to select a PAT index but this was doing more than that. It was promoting WB+0 way coherency BOs to WC+1 way coherency possibly causing regression in platforms without LLC. anv_device_get_pat_entry() return WC/writecombining if no flags is set so we don't need this block after all. Reported-by: Sushma Venkatesh Reddy Fixes: a65e982b4412 ("anv: Split ANV_BO_ALLOC_HOST_CACHED_COHERENT into two actual flags") Reviewed-by: Kenneth Graunke Signed-off-by: José Roberto de Souza Part-of: --- src/intel/vulkan/anv_allocator.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 9144406a84e..c4d0886b255 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1575,12 +1575,6 @@ anv_device_alloc_bo(struct anv_device *device, assert((alloc_flags & ANV_BO_ALLOC_MAPPED) == 0 || (alloc_flags & (ANV_BO_ALLOC_HOST_CACHED | ANV_BO_ALLOC_HOST_COHERENT))); - /* KMD requires a valid PAT index, so setting HOST_COHERENT/WC to bos that - * don't need CPU access - */ - if ((alloc_flags & ANV_BO_ALLOC_MAPPED) == 0) - alloc_flags |= ANV_BO_ALLOC_HOST_COHERENT; - /* In platforms with LLC we can promote all bos to cached+coherent for free */ const enum anv_bo_alloc_flags not_allowed_promotion = ANV_BO_ALLOC_SCANOUT | ANV_BO_ALLOC_EXTERNAL |