Skip to content

Commit f5d2904

Browse files
author
Andi Shyti
committed
drm/i915/gt: Disable HW load balancing for CCS
The hardware should not dynamically balance the load between CCS engines. Wa_14019159160 recommends disabling it across all platforms. Fixes: d2eae8e ("drm/i915/dg2: Drop force_probe requirement") Signed-off-by: Andi Shyti <[email protected]> Cc: Chris Wilson <[email protected]> Cc: Joonas Lahtinen <[email protected]> Cc: Matt Roper <[email protected]> Cc: <[email protected]> # v6.2+ Reviewed-by: Matt Roper <[email protected]> Acked-by: Michal Mrozek <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent fc58c69 commit f5d2904

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,6 +1478,7 @@
14781478
#define ECOBITS_PPGTT_CACHE4B (0 << 8)
14791479

14801480
#define GEN12_RCU_MODE _MMIO(0x14800)
1481+
#define XEHP_RCU_MODE_FIXED_SLICE_CCS_MODE REG_BIT(1)
14811482
#define GEN12_RCU_MODE_CCS_ENABLE REG_BIT(0)
14821483

14831484
#define CHV_FUSE_GT _MMIO(VLV_GUNIT_BASE + 0x2168)

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

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@
5151
* registers belonging to BCS, VCS or VECS should be implemented in
5252
* xcs_engine_wa_init(). Workarounds for registers not belonging to a specific
5353
* engine's MMIO range but that are part of of the common RCS/CCS reset domain
54-
* should be implemented in general_render_compute_wa_init().
54+
* should be implemented in general_render_compute_wa_init(). The settings
55+
* about the CCS load balancing should be added in ccs_engine_wa_mode().
5556
*
5657
* - GT workarounds: the list of these WAs is applied whenever these registers
5758
* revert to their default values: on GPU reset, suspend/resume [1]_, etc.
@@ -2853,6 +2854,22 @@ add_render_compute_tuning_settings(struct intel_gt *gt,
28532854
wa_write_clr(wal, GEN8_GARBCNTL, GEN12_BUS_HASH_CTL_BIT_EXC);
28542855
}
28552856

2857+
static void ccs_engine_wa_mode(struct intel_engine_cs *engine, struct i915_wa_list *wal)
2858+
{
2859+
struct intel_gt *gt = engine->gt;
2860+
2861+
if (!IS_DG2(gt->i915))
2862+
return;
2863+
2864+
/*
2865+
* Wa_14019159160: This workaround, along with others, leads to
2866+
* significant challenges in utilizing load balancing among the
2867+
* CCS slices. Consequently, an architectural decision has been
2868+
* made to completely disable automatic CCS load balancing.
2869+
*/
2870+
wa_masked_en(wal, GEN12_RCU_MODE, XEHP_RCU_MODE_FIXED_SLICE_CCS_MODE);
2871+
}
2872+
28562873
/*
28572874
* The workarounds in this function apply to shared registers in
28582875
* the general render reset domain that aren't tied to a
@@ -3003,8 +3020,10 @@ engine_init_workarounds(struct intel_engine_cs *engine, struct i915_wa_list *wal
30033020
* to a single RCS/CCS engine's workaround list since
30043021
* they're reset as part of the general render domain reset.
30053022
*/
3006-
if (engine->flags & I915_ENGINE_FIRST_RENDER_COMPUTE)
3023+
if (engine->flags & I915_ENGINE_FIRST_RENDER_COMPUTE) {
30073024
general_render_compute_wa_init(engine, wal);
3025+
ccs_engine_wa_mode(engine, wal);
3026+
}
30083027

30093028
if (engine->class == COMPUTE_CLASS)
30103029
ccs_engine_wa_init(engine, wal);

0 commit comments

Comments
 (0)