Skip to content

Commit 4d487cf

Browse files
vsyrjaladanvet
authored andcommitted
drm/i915: Move WaProgramL3SqcReg1Default:bdw to init_clock_gating()
GEN8_L3SQCREG1 isn't saved in the context (verified by going through a context dump), and so we shouldn't be using the ring w/a code to initialize it. Also Bspec explicitly talks about MMIO and writing it with the CPU. Additionally there's another w/a WaTempDisableDOPClkGating:bdw which tells us to disable DOP clock gating around the GEN8_L3SQCREG1 write to make sure everyone notices the change. So let's do that as well. Cc: Rodrigo Vivi <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Reviewed-by: Jesse Barnes <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent 7ad0dba commit 4d487cf

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6174,6 +6174,7 @@ static void broadwell_init_clock_gating(struct drm_device *dev)
61746174
{
61756175
struct drm_i915_private *dev_priv = dev->dev_private;
61766176
enum pipe pipe;
6177+
uint32_t misccpctl;
61776178

61786179
ilk_init_lp_watermarks(dev);
61796180

@@ -6204,6 +6205,15 @@ static void broadwell_init_clock_gating(struct drm_device *dev)
62046205
I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
62056206
GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
62066207

6208+
/*
6209+
* WaProgramL3SqcReg1Default:bdw
6210+
* WaTempDisableDOPClkGating:bdw
6211+
*/
6212+
misccpctl = I915_READ(GEN7_MISCCPCTL);
6213+
I915_WRITE(GEN7_MISCCPCTL, misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE);
6214+
I915_WRITE(GEN8_L3SQCREG1, BDW_WA_L3SQCREG1_DEFAULT);
6215+
I915_WRITE(GEN7_MISCCPCTL, misccpctl);
6216+
62076217
lpt_init_clock_gating(dev);
62086218
}
62096219

drivers/gpu/drm/i915/intel_ringbuffer.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,9 +853,6 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)
853853
GEN6_WIZ_HASHING_MASK,
854854
GEN6_WIZ_HASHING_16x4);
855855

856-
/* WaProgramL3SqcReg1Default:bdw */
857-
WA_WRITE(GEN8_L3SQCREG1, BDW_WA_L3SQCREG1_DEFAULT);
858-
859856
return 0;
860857
}
861858

0 commit comments

Comments
 (0)