From 44e93b4c6fdce90a72be51cc96be9f6b34051d5d Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Thu, 7 Apr 2022 11:20:52 +0300 Subject: [PATCH] anv: fix clflush usage on utrace copy batch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lionel Landwerlin Fixes: cc5843a573bd ("anv: implement u_trace support") Reviewed-by: Marcin Ślusarz Reviewed-by: Tapani Pälli Part-of: --- src/intel/vulkan/anv_batch_chain.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 96995718027..62c526aaaed 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -1998,11 +1998,8 @@ setup_utrace_execbuf(struct anv_execbuf *execbuf, struct anv_queue *queue, flush->batch_bo->exec_obj_index = last_idx; } - if (!device->info.has_llc) { - __builtin_ia32_mfence(); - for (uint32_t i = 0; i < flush->batch_bo->size; i += CACHELINE_SIZE) - __builtin_ia32_clflush(flush->batch_bo->map); - } + if (!device->info.has_llc) + intel_flush_range(flush->batch_bo->map, flush->batch_bo->size); execbuf->execbuf = (struct drm_i915_gem_execbuffer2) { .buffers_ptr = (uintptr_t) execbuf->objects,