[PATCH 10/10] change flush position

Andi Shyti andi.shyti at linux.intel.com
Sun Jul 23 17:56:25 UTC 2023


---
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
index 6d3738a2cfbdc..4e7aa9407277e 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -385,11 +385,6 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	if (IS_ERR(cs))
 		return PTR_ERR(cs);
 
-	if (cmd_flush) {
-		*cs++ = cmd_flush;
-		*cs++ = 0;
-	}
-
 	if (mode & EMIT_INVALIDATE)
 		*cs++ = preparser_disable(true);
 
@@ -414,6 +409,11 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
 	*cs++ = 0; /* upper addr */
 	*cs++ = 0; /* value */
 
+	if (cmd_flush) {
+		*cs++ = cmd_flush;
+		*cs++ = 0;
+	}
+
 	cs = gen12_emit_aux_table_inv(rq->engine, cs);
 
 	if (mode & EMIT_INVALIDATE)
-- 
2.40.1



More information about the Intel-gfx-trybot mailing list