anv: fix clflush usage on utrace copy batch

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: cc5843a573 ("anv: implement u_trace support")
Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15780>
(cherry picked from commit 44e93b4c6f)
This commit is contained in:
Lionel Landwerlin 2022-04-07 11:20:52 +03:00 committed by Dylan Baker
parent 2f286bfef5
commit 9fdb834853
2 changed files with 3 additions and 6 deletions

View file

@ -382,7 +382,7 @@
"description": "anv: fix clflush usage on utrace copy batch",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "cc5843a573bd0412c547b4f2af3cce18263ecfd4"
},

View file

@ -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,