⬢ DragonFlyBSD Kernel Audit
DF-3945 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/drm/i915/intel_lrc.c b/sys/dev/drm/i915/intel_lrc.c
index 67f7c4e9..8572f0ae 100644
--- a/sys/dev/drm/i915/intel_lrc.c
+++ b/sys/dev/drm/i915/intel_lrc.c
@@ -1580,5 +1580,14 @@
 	/* WaFlushCoherentL3CacheLinesAtContextSwitch:skl,bxt,glk */
 	batch = gen8_emit_flush_coherentl3_wa(engine, batch);
 
+	/* WaClearSlmSpaceAtContextSwitch:skl,bxt,kbl,glk,cfl */
+	batch = gen8_emit_pipe_control(batch,
+			       PIPE_CONTROL_FLUSH_L3 |
+			       PIPE_CONTROL_GLOBAL_GTT_IVB |
+			       PIPE_CONTROL_CS_STALL |
+			       PIPE_CONTROL_QW_WRITE,
+			       i915_scratch_offset(engine->i915) +
+			       2 * CACHELINE_BYTES);
+
 	batch = emit_lri(batch, lri, ARRAY_SIZE(lri));