Recent BDW workarounds
Subsystems (2)
cover Recent BDW workarounds
These workarounds are mainly for D/E/F steppings.
I didn't squash them, because we can eventually get rid of some of them.
Michel Thierry (8):
drm/i915: Add WaDisableFenceDestinationToSLM:bdw drm/i915: Add WaProgramL3SqcReg1Default:bdw drm/i915: Add WaDisableFfDopClockGating:bdw drm/i915: Add WaFlushCoherentL3CacheLinesAtContextSwitch:bdw drm/i915: Add WaHdcDisableFetchWhenMasked:bdw drm/i915: Add WaIncreaseTagClockTimer:bdw drm/i915: Add WaDisableInstructionShootdown:bdw drm/i915: Add WaDisableLSQCROPERFforOCL:bdw
drivers/gpu/drm/i915/i915_reg.h | 16 ++++++++++++++++ drivers/gpu/drm/i915/intel_pm.c | 30 +++++++++++++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-)
Signature · 1 line
1.9.0
PATCH 1/8 drm/i915: Add WaDisableFenceDestinationToSLM:bdw
HDC_CHICKEN0 bit 14 (Fence Destination To SLM Disable) must be programmed by software to 1h (Disable) to work around a LSLM unit issue.
WaDisableFenceDestinationToSLM is only needed for BDW E,F step.
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -4701,6 +4701,7 @@ enum punit_power_well {/* GEN8 chicken */ #define HDC_CHICKEN0 0x7300 +#define HDC_FENCE_DESTINATION_TO_SLM_DISABLE (1<<14)#define HDC_FORCE_NON_COHERENT (1<<4)/* WaCatErrorRejectionIssue */
drivers/gpu/drm/i915/intel_pm.c +2 -0
@@ -5449,9 +5449,11 @@ static void gen8_init_clock_gating(struct drm_device *dev)/* Use Force Non-Coherent whenever executing a 3D context. This is a * workaround for for a possible hang in the unlikely event a TLB * invalidation occurs during a PSD flush. +* WaDisableFenceDestinationToSLM:bdw */ I915_WRITE (HDC_CHICKEN0 ,I915_READ (HDC_CHICKEN0 ) | +_MASKED_BIT_ENABLE (HDC_FENCE_DESTINATION_TO_SLM_DISABLE ) |_MASKED_BIT_ENABLE (HDC_FORCE_NON_COHERENT ));/* WaVSRefCountFullforceMissDisable:bdw */
Signature · 1 line
1.9.0
PATCH 2/8 drm/i915: Add WaProgramL3SqcReg1Default:bdw
In reply to Michel ThierryFor performance, program the default initial value of L3SqcReg1 on BDW to 0x784000:
L3SQ High Priority Credit Initialization = 2 (00001b). L3SQ General Priority Credit Initialization = 30 (01111b).
--- drivers/gpu/drm/i915/i915_reg.h | 4 ++++ drivers/gpu/drm/i915/intel_pm.c | 3 +++ 2 files changed, 7 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
@@ -4704,6 +4704,10 @@ enum punit_power_well {#define HDC_FENCE_DESTINATION_TO_SLM_DISABLE (1<<14)#define HDC_FORCE_NON_COHERENT (1<<4) +/* WaProgramL3SqcReg1Default */ +#define GEN8_L3SQCREG1 0xb100 +#define GEN8_L3SQCREG1_DEFAULT_VALUE 0x784000 +/* WaCatErrorRejectionIssue */ #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030#define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11)
drivers/gpu/drm/i915/intel_pm.c +3 -0
@@ -5483,6 +5483,9 @@ static void gen8_init_clock_gating(struct drm_device *dev)/* Wa4x4STCOptimizationDisable:bdw */ I915_WRITE (CACHE_MODE_1 ,_MASKED_BIT_ENABLE (GEN8_4x4_STC_OPTIMIZATION_DISABLE)); + +/* WaProgramL3SqcReg1Default:bdw */ +I915_WRITE (GEN8_L3SQCREG1 ,GEN8_L3SQCREG1_DEFAULT_VALUE ); }static void haswell_init_clock_gating (struct drm_device *dev)
Signature · 1 line
1.9.0
PATCH 3/8 drm/i915: Add WaDisableFfDopClockGating:bdw
In reply to Michel ThierryDisable FF DOP clock gating.
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 2 files changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -5600,6 +5600,7 @@ enum punit_power_well {#define GEN6_RC7 4#define GEN7_MISCCPCTL (0x9424) +#define GEN8_DOP_CLOCK_GATE_CFCLK_ENABLE (1<<2)#define GEN7_DOP_CLOCK_GATE_ENABLE (1<<0)/* IVYBRIDGE DPF */
drivers/gpu/drm/i915/intel_pm.c +4 -0
@@ -5486,6 +5486,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)/* WaProgramL3SqcReg1Default:bdw */ I915_WRITE (GEN8_L3SQCREG1 ,GEN8_L3SQCREG1_DEFAULT_VALUE ); + +/* WaDisableFfDopClockGating:bdw */ +I915_WRITE (GEN7_MISCCPCTL ,I915_READ (GEN7_MISCCPCTL ) & + ~GEN8_DOP_CLOCK_GATE_CFCLK_ENABLE ); }static void haswell_init_clock_gating (struct drm_device *dev)
Signature · 1 line
1.9.0
PATCH 4/8 drm/i915: Add WaFlushCoherentL3CacheLinesAtContextSwitch:bdw
In reply to Michel ThierryCoherent L3 cache lines are not getting flushed during context switch which is causing issues.
--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 2 files changed, 7 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -4708,6 +4708,9 @@ enum punit_power_well {#define GEN8_L3SQCREG1 0xb100#define GEN8_L3SQCREG1_DEFAULT_VALUE 0x784000 +#define GEN8_L3SQCREG4 0xb118 +#define GEN8_PIPELINE_FLUSH_COHERENT_LINES (1<<21) +/* WaCatErrorRejectionIssue */ #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030#define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11)
drivers/gpu/drm/i915/intel_pm.c +4 -0
@@ -5490,6 +5490,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)/* WaDisableFfDopClockGating:bdw */ I915_WRITE (GEN7_MISCCPCTL ,I915_READ (GEN7_MISCCPCTL ) & ~GEN8_DOP_CLOCK_GATE_CFCLK_ENABLE ); + +/* WaFlushCoherentL3CacheLinesAtContextSwitch:bdw */ +I915_WRITE (GEN8_L3SQCREG4 ,I915_READ (GEN8_L3SQCREG4 ) | +GEN8_PIPELINE_FLUSH_COHERENT_LINES ); }static void haswell_init_clock_gating (struct drm_device *dev)
Signature · 1 line
1.9.0
PATCH 5/8 drm/i915: Add WaHdcDisableFetchWhenMasked:bdw
In reply to Michel ThierrySet desired default value for HDCCHICKEN register for BDW platform.
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -4702,6 +4702,7 @@ enum punit_power_well {/* GEN8 chicken */ #define HDC_CHICKEN0 0x7300#define HDC_FENCE_DESTINATION_TO_SLM_DISABLE (1<<14) +#define HDC_DONOT_FETCH_MEM_WHEN_MASKED (1<<11)#define HDC_FORCE_NON_COHERENT (1<<4)/* WaProgramL3SqcReg1Default */
drivers/gpu/drm/i915/intel_pm.c +2 -0
@@ -5450,10 +5450,12 @@ static void gen8_init_clock_gating(struct drm_device *dev)* workaround for for a possible hang in the unlikely event a TLB * invalidation occurs during a PSD flush. * WaDisableFenceDestinationToSLM:bdw +* WaHdcDisableFetchWhenMasked:bdw */ I915_WRITE (HDC_CHICKEN0 ,I915_READ (HDC_CHICKEN0 ) |_MASKED_BIT_ENABLE (HDC_FENCE_DESTINATION_TO_SLM_DISABLE ) | +_MASKED_BIT_ENABLE (HDC_DONOT_FETCH_MEM_WHEN_MASKED ) |_MASKED_BIT_ENABLE (HDC_FORCE_NON_COHERENT ));/* WaVSRefCountFullforceMissDisable:bdw */
Signature · 1 line
1.9.0
PATCH 6/8 drm/i915: Add WaIncreaseTagClockTimer:bdw
In reply to Michel ThierryWorkaround requires programing L3 tag clock timing register.
--- drivers/gpu/drm/i915/i915_reg.h | 4 ++++ drivers/gpu/drm/i915/intel_pm.c | 9 +++++++++ 2 files changed, 13 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
@@ -4709,6 +4709,10 @@ enum punit_power_well {#define GEN8_L3SQCREG1 0xb100#define GEN8_L3SQCREG1_DEFAULT_VALUE 0x784000 +#define GEN8_L3CNTLREG1 0xb10c +#define GEN8_TAG_CLK_OFFTIME (1<<23) +#define GEN8_TAG_CLK_OFFTIME_MASK (~((1<<23) | (1<<22) | (1<<21) | (1<<20))) +#define GEN8_L3SQCREG4 0xb118#define GEN8_PIPELINE_FLUSH_COHERENT_LINES (1<<21)
drivers/gpu/drm/i915/intel_pm.c +9 -0
@@ -5496,6 +5496,15 @@ static void gen8_init_clock_gating(struct drm_device *dev)/* WaFlushCoherentL3CacheLinesAtContextSwitch:bdw */ I915_WRITE (GEN8_L3SQCREG4 ,I915_READ (GEN8_L3SQCREG4 ) |GEN8_PIPELINE_FLUSH_COHERENT_LINES ); + +/* +* WaIncreaseTagClockTimer:bdw +* This register is not masked and the default value is not all zero. +* Use the mask with and to clear out bits 23:20. +*/ +I915_WRITE (GEN8_L3CNTLREG1 , (I915_READ (GEN8_L3CNTLREG1 ) & +GEN8_TAG_CLK_OFFTIME_MASK ) | +GEN8_TAG_CLK_OFFTIME ); }static void haswell_init_clock_gating (struct drm_device *dev)
Signature · 1 line
1.9.0
PATCH 7/8 drm/i915: Add WaDisableInstructionShootdown:bdw
In reply to Michel ThierryInstruction Shootdown in ROW_CHICKEN must be disabled.
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -5637,6 +5637,7 @@ enum punit_power_well {#define GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE (1<<3)#define GEN8_ROW_CHICKEN 0xe4f0 +#define INSTRUCTION_SHOOTDOWN_DISABLE (1<<9)#define PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE (1<<8)#define STALL_DOP_GATING_DISABLE (1<<5)
drivers/gpu/drm/i915/intel_pm.c +3 -1
@@ -5405,8 +5405,10 @@ static void gen8_init_clock_gating(struct drm_device *dev) _MASKED_BIT_ENABLE(PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE));/* WaDisableThreadStallDopClockGating:bdw */ -/* FIXME: Unclear whether we really need this on production bdw. */ +/* WaDisableInstructionShootdown:bdw */ +/* FIXME: Unclear whether we really need these on production bdw. */ I915_WRITE (GEN8_ROW_CHICKEN , +_MASKED_BIT_ENABLE (INSTRUCTION_SHOOTDOWN_DISABLE ) |_MASKED_BIT_ENABLE (STALL_DOP_GATING_DISABLE ));/*
Signature · 1 line
1.9.0
PATCH 8/8 drm/i915: Add WaDisableLSQCROPERFforOCL:bdw
In reply to Michel ThierryL3SQCREG4 LQSC RO PERF DIS must be programmed by software to 1h (Disable) to work around a Gsync Issue in HDC.
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 2 ++ 2 files changed, 3 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -4714,6 +4714,7 @@ enum punit_power_well {#define GEN8_TAG_CLK_OFFTIME_MASK (~((1<<23) | (1<<22) | (1<<21) | (1<<20)))#define GEN8_L3SQCREG4 0xb118 +#define GEN8_L3SQCREG4_LQSC_RO_PERF_DISABLE (1<<27)#define GEN8_PIPELINE_FLUSH_COHERENT_LINES (1<<21)/* WaCatErrorRejectionIssue */
drivers/gpu/drm/i915/intel_pm.c +2 -0
@@ -5495,8 +5495,10 @@ static void gen8_init_clock_gating(struct drm_device *dev)I915_WRITE (GEN7_MISCCPCTL ,I915_READ (GEN7_MISCCPCTL ) & ~GEN8_DOP_CLOCK_GATE_CFCLK_ENABLE ); +/* WaDisableLSQCROPERFforOCL:bdw */ /* WaFlushCoherentL3CacheLinesAtContextSwitch:bdw */ I915_WRITE (GEN8_L3SQCREG4 ,I915_READ (GEN8_L3SQCREG4 ) | +GEN8_L3SQCREG4_LQSC_RO_PERF_DISABLE |GEN8_PIPELINE_FLUSH_COHERENT_LINES );/*
Signature · 1 line
1.9.0