Skip to content

Commit

Permalink
drm/i915/gt: add wait on depth stall done bit handling
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Juha-Pekka Heikkila authored and Andi Shyti committed Feb 18, 2025
1 parent 3a79e5a commit 7ded94b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/gt/intel_gt_regs.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@
#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)

Expand Down
6 changes: 6 additions & 0 deletions drivers/gpu/drm/i915/gt/intel_workarounds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7ded94b

Please sign in to comment.