Skip to content

Commit eacf210

Browse files
icklejlahtine-intel
authored andcommitted
drm/i915/gt: Move ilk GT workarounds from init_clock_gating to workarounds
Rescue the GT workarounds from being buried inside init_clock_gating so that we remember to apply them after a GT reset, and that they are included in our verification that the workarounds are applied. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Mika Kuoppala <[email protected]> Cc: [email protected] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 806a45c) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent fd2599b commit eacf210

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,18 @@ int intel_engine_emit_ctx_wa(struct i915_request *rq)
692692
return 0;
693693
}
694694

695+
static void
696+
ilk_gt_workarounds_init(struct drm_i915_private *i915, struct i915_wa_list *wal)
697+
{
698+
wa_masked_en(wal, _3D_CHICKEN2, _3D_CHICKEN2_WM_READ_PIPELINED);
699+
700+
/* WaDisableRenderCachePipelinedFlush:ilk */
701+
wa_masked_en(wal, CACHE_MODE_0, CM0_PIPELINED_RENDER_FLUSH_DISABLE);
702+
703+
/* WaDisable_RenderCache_OperationalFlush:ilk */
704+
wa_masked_dis(wal, CACHE_MODE_0, RC_OP_FLUSH_ENABLE);
705+
}
706+
695707
static void
696708
snb_gt_workarounds_init(struct drm_i915_private *i915, struct i915_wa_list *wal)
697709
{
@@ -1173,6 +1185,8 @@ gt_init_workarounds(struct drm_i915_private *i915, struct i915_wa_list *wal)
11731185
ivb_gt_workarounds_init(i915, wal);
11741186
else if (IS_GEN(i915, 6))
11751187
snb_gt_workarounds_init(i915, wal);
1188+
else if (IS_GEN(i915, 5))
1189+
ilk_gt_workarounds_init(i915, wal);
11761190
else if (INTEL_GEN(i915) <= 8)
11771191
return;
11781192
else

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6830,16 +6830,6 @@ static void ilk_init_clock_gating(struct drm_i915_private *dev_priv)
68306830
I915_WRITE(ILK_DISPLAY_CHICKEN2,
68316831
I915_READ(ILK_DISPLAY_CHICKEN2) |
68326832
ILK_ELPIN_409_SELECT);
6833-
I915_WRITE(_3D_CHICKEN2,
6834-
_3D_CHICKEN2_WM_READ_PIPELINED << 16 |
6835-
_3D_CHICKEN2_WM_READ_PIPELINED);
6836-
6837-
/* WaDisableRenderCachePipelinedFlush:ilk */
6838-
I915_WRITE(CACHE_MODE_0,
6839-
_MASKED_BIT_ENABLE(CM0_PIPELINED_RENDER_FLUSH_DISABLE));
6840-
6841-
/* WaDisable_RenderCache_OperationalFlush:ilk */
6842-
I915_WRITE(CACHE_MODE_0, _MASKED_BIT_DISABLE(RC_OP_FLUSH_ENABLE));
68436833

68446834
g4x_disable_trickle_feed(dev_priv);
68456835

0 commit comments

Comments
 (0)