Skip to content

Commit bc9a1ec

Browse files
Andi Shytirodrigovivi
authored andcommitted
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] (cherry picked from commit f5d2904) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 94bf3e6 commit bc9a1ec

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
@@ -1477,6 +1477,7 @@
14771477
#define ECOBITS_PPGTT_CACHE4B (0 << 8)
14781478

14791479
#define GEN12_RCU_MODE _MMIO(0x14800)
1480+
#define XEHP_RCU_MODE_FIXED_SLICE_CCS_MODE REG_BIT(1)
14801481
#define GEN12_RCU_MODE_CCS_ENABLE REG_BIT(0)
14811482

14821483
#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.
@@ -2854,6 +2855,22 @@ add_render_compute_tuning_settings(struct intel_gt *gt,
28542855
wa_write_clr(wal, GEN8_GARBCNTL, GEN12_BUS_HASH_CTL_BIT_EXC);
28552856
}
28562857

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

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

0 commit comments

Comments
 (0)