]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/gt: add wait on depth stall done bit handling
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Fri, 14 Feb 2025 15:57:11 +0000 (17:57 +0200)
committerAndi Shyti <andi.shyti@linux.intel.com>
Tue, 18 Feb 2025 11:37:04 +0000 (12:37 +0100)
Add writing of WAIT_ON_DEPTH_STALL_DONE_DISABLE for gen12, this
is performance optimization.

Bspec: 46132

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12411
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250214155712.2849848-2-juhapekka.heikkila@gmail.com
drivers/gpu/drm/i915/gt/intel_gt_regs.h
drivers/gpu/drm/i915/gt/intel_workarounds.c

index 6dba65e54cdb812721d3f910d1a9ee1ca90e5bca..a6e50af44b4652bf6fa487f719d72f27daaecc46 100644 (file)
 #define GEN7_SO_PRIM_STORAGE_NEEDED(n)         _MMIO(0x5240 + (n) * 8)
 #define GEN7_SO_PRIM_STORAGE_NEEDED_UDW(n)     _MMIO(0x5240 + (n) * 8 + 4)
 
+#define GEN8_WM_CHICKEN2                       MCR_REG(0x5584)
+#define   WAIT_ON_DEPTH_STALL_DONE_DISABLE     REG_BIT(5)
+
 #define GEN9_WM_CHICKEN3                       _MMIO(0x5588)
 #define   GEN9_FACTOR_IN_CLR_VAL_HIZ           (1 << 9)
 
index 277a4df31071f8b4cac643ca8ba5f80721e6d9f9..8e1d9e0e6daa8d2afefeaa36ece8079878e6bd9d 100644 (file)
@@ -742,6 +742,12 @@ static void gen12_ctx_workarounds_init(struct intel_engine_cs *engine,
                /* Wa_1606376872 */
                wa_masked_en(wal, COMMON_SLICE_CHICKEN4, DISABLE_TDC_LOAD_BALANCING_CALC);
        }
+
+       /*
+        * This bit must be set to enable performance optimization for fast
+        * clears.
+        */
+       wa_mcr_write_or(wal, GEN8_WM_CHICKEN2, WAIT_ON_DEPTH_STALL_DONE_DISABLE);
 }
 
 static void dg1_ctx_workarounds_init(struct intel_engine_cs *engine,