[PATCH 10/10] change flush position
Andi Shyti
andi.shyti at linux.intel.com
Mon Jul 24 11:32:55 UTC 2023
---
drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 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..23f4bca5befb8 100644
--- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
@@ -385,13 +385,10 @@ 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)
+ if (mode & EMIT_INVALIDATE) {
*cs++ = preparser_disable(true);
+ *cs++ = MI_NOOP;
+ }
cmd = MI_FLUSH_DW + 1;
@@ -414,6 +411,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