Mesa (staging/22.0): anv: fix clflush usage on utrace copy batch
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon May 2 17:43:45 UTC 2022
Module: Mesa
Branch: staging/22.0
Commit: b75ffe457664472e3071f24d81574cd7e620ee06
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b75ffe457664472e3071f24d81574cd7e620ee06
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Thu Apr 7 11:20:52 2022 +0300
anv: fix clflush usage on utrace copy batch
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: cc5843a573bd ("anv: implement u_trace support")
Reviewed-by: Marcin Ślusarz <marcin.slusarz at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15780>
(cherry picked from commit 44e93b4c6fdce90a72be51cc96be9f6b34051d5d)
---
.pick_status.json | 2 +-
src/intel/vulkan/anv_batch_chain.c | 7 ++-----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 41c8c4ed210..8ccf3beeed8 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -252,7 +252,7 @@
"description": "anv: fix clflush usage on utrace copy batch",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"because_sha": "cc5843a573bd0412c547b4f2af3cce18263ecfd4"
},
{
diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c
index b6a884c208e..c47d7ef5f53 100644
--- a/src/intel/vulkan/anv_batch_chain.c
+++ b/src/intel/vulkan/anv_batch_chain.c
@@ -1989,11 +1989,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,
More information about the mesa-commit
mailing list