Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: Don't set PIPE_CONTROL_FLUSH_L3 for aux inval

PIPE_CONTROL_FLUSH_L3 is not needed for aux invalidation
so don't set that.

Fixes: 78a6ccd65fa3 ("drm/i915/gt: Ensure memory quiesced before invalidation")
Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: <stable@vger.kernel.org> # v5.8+
Cc: Andrzej Hajda <andrzej.hajda@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Tejas Upadhyay <tejas.upadhyay@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Prathap Kumar Valsan <prathap.kumar.valsan@intel.com>
Cc: Tapani Pälli <tapani.palli@intel.com>
Cc: Mark Janes <mark.janes@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Acked-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Tested-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230926142401.25687-1-nirmoy.das@intel.com
(cherry picked from commit 03d681412b38558aefe4fb0f46e36efa94bb21ef)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

authored by

Nirmoy Das and committed by
Rodrigo Vivi
128c20ed 8a749fd1

+10 -1
+10 -1
drivers/gpu/drm/i915/gt/gen8_engine_cs.c
··· 271 271 if (GRAPHICS_VER_FULL(rq->i915) >= IP_VER(12, 70)) 272 272 bit_group_0 |= PIPE_CONTROL_CCS_FLUSH; 273 273 274 + /* 275 + * L3 fabric flush is needed for AUX CCS invalidation 276 + * which happens as part of pipe-control so we can 277 + * ignore PIPE_CONTROL_FLUSH_L3. Also PIPE_CONTROL_FLUSH_L3 278 + * deals with Protected Memory which is not needed for 279 + * AUX CCS invalidation and lead to unwanted side effects. 280 + */ 281 + if (mode & EMIT_FLUSH) 282 + bit_group_1 |= PIPE_CONTROL_FLUSH_L3; 283 + 274 284 bit_group_1 |= PIPE_CONTROL_TILE_CACHE_FLUSH; 275 - bit_group_1 |= PIPE_CONTROL_FLUSH_L3; 276 285 bit_group_1 |= PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH; 277 286 bit_group_1 |= PIPE_CONTROL_DEPTH_CACHE_FLUSH; 278 287 /* Wa_1409600907:tgl,adl-p */