From 6f02f9d1084087c97005815bb6070053d09a422c Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 20 Jan 2023 09:41:04 +0200 Subject: [PATCH] anv: fix preemption enable emission in gpu_memcpy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This has to be before the MI_BATCH_BUFFER_END otherwise it has no effect. This also was messing around with you batch length alignment. Signed-off-by: Lionel Landwerlin Fixes: b9aa66d5d0 ("anv: disable preemption for 3DPRIMITIVE during streamout") Reviewed-by: Tapani Pälli Reviewed-by: Paulo Zanoni Part-of: --- src/intel/vulkan/genX_gpu_memcpy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/intel/vulkan/genX_gpu_memcpy.c b/src/intel/vulkan/genX_gpu_memcpy.c index 27ee96604ed..19b97c284de 100644 --- a/src/intel/vulkan/genX_gpu_memcpy.c +++ b/src/intel/vulkan/genX_gpu_memcpy.c @@ -258,13 +258,13 @@ genX(emit_so_memcpy_fini)(struct anv_memcpy_state *state) void genX(emit_so_memcpy_end)(struct anv_memcpy_state *state) { + if (intel_device_info_is_dg2(state->device->info)) + genX(batch_set_preemption)(state->batch, true); + anv_batch_emit(state->batch, GENX(MI_BATCH_BUFFER_END), end); if ((state->batch->next - state->batch->start) & 4) anv_batch_emit(state->batch, GENX(MI_NOOP), noop); - - if (intel_device_info_is_dg2(state->device->info)) - genX(batch_set_preemption)(state->batch, true); } void