Skip to content

Commit 824df77

Browse files
Andi Shytitursulin
authored andcommitted
drm/i915/gt: Enable the CCS_FLUSH bit in the pipe control and in the CS
Enable the CCS_FLUSH bit 13 in the control pipe for render and compute engines in platforms starting from Meteor Lake (BSPEC 43904 and 47112). For the copy engine add MI_FLUSH_DW_CCS (bit 16) in the command streamer. Fixes: 972282c ("drm/i915/gen12: Add aux table invalidate for all engines") Requires: 8da173db894a ("drm/i915/gt: Rename flags with bit_group_X according to the datasheet") Signed-off-by: Andi Shyti <[email protected]> Cc: Jonathan Cavitt <[email protected]> Cc: Nirmoy Das <[email protected]> Cc: <[email protected]> # v5.8+ Reviewed-by: Matt Roper <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Reviewed-by: Nirmoy Das <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit b70df82) Signed-off-by: Tvrtko Ursulin <[email protected]>
1 parent 592b228 commit 824df77

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

drivers/gpu/drm/i915/gt/gen8_engine_cs.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
230230

231231
bit_group_0 |= PIPE_CONTROL0_HDC_PIPELINE_FLUSH;
232232

233+
/*
234+
* When required, in MTL and beyond platforms we
235+
* need to set the CCS_FLUSH bit in the pipe control
236+
*/
237+
if (GRAPHICS_VER_FULL(rq->i915) >= IP_VER(12, 70))
238+
bit_group_0 |= PIPE_CONTROL_CCS_FLUSH;
239+
233240
bit_group_1 |= PIPE_CONTROL_TILE_CACHE_FLUSH;
234241
bit_group_1 |= PIPE_CONTROL_FLUSH_L3;
235242
bit_group_1 |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH;
@@ -356,6 +363,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
356363
cmd |= MI_INVALIDATE_TLB;
357364
if (rq->engine->class == VIDEO_DECODE_CLASS)
358365
cmd |= MI_INVALIDATE_BSD;
366+
367+
if (gen12_needs_ccs_aux_inv(rq->engine) &&
368+
rq->engine->class == COPY_ENGINE_CLASS)
369+
cmd |= MI_FLUSH_DW_CCS;
359370
}
360371

361372
*cs++ = cmd;

drivers/gpu/drm/i915/gt/intel_gpu_commands.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@
299299
#define PIPE_CONTROL_QW_WRITE (1<<14)
300300
#define PIPE_CONTROL_POST_SYNC_OP_MASK (3<<14)
301301
#define PIPE_CONTROL_DEPTH_STALL (1<<13)
302+
#define PIPE_CONTROL_CCS_FLUSH (1<<13) /* MTL+ */
302303
#define PIPE_CONTROL_WRITE_FLUSH (1<<12)
303304
#define PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH (1<<12) /* gen6+ */
304305
#define PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE (1<<11) /* MBZ on ILK */

0 commit comments

Comments
 (0)