Skip to contentSkip to conversation

drm/i915/icl: Introduce initial Icelake Workarounds

PATCH In review Oscar Mateo 3 participants 27 messages Apr 6, 2018 – Apr 9, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/22 drm/i915/icl: Introduce initial Icelake Workarounds

Inherit workarounds from previous platforms that are still valid for Icelake.

v2: GEN7_ROW_CHICKEN2 is masked
v3:
- Since it has been fixed already in upstream, removed the TODO comment about WA_SET_BIT for WaInPlaceDecompressionHang.
- Squashed with this patch:
drm/i915/icl: add icelake_init_clock_gating()
from Paulo Zanoni <[email protected]>
- Squashed with this patch:
drm/i915/icl: WaForceEnableNonCoherent
from Oscar Mateo <[email protected]>
- WaPushConstantDereferenceHoldDisable is now Wa_1604370585 and applies to B0 as well.
- WaPipeControlBefore3DStateSamplePattern WABB was being applied to ICL incorrectly.
v4:
- Wrap the commit message
- s/dev_priv/p to please checkpatch

Cc Tomasz Lis <[email protected]>
Cc Mika Kuoppala <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.h        |  9 +++++++++
 drivers/gpu/drm/i915/i915_gem_gtt.c    |  4 ++--
 drivers/gpu/drm/i915/i915_reg.h        |  1 +
 drivers/gpu/drm/i915/intel_engine_cs.c | 25 +++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_lrc.c       |  2 ++
 drivers/gpu/drm/i915/intel_pm.c        | 19 ++++++++++++++++++-
 6 files changed, 57 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +9 -0
index 5373b17..1a4801e 100644
@@ -2458,6 +2458,15 @@ static inline unsigned int i915_sg_segment_size(void)
 #define IS_CNL_REVID(p, since, until) \
 	(IS_CANNONLAKE(p) && IS_REVID(p, since, until))
 
+#define ICL_REVID_A0		0x0
+#define ICL_REVID_A2		0x1
+#define ICL_REVID_B0		0x3
+#define ICL_REVID_B2		0x4
+#define ICL_REVID_C0		0x5
+
+#define IS_ICL_REVID(p, since, until) \
+	(IS_ICELAKE(p) && IS_REVID(p, since, until))
+
 /*
  * The genX designation typically refers to the render engine, so render
  * capability related checks should use IS_GEN, while display and other checks
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -2
index 21d72f6..221b873 100644
@@ -2140,12 +2140,12 @@ static void gtt_write_workarounds(struct drm_i915_private *dev_priv)
 	 * called on driver load and after a GPU reset, so you can place
 	 * workarounds here even if they get overwritten by GPU reset.
 	 */
-	/* WaIncreaseDefaultTLBEntries:chv,bdw,skl,bxt,kbl,glk,cfl,cnl */
+	/* WaIncreaseDefaultTLBEntries:chv,bdw,skl,bxt,kbl,glk,cfl,cnl,icl */
 	if (IS_BROADWELL(dev_priv))
 		I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW);
 	else if (IS_CHERRYVIEW(dev_priv))
 		I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_CHV);
-	else if (IS_GEN9_BC(dev_priv) || IS_GEN10(dev_priv))
+	else if (IS_GEN9_BC(dev_priv) || IS_GEN10(dev_priv) || IS_GEN11(dev_priv))
 		I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_SKL);
 	else if (IS_GEN9_LP(dev_priv))
 		I915_WRITE(GEN8_L3_LRA_1_GPGPU, GEN9_L3_LRA_1_GPGPU_DEFAULT_VALUE_BXT);
drivers/gpu/drm/i915/i915_reg.h +1 -0
index 176dca6..6cd2f2a 100644
@@ -7184,6 +7184,7 @@ enum {
 /* GEN8 chicken */
 #define HDC_CHICKEN0				_MMIO(0x7300)
 #define CNL_HDC_CHICKEN0			_MMIO(0xE5F0)
+#define ICL_HDC_CHICKEN0			_MMIO(0xE5F4)
 #define  HDC_FORCE_CSR_NON_COHERENT_OVR_DISABLE	(1<<15)
 #define  HDC_FENCE_DEST_SLM_DISABLE		(1<<14)
 #define  HDC_DONOT_FETCH_MEM_WHEN_MASKED	(1<<11)
drivers/gpu/drm/i915/intel_engine_cs.c +25 -0
index 12486d8..ba8c137 100644
@@ -1467,6 +1467,29 @@ static int cfl_init_workarounds(struct intel_engine_cs *engine)
 	return 0;
 }
 
+static int icl_init_workarounds(struct intel_engine_cs *engine)
+{
+	struct drm_i915_private *dev_priv = engine->i915;
+
+	/* Wa_1604370585:icl (pre-prod)
+	 * Formerly known as WaPushConstantDereferenceHoldDisable
+	 */
+	if (IS_ICL_REVID(dev_priv, ICL_REVID_A0, ICL_REVID_B0))
+		WA_SET_BIT_MASKED(GEN7_ROW_CHICKEN2,
+				  PUSH_CONSTANT_DEREF_DISABLE);
+
+	/* WaForceEnableNonCoherent:icl
+	 * This is not the same workaround as in early Gen9 platforms, where
+	 * lacking this could cause system hangs, but coherency performance
+	 * overhead is high and only a few compute workloads really need it
+	 * (the register is whitelisted in hardware now, so UMDs can opt in
+	 * for coherency if they have a good reason).
+	 */
+	WA_SET_BIT_MASKED(ICL_HDC_CHICKEN0, HDC_FORCE_NON_COHERENT);
+
+	return 0;
+}
+
 int init_workarounds_ring(struct intel_engine_cs *engine)
 {
 	struct drm_i915_private *dev_priv = engine->i915;
@@ -1494,6 +1517,8 @@ int init_workarounds_ring(struct intel_engine_cs *engine)
 		err = cfl_init_workarounds(engine);
 	else if (IS_CANNONLAKE(dev_priv))
 		err = cnl_init_workarounds(engine);
+	else if (IS_ICELAKE(dev_priv))
+		err = icl_init_workarounds(engine);
 	else
 		err = 0;
 	if (err)
drivers/gpu/drm/i915/intel_lrc.c +2 -0
index f60b61b..6ec4abf 100644
@@ -1573,6 +1573,8 @@ static int intel_init_workaround_bb(struct intel_engine_cs *engine)
 		return -EINVAL;
 
 	switch (INTEL_GEN(engine->i915)) {
+	case 11:
+		return 0;
 	case 10:
 		wa_bb_fn[0] = gen10_init_indirectctx_bb;
 		wa_bb_fn[1] = NULL;
drivers/gpu/drm/i915/intel_pm.c +18 -1
index 19e82aa..4f4c7ae 100644
@@ -8499,6 +8499,21 @@ static void cnp_init_clock_gating(struct drm_i915_private *dev_priv)
 		   CNP_PWM_CGE_GATING_DISABLE);
 }
 
+static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
+{
+	/* This is not an Wa. Enable for better image quality */
+	I915_WRITE(_3D_CHICKEN3,
+		   _MASKED_BIT_ENABLE(_3D_CHICKEN3_AA_LINE_QUALITY_FIX_ENABLE));
+
+	/* WaInPlaceDecompressionHang:icl */
+	I915_WRITE(GEN9_GAMT_ECO_REG_RW_IA, (I915_READ(GEN9_GAMT_ECO_REG_RW_IA) |
+					     GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS));
+
+	/* WaPipelineFlushCoherentLines:icl */
+	I915_WRITE(GEN8_L3SQCREG4, (I915_READ(GEN8_L3SQCREG4) |
+				    GEN8_LQSC_FLUSH_COHERENT_LINES));
+}
+
 static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
 {
 	u32 val;
@@ -9015,7 +9030,9 @@ static void nop_init_clock_gating(struct drm_i915_private *dev_priv)
  */
 void intel_init_clock_gating_hooks(struct drm_i915_private *dev_priv)
 {
-	if (IS_CANNONLAKE(dev_priv))
+	if (IS_ICELAKE(dev_priv))
+		dev_priv->display.init_clock_gating = icl_init_clock_gating;
+	else if (IS_CANNONLAKE(dev_priv))
 		dev_priv->display.init_clock_gating = cnl_init_clock_gating;
 	else if (IS_COFFEELAKE(dev_priv))
 		dev_priv->display.init_clock_gating = cfl_init_clock_gating;
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/22 drm/i915/icl: WaGAPZPriorityScheme

The default GAPZ arbitrer priority value at power-on has been found to be incorrect.

v2: Now renamed to Wa_1405543622

---
 drivers/gpu/drm/i915/i915_reg.h | 5 +++--
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 2 files changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +3 -2
index 6cd2f2a..cd5da2b 100644
@@ -8196,8 +8196,9 @@ enum {
 #define   GEN8_DOP_CLOCK_GATE_GUC_ENABLE	(1<<4)
 #define   GEN8_DOP_CLOCK_GATE_MEDIA_ENABLE     (1<<6)
 
-#define GEN8_GARBCNTL                   _MMIO(0xB004)
-#define   GEN9_GAPS_TSV_CREDIT_DISABLE  (1<<7)
+#define GEN8_GARBCNTL				_MMIO(0xB004)
+#define   GEN9_GAPS_TSV_CREDIT_DISABLE		(1 << 7)
+#define   GEN11_ARBITRATION_PRIO_ORDER_MASK	(0x3f << 22)
 
 /* IVYBRIDGE DPF */
 #define GEN7_L3CDERRST1(slice)		_MMIO(0xB008 + (slice) * 0x200) /* L3CD Error Status 1 */
drivers/gpu/drm/i915/intel_pm.c +6 -0
index 4f4c7ae..d1b98ae 100644
@@ -8512,6 +8512,12 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	/* WaPipelineFlushCoherentLines:icl */
 	I915_WRITE(GEN8_L3SQCREG4, (I915_READ(GEN8_L3SQCREG4) |
 				    GEN8_LQSC_FLUSH_COHERENT_LINES));
+
+	/* Wa_1405543622:icl
+	 * Formerly known as WaGAPZPriorityScheme
+	 */
+	I915_WRITE(GEN8_GARBCNTL, (I915_READ(GEN8_GARBCNTL) |
+				   GEN11_ARBITRATION_PRIO_ORDER_MASK));
 }
 
 static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH 3/22 drm/i915/icl: WaModifyGamTlbPartitioning

In reply to Oscar Mateo

Adjust default GAM TLB partitioning for performance reasons.

v2: Only touch the bits that we really need

---
 drivers/gpu/drm/i915/i915_reg.h | 5 +++++
 drivers/gpu/drm/i915/intel_pm.c | 5 +++++
 2 files changed, 10 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +5 -0
index cd5da2b..78abb49 100644
@@ -8200,6 +8200,11 @@ enum {
 #define   GEN9_GAPS_TSV_CREDIT_DISABLE		(1 << 7)
 #define   GEN11_ARBITRATION_PRIO_ORDER_MASK	(0x3f << 22)
 
+#define GEN11_GACB_PERF_CTRL			_MMIO(0x4B80)
+#define   GEN11_HASH_CTRL_MASK			(0x3 << 12 | 0xf << 0)
+#define   GEN11_HASH_CTRL_BIT0			(1 << 0)
+#define   GEN11_HASH_CTRL_BIT4			(1 << 12)
+
 /* IVYBRIDGE DPF */
 #define GEN7_L3CDERRST1(slice)		_MMIO(0xB008 + (slice) * 0x200) /* L3CD Error Status 1 */
 #define   GEN7_L3CDERRST1_ROW_MASK	(0x7ff<<14)
drivers/gpu/drm/i915/intel_pm.c +5 -0
index d1b98ae..03c5de3 100644
@@ -8518,6 +8518,11 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	 */
 	I915_WRITE(GEN8_GARBCNTL, (I915_READ(GEN8_GARBCNTL) |
 				   GEN11_ARBITRATION_PRIO_ORDER_MASK));
+
+	/* WaModifyGamTlbPartitioning:icl */
+	I915_WRITE(GEN11_GACB_PERF_CTRL,
+		   ((I915_READ(GEN11_GACB_PERF_CTRL) & ~GEN11_HASH_CTRL_MASK) |
+		    GEN11_HASH_CTRL_BIT0 | GEN11_HASH_CTRL_BIT4));
 }
 
 static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

PATCH 4/22 drm/i915/icl: WaL3BankAddressHashing

In reply to Oscar Mateo

Revert to an L3 non-hash model, for performance reasons.

v2:
- Place the WA name above the actual change
- Improve the register naming
v3:
- Rebased
- Renamed to Wa_1604223664

---
 drivers/gpu/drm/i915/i915_reg.h |  6 ++++++
 drivers/gpu/drm/i915/intel_pm.c | 20 ++++++++++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +6 -0
index 78abb49..10ed35f 100644
@@ -8199,6 +8199,12 @@ enum {
 #define GEN8_GARBCNTL				_MMIO(0xB004)
 #define   GEN9_GAPS_TSV_CREDIT_DISABLE		(1 << 7)
 #define   GEN11_ARBITRATION_PRIO_ORDER_MASK	(0x3f << 22)
+#define   GEN11_HASH_CTRL_EXCL_MASK		(0x7f << 0)
+#define   GEN11_HASH_CTRL_EXCL_BIT0		(1 << 0)
+
+#define GEN11_GLBLINVL				_MMIO(0xB404)
+#define   GEN11_BANK_HASH_ADDR_EXCL_BIT0	(1 << 0)
+#define   GEN11_BANK_HASH_ADDR_EXCL_MASK	(0x3f << 5)
 
 #define GEN11_GACB_PERF_CTRL			_MMIO(0x4B80)
 #define   GEN11_HASH_CTRL_MASK			(0x3 << 12 | 0xf << 0)
drivers/gpu/drm/i915/intel_pm.c +16 -4
index 03c5de3..58974fa 100644
@@ -8513,11 +8513,23 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	I915_WRITE(GEN8_L3SQCREG4, (I915_READ(GEN8_L3SQCREG4) |
 				    GEN8_LQSC_FLUSH_COHERENT_LINES));
 
-	/* Wa_1405543622:icl
-	 * Formerly known as WaGAPZPriorityScheme
+	I915_WRITE(GEN8_GARBCNTL,
+		   /* Wa_1604223664:icl
+		    * Formerly known as WaL3BankAddressHashing
+		    */
+		   ((I915_READ(GEN8_GARBCNTL) & ~GEN11_HASH_CTRL_EXCL_MASK) |
+		    GEN11_HASH_CTRL_EXCL_BIT0 |
+		    /* Wa_1405543622:icl
+		     * Formerly known as WaGAPZPriorityScheme
+		     */
+		    GEN11_ARBITRATION_PRIO_ORDER_MASK));
+
+	/* Wa_1604223664:icl
+	 * Formerly known as WaL3BankAddressHashing
 	 */
-	I915_WRITE(GEN8_GARBCNTL, (I915_READ(GEN8_GARBCNTL) |
-				   GEN11_ARBITRATION_PRIO_ORDER_MASK));
+	I915_WRITE(GEN11_GLBLINVL,
+		   ((I915_READ(GEN11_GLBLINVL) & ~GEN11_BANK_HASH_ADDR_EXCL_MASK) |
+		    GEN11_BANK_HASH_ADDR_EXCL_BIT0));
 
 	/* WaModifyGamTlbPartitioning:icl */
 	I915_WRITE(GEN11_GACB_PERF_CTRL,
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

PATCH 5/22 drm/i915/icl: WaDisableCleanEvicts

In reply to Oscar Mateo

Avoids an undefined LLC behavior.

BSpec: 9613

v2: Renamed to Wa_1405733216
v3: Spaces around '<<' and fix surrounding code

---
 drivers/gpu/drm/i915/i915_reg.h | 5 +++--
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 2 files changed, 9 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +3 -2
index 10ed35f..699135b 100644
@@ -7178,8 +7178,9 @@ enum {
 #define  L3SQ_URB_READ_CAM_MATCH_DISABLE	(1<<27)
 
 #define GEN8_L3SQCREG4				_MMIO(0xb118)
-#define  GEN8_LQSC_RO_PERF_DIS			(1<<27)
-#define  GEN8_LQSC_FLUSH_COHERENT_LINES		(1<<21)
+#define  GEN11_LQSC_CLEAN_EVICT_DISABLE		(1 << 6)
+#define  GEN8_LQSC_RO_PERF_DIS			(1 << 27)
+#define  GEN8_LQSC_FLUSH_COHERENT_LINES		(1 << 21)
 
 /* GEN8 chicken */
 #define HDC_CHICKEN0				_MMIO(0x7300)
drivers/gpu/drm/i915/intel_pm.c +6 -0
index 58974fa..84d9910 100644
@@ -8513,6 +8513,12 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	I915_WRITE(GEN8_L3SQCREG4, (I915_READ(GEN8_L3SQCREG4) |
 				    GEN8_LQSC_FLUSH_COHERENT_LINES));
 
+	/* Wa_1405733216:icl
+	 * Formerly known as WaDisableCleanEvicts
+	 */
+	I915_WRITE(GEN8_L3SQCREG4, (I915_READ(GEN8_L3SQCREG4) |
+				    GEN11_LQSC_CLEAN_EVICT_DISABLE));
+
 	I915_WRITE(GEN8_GARBCNTL,
 		   /* Wa_1604223664:icl
 		    * Formerly known as WaL3BankAddressHashing
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

PATCH 6/22 drm/i915/icl: WaDisableImprovedTdlClkGating

In reply to Oscar Mateo

Revert to the legacy implementation.

v2: GEN7_ROW_CHICKEN2 is masked
v3:
- Rebased
- Renamed to Wa_2006611047
- A0 and B0 only
v4:
- Add spaces around '<<' (and fix the surrounding code as well)
- Mark the WA as pre-prod

---
 drivers/gpu/drm/i915/i915_reg.h        | 5 +++--
 drivers/gpu/drm/i915/intel_engine_cs.c | 7 +++++++
 2 files changed, 10 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +3 -2
index 699135b..67664d0 100644
@@ -8249,8 +8249,9 @@ enum {
 
 #define GEN7_ROW_CHICKEN2		_MMIO(0xe4f4)
 #define GEN7_ROW_CHICKEN2_GT2		_MMIO(0xf4f4)
-#define   DOP_CLOCK_GATING_DISABLE	(1<<0)
-#define   PUSH_CONSTANT_DEREF_DISABLE	(1<<8)
+#define   DOP_CLOCK_GATING_DISABLE	(1 << 0)
+#define   PUSH_CONSTANT_DEREF_DISABLE	(1 << 8)
+#define   GEN11_TDL_CLOCK_GATING_FIX_DISABLE	(1 << 1)
 
 #define HSW_ROW_CHICKEN3		_MMIO(0xe49c)
 #define  HSW_ROW_CHICKEN3_L3_GLOBAL_ATOMICS_DISABLE    (1 << 6)
drivers/gpu/drm/i915/intel_engine_cs.c +7 -0
index ba8c137..eb2f46e 100644
@@ -1487,6 +1487,13 @@ static int icl_init_workarounds(struct intel_engine_cs *engine)
 	 */
 	WA_SET_BIT_MASKED(ICL_HDC_CHICKEN0, HDC_FORCE_NON_COHERENT);
 
+	/* Wa_2006611047:icl (pre-prod)
+	 * Formerly known as WaDisableImprovedTdlClkGating
+	 */
+	if (IS_ICL_REVID(dev_priv, ICL_REVID_A0, ICL_REVID_B0))
+		WA_SET_BIT_MASKED(GEN7_ROW_CHICKEN2,
+				  GEN11_TDL_CLOCK_GATING_FIX_DISABLE);
+
 	return 0;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

PATCH 7/22 drm/i915/icl: WaCL2SFHalfMaxAlloc

In reply to Oscar Mateo

This workarounds an issue with insufficient storage for the CL2 and SF units.

v2: Renamed to Wa_1405766107
v3: Wrapped the commit message

---
 drivers/gpu/drm/i915/i915_reg.h | 4 ++++
 drivers/gpu/drm/i915/intel_pm.c | 7 +++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index 67664d0..cb5d117 100644
@@ -8212,6 +8212,10 @@ enum {
 #define   GEN11_HASH_CTRL_BIT0			(1 << 0)
 #define   GEN11_HASH_CTRL_BIT4			(1 << 12)
 
+#define GEN11_LSN_UNSLCVC				_MMIO(0xB43C)
+#define   GEN11_LSN_UNSLCVC_GAFS_HALF_CL2_MACALLOC	(1 << 9)
+#define   GEN11_LSN_UNSLCVC_GAFS_HALF_SF_MAXALLOC	(1 << 7)
+
 /* IVYBRIDGE DPF */
 #define GEN7_L3CDERRST1(slice)		_MMIO(0xB008 + (slice) * 0x200) /* L3CD Error Status 1 */
 #define   GEN7_L3CDERRST1_ROW_MASK	(0x7ff<<14)
drivers/gpu/drm/i915/intel_pm.c +7 -0
index 84d9910..3843c28 100644
@@ -8541,6 +8541,13 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	I915_WRITE(GEN11_GACB_PERF_CTRL,
 		   ((I915_READ(GEN11_GACB_PERF_CTRL) & ~GEN11_HASH_CTRL_MASK) |
 		    GEN11_HASH_CTRL_BIT0 | GEN11_HASH_CTRL_BIT4));
+
+	/* Wa_1405766107:icl
+	 * Formerly known as WaCL2SFHalfMaxAlloc
+	 */
+	I915_WRITE(GEN11_LSN_UNSLCVC, (I915_READ(GEN11_LSN_UNSLCVC) |
+				       GEN11_LSN_UNSLCVC_GAFS_HALF_SF_MAXALLOC |
+				       GEN11_LSN_UNSLCVC_GAFS_HALF_CL2_MACALLOC));
 }
 
 static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw

PATCH 8/22 drm/i915/icl: WaDisCtxReload

In reply to Oscar Mateo

Revert to the legacy implementation to avoid a system hang.

v2: Correct the address for GAMW_ECO_DEV_RW_IA_REG
v3: Renamed to Wa_220166154

---
 drivers/gpu/drm/i915/i915_reg.h | 3 +++
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 2 files changed, 9 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +3 -0
index cb5d117..004a4db 100644
@@ -8216,6 +8216,9 @@ enum {
 #define   GEN11_LSN_UNSLCVC_GAFS_HALF_CL2_MACALLOC	(1 << 9)
 #define   GEN11_LSN_UNSLCVC_GAFS_HALF_SF_MAXALLOC	(1 << 7)
 
+#define GAMW_ECO_DEV_RW_IA_REG			_MMIO(0x4080)
+#define   GAMW_ECO_DEV_CTX_RELOAD_DISABLE	(1 << 7)
+
 /* IVYBRIDGE DPF */
 #define GEN7_L3CDERRST1(slice)		_MMIO(0xB008 + (slice) * 0x200) /* L3CD Error Status 1 */
 #define   GEN7_L3CDERRST1_ROW_MASK	(0x7ff<<14)
drivers/gpu/drm/i915/intel_pm.c +6 -0
index 3843c28..c5bf71b 100644
@@ -8519,6 +8519,12 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	I915_WRITE(GEN8_L3SQCREG4, (I915_READ(GEN8_L3SQCREG4) |
 				    GEN11_LQSC_CLEAN_EVICT_DISABLE));
 
+	/* Wa_220166154:icl
+	 * Formerly known as WaDisCtxReload
+	 */
+	I915_WRITE(GAMW_ECO_DEV_RW_IA_REG, (I915_READ(GAMW_ECO_DEV_RW_IA_REG) |
+					    GAMW_ECO_DEV_CTX_RELOAD_DISABLE));
+
 	I915_WRITE(GEN8_GARBCNTL,
 		   /* Wa_1604223664:icl
 		    * Formerly known as WaL3BankAddressHashing
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

PATCH 9/22 drm/i915/icl: WaSendPushConstantsFromMMIO

In reply to Oscar Mateo

Allows UMDs to set 'Disable Gather at Set Shader Common Slice'.

Do Linux UMDs make use of this? This change has been security reviewed and the whitelisting approved. Virtualization of other OSes could certainly use it...

v2: Rebased

---
 drivers/gpu/drm/i915/intel_engine_cs.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_engine_cs.c +6 -0
index eb2f46e..884df09 100644
@@ -1470,6 +1470,7 @@ static int cfl_init_workarounds(struct intel_engine_cs *engine)
 static int icl_init_workarounds(struct intel_engine_cs *engine)
 {
 	struct drm_i915_private *dev_priv = engine->i915;
+	int ret;
 
 	/* Wa_1604370585:icl (pre-prod)
 	 * Formerly known as WaPushConstantDereferenceHoldDisable
@@ -1494,6 +1495,11 @@ static int icl_init_workarounds(struct intel_engine_cs *engine)
 		WA_SET_BIT_MASKED(GEN7_ROW_CHICKEN2,
 				  GEN11_TDL_CLOCK_GATING_FIX_DISABLE);
 
+	/* WaSendPushConstantsFromMMIO:icl */
+	ret = wa_ring_whitelist_reg(engine, COMMON_SLICE_CHICKEN2);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

PATCH 10/22 drm/i915/icl: WaAllowUMDToModifyHalfSliceChicken2

In reply to Oscar Mateo

Required to dinamically set 'Small PL Lossless Fix Enable'

Do Linux UMDs make use of this? This change has been security reviewed and the whitelisting approved. Virtualization of other OSes could certainly use it.

v2: For whatever reason, this ended up in KBL (??!!)

---
 drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_engine_cs.c +5 -0
index 884df09..ada80c1 100644
@@ -1500,6 +1500,11 @@ static int icl_init_workarounds(struct intel_engine_cs *engine)
 	if (ret)
 		return ret;
 
+	/* WaAllowUMDToModifyHalfSliceChicken2:icl */
+	ret = wa_ring_whitelist_reg(engine, HALF_SLICE_CHICKEN2);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#10 lore raw

PATCH 11/22 drm/i915/icl: WaAllowUMDToModifyHalfSliceChicken7

In reply to Oscar Mateo

Required to dinamically set 'Trilinear Filter Quality Mode'

Do Linux UMDs make use of this? This change has been security reviewed and the whitelisting approved. Virtualization of other OSes could certainly use it.

v2: For whatever reason, this ended up in KBL (??!!)

---
 drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_engine_cs.c +5 -0
index ada80c1..7fb7283 100644
@@ -1505,6 +1505,11 @@ static int icl_init_workarounds(struct intel_engine_cs *engine)
 	if (ret)
 		return ret;
 
+	/* WaAllowUMDToModifyHalfSliceChicken7:icl */
+	ret = wa_ring_whitelist_reg(engine, GEN9_HALF_SLICE_CHICKEN7);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#11 lore raw

PATCH 12/22 drm/i915/icl: WaAllowUmdWriteTRTTRootTable

In reply to Oscar Mateo

Required for TR-TT (Tiled Resource Translation Table) support.

Do Linux UMDs make use of this? This change has been security reviewed and the whitelisting approved. Virtualization of other OSes could certainly use it.

v2: For whatever reason, this ended up in KBL (??!!)

---
 drivers/gpu/drm/i915/i915_reg.h        | 3 +++
 drivers/gpu/drm/i915/intel_engine_cs.c | 8 ++++++++
 2 files changed, 11 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +3 -0
index 004a4db..04f2dd5 100644
@@ -8219,6 +8219,9 @@ enum {
 #define GAMW_ECO_DEV_RW_IA_REG			_MMIO(0x4080)
 #define   GAMW_ECO_DEV_CTX_RELOAD_DISABLE	(1 << 7)
 
+#define TR_VA_TTL3_PTR_DW0		_MMIO(0x4DE0)
+#define TR_VA_TTL3_PTR_DW1		_MMIO(0x4DE4)
+
 /* IVYBRIDGE DPF */
 #define GEN7_L3CDERRST1(slice)		_MMIO(0xB008 + (slice) * 0x200) /* L3CD Error Status 1 */
 #define   GEN7_L3CDERRST1_ROW_MASK	(0x7ff<<14)
drivers/gpu/drm/i915/intel_engine_cs.c +8 -0
index 7fb7283..9400f4f 100644
@@ -1510,6 +1510,14 @@ static int icl_init_workarounds(struct intel_engine_cs *engine)
 	if (ret)
 		return ret;
 
+	/* WaAllowUmdWriteTRTTRootTable:icl */
+	ret = wa_ring_whitelist_reg(engine, TR_VA_TTL3_PTR_DW0);
+	if (ret)
+		return ret;
+	ret = wa_ring_whitelist_reg(engine, TR_VA_TTL3_PTR_DW1);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#12 lore raw

PATCH 13/22 drm/i915/icl: WaAllowUMDToModifySamplerMode

In reply to Oscar Mateo

Required for Bindless samplers.

Do Linux UMDs make use of this? This change has been security reviewed and the whitelisting approved. Virtualization of other OSes could certainly use it.

---
 drivers/gpu/drm/i915/i915_reg.h        | 2 ++
 drivers/gpu/drm/i915/intel_engine_cs.c | 5 +++++
 2 files changed, 7 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +2 -0
index 04f2dd5..f2ae3cf 100644
@@ -8222,6 +8222,8 @@ enum {
 #define TR_VA_TTL3_PTR_DW0		_MMIO(0x4DE0)
 #define TR_VA_TTL3_PTR_DW1		_MMIO(0x4DE4)
 
+#define GEN10_SAMPLER_MODE		_MMIO(0xE18C)
+
 /* IVYBRIDGE DPF */
 #define GEN7_L3CDERRST1(slice)		_MMIO(0xB008 + (slice) * 0x200) /* L3CD Error Status 1 */
 #define   GEN7_L3CDERRST1_ROW_MASK	(0x7ff<<14)
drivers/gpu/drm/i915/intel_engine_cs.c +5 -0
index 9400f4f..8337301 100644
@@ -1518,6 +1518,11 @@ static int icl_init_workarounds(struct intel_engine_cs *engine)
 	if (ret)
 		return ret;
 
+	/* WaAllowUMDToModifySamplerMode:icl */
+	ret = wa_ring_whitelist_reg(engine, GEN10_SAMPLER_MODE);
+	if (ret)
+		return ret;
+
 	return 0;
 }
 
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#13 lore raw

PATCH 14/22 drm/i915/icl: WaEnableStateCacheRedirectToCS

In reply to Oscar Mateo

Redirects the state cache to the CS Command buffer section for performance reasons.

v2: Rebased

---
 drivers/gpu/drm/i915/i915_reg.h        | 1 +
 drivers/gpu/drm/i915/intel_engine_cs.c | 4 ++++
 2 files changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index f2ae3cf..3bec6b1 100644
@@ -7150,6 +7150,7 @@ enum {
 #define  DISABLE_PIXEL_MASK_CAMMING		(1<<14)
 
 #define GEN9_SLICE_COMMON_ECO_CHICKEN1		_MMIO(0x731c)
+#define   GEN11_STATE_CACHE_REDIRECT_TO_CS	(1 << 11)
 
 #define GEN7_L3SQCREG1				_MMIO(0xB010)
 #define  VLV_B0_WA_L3SQCREG1_VALUE		0x00D30000
drivers/gpu/drm/i915/intel_engine_cs.c +4 -0
index 8337301..d0c382e 100644
@@ -1495,6 +1495,10 @@ static int icl_init_workarounds(struct intel_engine_cs *engine)
 		WA_SET_BIT_MASKED(GEN7_ROW_CHICKEN2,
 				  GEN11_TDL_CLOCK_GATING_FIX_DISABLE);
 
+	/* WaEnableStateCacheRedirectToCS:icl */
+	WA_SET_BIT_MASKED(GEN9_SLICE_COMMON_ECO_CHICKEN1,
+			  GEN11_STATE_CACHE_REDIRECT_TO_CS);
+
 	/* WaSendPushConstantsFromMMIO:icl */
 	ret = wa_ring_whitelist_reg(engine, COMMON_SLICE_CHICKEN2);
 	if (ret)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#14 lore raw

PATCH 15/22 drm/i915/icl: Enable Sampler DFR

In reply to Oscar Mateo

Sampler Dynamic Frequency Rebalancing (DFR) aims to reduce Sampler power by dynamically changing its clock frequency in low-throughput conditions. This patches enables it by default on Gen11.

v2: Wrong operation to clear the bit (Praveen)

Cc Sagar Arun Kamble <[email protected]>
Cc Praveen Paneri <[email protected]>
Cc Mika Kuoppala <[email protected]>
---
 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
index 3bec6b1..f2a42a3 100644
@@ -8220,6 +8220,9 @@ enum {
 #define GAMW_ECO_DEV_RW_IA_REG			_MMIO(0x4080)
 #define   GAMW_ECO_DEV_CTX_RELOAD_DISABLE	(1 << 7)
 
+#define GEN10_DFR_RATIO_EN_AND_CHICKEN	_MMIO(0x9550)
+#define   DFR_DISABLE			(1 << 9)
+
 #define TR_VA_TTL3_PTR_DW0		_MMIO(0x4DE0)
 #define TR_VA_TTL3_PTR_DW1		_MMIO(0x4DE4)
 
drivers/gpu/drm/i915/intel_pm.c +4 -0
index c5bf71b..8f1d028 100644
@@ -8505,6 +8505,10 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	I915_WRITE(_3D_CHICKEN3,
 		   _MASKED_BIT_ENABLE(_3D_CHICKEN3_AA_LINE_QUALITY_FIX_ENABLE));
 
+	/* This is not an Wa. Enable to reduce Sampler power */
+	I915_WRITE(GEN10_DFR_RATIO_EN_AND_CHICKEN,
+		   (I915_READ(GEN10_DFR_RATIO_EN_AND_CHICKEN) & ~DFR_DISABLE));
+
 	/* WaInPlaceDecompressionHang:icl */
 	I915_WRITE(GEN9_GAMT_ECO_REG_RW_IA, (I915_READ(GEN9_GAMT_ECO_REG_RW_IA) |
 					     GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS));
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#15 lore raw

PATCH 16/22 drm/i915/icl: Wa_1405779004

In reply to Oscar Mateo

Disable MSC clock gating to prevent data corruption.

BSpec: 19257

---
 drivers/gpu/drm/i915/i915_reg.h | 1 +
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 2 files changed, 7 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index f2a42a3..18f8c41 100644
@@ -3825,6 +3825,7 @@ enum {
 #define SLICE_UNIT_LEVEL_CLKGATE	_MMIO(0x94d4)
 #define  SARBUNIT_CLKGATE_DIS		(1 << 5)
 #define  RCCUNIT_CLKGATE_DIS		(1 << 7)
+#define  MSCUNIT_CLKGATE_DIS		(1 << 10)
 
 #define SUBSLICE_UNIT_LEVEL_CLKGATE	_MMIO(0x9524)
 #define  GWUNIT_CLKGATE_DIS		(1 << 16)
drivers/gpu/drm/i915/intel_pm.c +6 -0
index 8f1d028..68f1b60 100644
@@ -8558,6 +8558,12 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	I915_WRITE(GEN11_LSN_UNSLCVC, (I915_READ(GEN11_LSN_UNSLCVC) |
 				       GEN11_LSN_UNSLCVC_GAFS_HALF_SF_MAXALLOC |
 				       GEN11_LSN_UNSLCVC_GAFS_HALF_CL2_MACALLOC));
+
+	/* Wa_1405779004:icl (pre-prod) */
+	if (IS_ICL_REVID(dev_priv, ICL_REVID_A0, ICL_REVID_B0))
+		I915_WRITE(SLICE_UNIT_LEVEL_CLKGATE,
+			   (I915_READ(SLICE_UNIT_LEVEL_CLKGATE) |
+			    MSCUNIT_CLKGATE_DIS));
 }
 
 static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#16 lore raw

PATCH 17/22 drm/i915/icl: Wa_1406680159 and Wa_2201832410

In reply to Oscar Mateo

Disable GWL clock gating to prevent two different issues that might cause hangs.

Please notice that one of the issues is pre-production only.

---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +6 -0
index 68f1b60..2b7b88b 100644
@@ -8564,6 +8564,12 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 		I915_WRITE(SLICE_UNIT_LEVEL_CLKGATE,
 			   (I915_READ(SLICE_UNIT_LEVEL_CLKGATE) |
 			    MSCUNIT_CLKGATE_DIS));
+
+	/* Wa_1406680159:icl */
+	/* Wa_2201832410:icl (pre-prod, only until C0) */
+	I915_WRITE(SUBSLICE_UNIT_LEVEL_CLKGATE,
+		   (I915_READ(SUBSLICE_UNIT_LEVEL_CLKGATE) |
+		    GWUNIT_CLKGATE_DIS));
 }
 
 static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#17 lore raw

PATCH 18/22 drm/i915/icl: Wa_1604302699

In reply to Oscar Mateo

Disable I2M Write for performance reasons.

---
 drivers/gpu/drm/i915/i915_reg.h | 4 +++-
 drivers/gpu/drm/i915/intel_pm.c | 5 +++++
 2 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +3 -1
index 18f8c41..b1894f6 100644
@@ -7174,7 +7174,9 @@ enum {
 #define GEN7_L3CNTLREG3				_MMIO(0xB024)
 
 #define GEN7_L3_CHICKEN_MODE_REGISTER		_MMIO(0xB030)
-#define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
+#define GEN10_L3_CHICKEN_MODE_REGISTER		_MMIO(0xB114)
+#define  GEN7_WA_L3_CHICKEN_MODE		0x20000000
+#define  GEN11_I2M_WRITE_DISABLE		(1 << 28)
 
 #define GEN7_L3SQCREG4				_MMIO(0xb034)
 #define  L3SQ_URB_READ_CAM_MATCH_DISABLE	(1<<27)
drivers/gpu/drm/i915/intel_pm.c +5 -0
index 2b7b88b..9771f56 100644
@@ -8570,6 +8570,11 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	I915_WRITE(SUBSLICE_UNIT_LEVEL_CLKGATE,
 		   (I915_READ(SUBSLICE_UNIT_LEVEL_CLKGATE) |
 		    GWUNIT_CLKGATE_DIS));
+
+	/* Wa_1604302699:icl */
+	I915_WRITE(GEN10_L3_CHICKEN_MODE_REGISTER,
+		   (I915_READ(GEN10_L3_CHICKEN_MODE_REGISTER) |
+		    GEN11_I2M_WRITE_DISABLE));
 }
 
 static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#18 lore raw

PATCH 19/22 drm/i915/icl: Wa_2006665173

In reply to Oscar Mateo

Disable blend embellishment in RCC.

---
 drivers/gpu/drm/i915/i915_reg.h        | 18 +++++++++++-------
 drivers/gpu/drm/i915/intel_engine_cs.c |  5 +++++
 2 files changed, 16 insertions(+), 7 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +11 -7
index b1894f6..84e5a59 100644
@@ -7135,13 +7135,17 @@ enum {
 
 /* GEN7 chicken */
 #define GEN7_COMMON_SLICE_CHICKEN1		_MMIO(0x7010)
-# define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC	((1<<10) | (1<<26))
-# define GEN9_RHWO_OPTIMIZATION_DISABLE		(1<<14)
-#define COMMON_SLICE_CHICKEN2			_MMIO(0x7014)
-# define GEN9_PBE_COMPRESSED_HASH_SELECTION	(1<<13)
-# define GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE (1<<12)
-# define GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION (1<<8)
-# define GEN8_CSC2_SBE_VUE_CACHE_CONSERVATIVE	(1<<0)
+  #define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC	((1 << 10) | (1 << 26))
+  #define GEN9_RHWO_OPTIMIZATION_DISABLE	(1 << 14)
+
+#define COMMON_SLICE_CHICKEN2					_MMIO(0x7014)
+  #define GEN9_PBE_COMPRESSED_HASH_SELECTION			(1 << 13)
+  #define GEN9_DISABLE_GATHER_AT_SET_SHADER_COMMON_SLICE	(1 << 12)
+  #define GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION		(1 << 8)
+  #define GEN8_CSC2_SBE_VUE_CACHE_CONSERVATIVE			(1 << 0)
+
+#define GEN11_COMMON_SLICE_CHICKEN3		_MMIO(0x7304)
+  #define GEN11_BLEND_EMB_FIX_DISABLE_IN_RCC	(1 << 11)
 
 #define HIZ_CHICKEN					_MMIO(0x7018)
 # define CHV_HZ_8X8_MODE_IN_1X				(1<<15)
drivers/gpu/drm/i915/intel_engine_cs.c +5 -0
index d0c382e..872dd15 100644
@@ -1499,6 +1499,11 @@ static int icl_init_workarounds(struct intel_engine_cs *engine)
 	WA_SET_BIT_MASKED(GEN9_SLICE_COMMON_ECO_CHICKEN1,
 			  GEN11_STATE_CACHE_REDIRECT_TO_CS);
 
+	/* Wa_2006665173:icl (pre-prod) */
+	if (IS_ICL_REVID(dev_priv, ICL_REVID_A0, ICL_REVID_B0))
+		WA_SET_BIT_MASKED(GEN11_COMMON_SLICE_CHICKEN3,
+				  GEN11_BLEND_EMB_FIX_DISABLE_IN_RCC);
+
 	/* WaSendPushConstantsFromMMIO:icl */
 	ret = wa_ring_whitelist_reg(engine, COMMON_SLICE_CHICKEN2);
 	if (ret)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#19 lore raw

PATCH 20/22 drm/i915/icl: Wa_1406838659

In reply to Oscar Mateo

Disable CGPSF unit clock gating to prevent an issue.

---
 drivers/gpu/drm/i915/i915_reg.h | 13 ++++++++-----
 drivers/gpu/drm/i915/intel_pm.c |  6 ++++++
 2 files changed, 14 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +8 -5
index 84e5a59..af4fee2 100644
@@ -3823,15 +3823,18 @@ enum {
  * GEN10 clock gating regs
  */
 #define SLICE_UNIT_LEVEL_CLKGATE	_MMIO(0x94d4)
-#define  SARBUNIT_CLKGATE_DIS		(1 << 5)
-#define  RCCUNIT_CLKGATE_DIS		(1 << 7)
-#define  MSCUNIT_CLKGATE_DIS		(1 << 10)
+#define   SARBUNIT_CLKGATE_DIS		(1 << 5)
+#define   RCCUNIT_CLKGATE_DIS		(1 << 7)
+#define   MSCUNIT_CLKGATE_DIS		(1 << 10)
 
 #define SUBSLICE_UNIT_LEVEL_CLKGATE	_MMIO(0x9524)
-#define  GWUNIT_CLKGATE_DIS		(1 << 16)
+#define   GWUNIT_CLKGATE_DIS		(1 << 16)
 
 #define UNSLICE_UNIT_LEVEL_CLKGATE	_MMIO(0x9434)
-#define  VFUNIT_CLKGATE_DIS		(1 << 20)
+#define   VFUNIT_CLKGATE_DIS		(1 << 20)
+
+#define INF_UNIT_LEVEL_CLKGATE		_MMIO(0x9560)
+#define   CGPSF_CLKGATE_DIS		(1 << 3)
 
 /*
  * Display engine regs
drivers/gpu/drm/i915/intel_pm.c +6 -0
index 9771f56..1acc719 100644
@@ -8575,6 +8575,12 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 	I915_WRITE(GEN10_L3_CHICKEN_MODE_REGISTER,
 		   (I915_READ(GEN10_L3_CHICKEN_MODE_REGISTER) |
 		    GEN11_I2M_WRITE_DISABLE));
+
+	/* Wa_1406838659:icl (pre-prod) */
+	if (IS_ICL_REVID(dev_priv, ICL_REVID_A0, ICL_REVID_C0))
+		I915_WRITE(INF_UNIT_LEVEL_CLKGATE,
+			   (I915_READ(INF_UNIT_LEVEL_CLKGATE) |
+			    CGPSF_CLKGATE_DIS));
 }
 
 static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#20 lore raw

PATCH 21/22 drm/i915/icl: WaForwardProgressSoftReset

In reply to Oscar Mateo

Avoids a hang during soft reset.

---
 drivers/gpu/drm/i915/i915_reg.h | 5 +++++
 drivers/gpu/drm/i915/intel_pm.c | 8 ++++++++
 2 files changed, 13 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +5 -0
index af4fee2..408697b 100644
@@ -9703,6 +9703,11 @@ enum skl_power_gate {
 #define GEN9_VEBOX_MOCS(i)	_MMIO(0xcb00 + (i) * 4)	/* Video MOCS registers */
 #define GEN9_BLT_MOCS(i)	_MMIO(0xcc00 + (i) * 4)	/* Blitter MOCS registers */
 
+#define GEN10_SCRATCH_LNCF2		_MMIO(0xb0a0)
+#define   PMFLUSHDONE_LNICRSDROP	(1 << 20)
+#define   PMFLUSH_GAPL3UNBLOCK		(1 << 21)
+#define   PMFLUSHDONE_LNEBLK		(1 << 22)
+
 /* gamt regs */
 #define GEN8_L3_LRA_1_GPGPU _MMIO(0x4dd4)
 #define   GEN8_L3_LRA_1_GPGPU_DEFAULT_VALUE_BDW  0x67F1427F /* max/min for LRA1/2 */
drivers/gpu/drm/i915/intel_pm.c +8 -0
index 1acc719..b1c00e5 100644
@@ -8581,6 +8581,14 @@ static void icl_init_clock_gating(struct drm_i915_private *dev_priv)
 		I915_WRITE(INF_UNIT_LEVEL_CLKGATE,
 			   (I915_READ(INF_UNIT_LEVEL_CLKGATE) |
 			    CGPSF_CLKGATE_DIS));
+
+	/* WaForwardProgressSoftReset:icl (pre-prod) */
+	if (IS_ICL_REVID(dev_priv, ICL_REVID_A0, ICL_REVID_B0))
+		I915_WRITE(GEN10_SCRATCH_LNCF2,
+			   (I915_READ(GEN10_SCRATCH_LNCF2) |
+			    PMFLUSHDONE_LNICRSDROP |
+			    PMFLUSH_GAPL3UNBLOCK |
+			    PMFLUSHDONE_LNEBLK));
 }
 
 static void cnl_init_clock_gating(struct drm_i915_private *dev_priv)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#21 lore raw

PATCH 22/22 drm/i915/icl: WaEnableFloatBlendOptimization

In reply to Oscar Mateo

Enables blend optimization for floating point RTs

---
 drivers/gpu/drm/i915/i915_reg.h        | 3 +++
 drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
 2 files changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +3 -0
index 408697b..c5a1b18 100644
@@ -2651,6 +2651,9 @@ enum i915_power_well_id {
 #define   GEN8_4x4_STC_OPTIMIZATION_DISABLE	(1<<6)
 #define   GEN9_PARTIAL_RESOLVE_IN_VC_DISABLE	(1<<1)
 
+#define GEN10_CACHE_MODE_SS			_MMIO(0xe420)
+#define   FLOAT_BLEND_OPTIMIZATION_ENABLE	(1 << 4)
+
 #define GEN6_BLITTER_ECOSKPD	_MMIO(0x221d0)
 #define   GEN6_BLITTER_LOCK_SHIFT			16
 #define   GEN6_BLITTER_FBC_NOTIFY			(1<<3)
drivers/gpu/drm/i915/intel_engine_cs.c +3 -0
index 872dd15..c35f40b 100644
@@ -1504,6 +1504,9 @@ static int icl_init_workarounds(struct intel_engine_cs *engine)
 		WA_SET_BIT_MASKED(GEN11_COMMON_SLICE_CHICKEN3,
 				  GEN11_BLEND_EMB_FIX_DISABLE_IN_RCC);
 
+	/* WaEnableFloatBlendOptimization:icl */
+	WA_SET_BIT_MASKED(GEN10_CACHE_MODE_SS, FLOAT_BLEND_OPTIMIZATION_ENABLE);
+
 	/* WaSendPushConstantsFromMMIO:icl */
 	ret = wa_ring_whitelist_reg(engine, COMMON_SLICE_CHICKEN2);
 	if (ret)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#22 lore raw

✗ Fi.CI.CHECKPATCH: warning for series starting with [01/22] drm/i915/icl: Introduce initial Icelake Workarounds

In reply to Oscar Mateo
== Series Details ==

== Series Details ==

Series: series starting with [01/22] drm/i915/icl: Introduce initial Icelake Workarounds
URL : https://patchwork.freedesktop.org/series/41311/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
080bab08b911 drm/i915/icl: Introduce initial Icelake Workarounds
-:45: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'p' - possible side-effects?
#45: FILE: drivers/gpu/drm/i915/i915_drv.h:2467:
+#define IS_ICL_REVID(p, since, until) \
+	(IS_ICELAKE(p) && IS_REVID(p, since, until))

total: 0 errors, 0 warnings, 1 checks, 112 lines checked dfd92fa235cd drm/i915/icl: WaGAPZPriorityScheme 6b5802730b5d drm/i915/icl: WaModifyGamTlbPartitioning 6c99c36530dd drm/i915/icl: WaL3BankAddressHashing f3018a4d2c5b drm/i915/icl: WaDisableCleanEvicts 1d0fa9e70616 drm/i915/icl: WaDisableImprovedTdlClkGating 97c509b92d34 drm/i915/icl: WaCL2SFHalfMaxAlloc 3c456f385e81 drm/i915/icl: WaDisCtxReload 117d3028b83a drm/i915/icl: WaSendPushConstantsFromMMIO 18a761359036 drm/i915/icl: WaAllowUMDToModifyHalfSliceChicken2 dfbd6e5e21fe drm/i915/icl: WaAllowUMDToModifyHalfSliceChicken7 b17203f3ce71 drm/i915/icl: WaAllowUmdWriteTRTTRootTable 1a1f183539f7 drm/i915/icl: WaAllowUMDToModifySamplerMode 81ff9ff8112e drm/i915/icl: WaEnableStateCacheRedirectToCS a131ad41470f drm/i915/icl: Enable Sampler DFR 569a254c2ba9 drm/i915/icl: Wa_1405779004 1adc09d57d75 drm/i915/icl: Wa_1406680159 and Wa_2201832410 e745da174634 drm/i915/icl: Wa_1604302699 e02a3689a546 drm/i915/icl: Wa_2006665173 0d55385321e3 drm/i915/icl: Wa_1406838659 0c932d845446 drm/i915/icl: WaForwardProgressSoftReset 89766d724bb6 drm/i915/icl: WaEnableFloatBlendOptimization

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#23 lore raw

✓ Fi.CI.BAT: success for series starting with [01/22] drm/i915/icl: Introduce initial Icelake Workarounds

In reply to Oscar Mateo
== Series Details ==

== Series Details ==

Series: series starting with [01/22] drm/i915/icl: Introduce initial Icelake Workarounds
URL : https://patchwork.freedesktop.org/series/41311/
State : success

== Summary ==

Series 41311v1 series starting with [01/22] drm/i915/icl: Introduce initial Icelake Workarounds
https://patchwork.freedesktop.org/api/1.0/series/41311/revisions/1/mbox/

---- Known issues:

Test kms_pipe_crc_basic:

        Subgroup suspend-read-crc-pipe-a:
                incomplete -> PASS       (fi-skl-6700k2) fdo#103191
        Subgroup suspend-read-crc-pipe-c:
                pass       -> INCOMPLETE (fi-bxt-dsi) fdo#103927

fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
fdo#103927 https://bugs.freedesktop.org/show_bug.cgi?id=103927

fi-bdw-5557u     total:285  pass:264  dwarn:0   dfail:0   fail:0   skip:21  time:429s
fi-bdw-gvtdvm    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:443s
fi-blb-e6850     total:285  pass:220  dwarn:1   dfail:0   fail:0   skip:64  time:379s
fi-bsw-n3050     total:285  pass:239  dwarn:0   dfail:0   fail:0   skip:46  time:535s
fi-bwr-2160      total:285  pass:180  dwarn:0   dfail:0   fail:0   skip:105 time:297s
fi-bxt-dsi       total:243  pass:216  dwarn:0   dfail:0   fail:0   skip:26 
fi-bxt-j4205     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:514s
fi-byt-j1900     total:285  pass:250  dwarn:0   dfail:0   fail:0   skip:35  time:522s
fi-byt-n2820     total:285  pass:246  dwarn:0   dfail:0   fail:0   skip:39  time:510s
fi-cfl-8700k     total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:408s
fi-cfl-s3        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:560s
fi-cfl-u         total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:512s
fi-cnl-y3        total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:585s
fi-elk-e7500     total:285  pass:226  dwarn:0   dfail:0   fail:0   skip:59  time:424s
fi-gdg-551       total:285  pass:176  dwarn:0   dfail:0   fail:1   skip:108 time:314s
fi-glk-1         total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:542s
fi-glk-j4005     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:487s
fi-hsw-4770      total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:404s
fi-ilk-650       total:285  pass:225  dwarn:0   dfail:0   fail:0   skip:60  time:420s
fi-ivb-3520m     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:469s
fi-ivb-3770      total:285  pass:252  dwarn:0   dfail:0   fail:0   skip:33  time:433s
fi-kbl-7500u     total:285  pass:260  dwarn:1   dfail:0   fail:0   skip:24  time:474s
fi-kbl-7567u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:462s
fi-kbl-r         total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:511s
fi-pnv-d510      total:285  pass:220  dwarn:1   dfail:0   fail:0   skip:64  time:680s
fi-skl-6260u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:438s
fi-skl-6600u     total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:539s
fi-skl-6700k2    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:501s
fi-skl-6770hq    total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:516s
fi-skl-guc       total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:430s
fi-skl-gvtdvm    total:285  pass:262  dwarn:0   dfail:0   fail:0   skip:23  time:445s
fi-snb-2520m     total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:603s
fi-snb-2600      total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:399s

e023242a3ebab3e7a4e5d7647d7b08c0d2be5d4c drm-tip: 2018y-04m-06d-19h-07m-27s UTC integration manifest 89766d724bb6 drm/i915/icl: WaEnableFloatBlendOptimization
0c932d845446 drm/i915/icl: WaForwardProgressSoftReset
0d55385321e3 drm/i915/icl: Wa_1406838659
e02a3689a546 drm/i915/icl: Wa_2006665173
e745da174634 drm/i915/icl: Wa_1604302699
1adc09d57d75 drm/i915/icl: Wa_1406680159 and Wa_2201832410
569a254c2ba9 drm/i915/icl: Wa_1405779004
a131ad41470f drm/i915/icl: Enable Sampler DFR
81ff9ff8112e drm/i915/icl: WaEnableStateCacheRedirectToCS
1a1f183539f7 drm/i915/icl: WaAllowUMDToModifySamplerMode
b17203f3ce71 drm/i915/icl: WaAllowUmdWriteTRTTRootTable
dfbd6e5e21fe drm/i915/icl: WaAllowUMDToModifyHalfSliceChicken7
18a761359036 drm/i915/icl: WaAllowUMDToModifyHalfSliceChicken2
117d3028b83a drm/i915/icl: WaSendPushConstantsFromMMIO
3c456f385e81 drm/i915/icl: WaDisCtxReload
97c509b92d34 drm/i915/icl: WaCL2SFHalfMaxAlloc
1d0fa9e70616 drm/i915/icl: WaDisableImprovedTdlClkGating
f3018a4d2c5b drm/i915/icl: WaDisableCleanEvicts
6c99c36530dd drm/i915/icl: WaL3BankAddressHashing
6b5802730b5d drm/i915/icl: WaModifyGamTlbPartitioning
dfd92fa235cd drm/i915/icl: WaGAPZPriorityScheme
080bab08b911 drm/i915/icl: Introduce initial Icelake Workarounds

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8632/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#24 lore raw

✗ Fi.CI.IGT: failure for series starting with [01/22] drm/i915/icl: Introduce initial Icelake Workarounds

In reply to Oscar Mateo
== Series Details ==

== Series Details ==

Series: series starting with [01/22] drm/i915/icl: Introduce initial Icelake Workarounds
URL : https://patchwork.freedesktop.org/series/41311/
State : failure

== Summary ==

---- Possible new issues:

Test kms_atomic_transition:

        Subgroup plane-all-transition-fencing:
                fail       -> PASS       (shard-snb)
Test kms_chv_cursor_fail:
        Subgroup pipe-c-256x256-top-edge:
                pass       -> FAIL       (shard-apl)
Test kms_cursor_crc:
        Subgroup cursor-256x256-dpms:
                fail       -> PASS       (shard-snb)
        Subgroup cursor-256x256-offscreen:
                fail       -> PASS       (shard-snb)
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-pwrite:
                fail       -> PASS       (shard-snb)
        Subgroup fbc-1p-primscrn-shrfb-pgflip-blt:
                fail       -> PASS       (shard-snb)
        Subgroup fbc-modesetfrombusy:
                fail       -> PASS       (shard-snb)
        Subgroup fbcpsr-1p-offscren-pri-indfb-draw-blt:
                fail       -> SKIP       (shard-snb)
        Subgroup fbcpsr-1p-primscrn-pri-indfb-draw-mmap-gtt:
                fail       -> SKIP       (shard-snb)
        Subgroup fbcpsr-1p-primscrn-pri-shrfb-draw-render:
                fail       -> SKIP       (shard-snb)
        Subgroup fbcpsr-2p-scndscrn-spr-indfb-fullscreen:
                fail       -> SKIP       (shard-snb)
        Subgroup psr-1p-primscrn-spr-indfb-onoff:
                fail       -> SKIP       (shard-snb)
        Subgroup psr-2p-scndscrn-cur-indfb-draw-mmap-wc:
                fail       -> SKIP       (shard-snb)
Test kms_mmap_write_crc:
                fail       -> PASS       (shard-snb)
Test kms_vblank:
        Subgroup pipe-b-query-forked-busy-hang:
                fail       -> PASS       (shard-snb)

---- Known issues:

Test kms_flip:

        Subgroup plain-flip-fb-recreate:
                fail       -> PASS       (shard-hsw) fdo#100368 +1
Test kms_frontbuffer_tracking:
        Subgroup fbc-2p-primscrn-shrfb-pgflip-blt:
                fail       -> SKIP       (shard-snb) fdo#103167
Test kms_setmode:
        Subgroup basic:
                fail       -> PASS       (shard-hsw) fdo#99912
Test kms_sysfs_edid_timing:
                warn       -> PASS       (shard-apl) fdo#100047
Test perf:
        Subgroup polling:
                fail       -> PASS       (shard-hsw) fdo#102252

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-apl        total:2680 pass:1835 dwarn:1   dfail:0   fail:8   skip:836 time:12719s
shard-hsw        total:2680 pass:1787 dwarn:1   dfail:0   fail:0   skip:891 time:11531s
shard-snb        total:2680 pass:1377 dwarn:1   dfail:0   fail:3   skip:1299 time:6900s

Blacklisted hosts:
shard-kbl total:2680 pass:1954 dwarn:10 dfail:0 fail:6 skip:710 time:9048s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8632/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#25 lore raw
In reply to Oscar Mateo

Quoting Oscar Mateo (2018-04-06 23:24:57)

Quoted 2 lines

Inherit workarounds from previous platforms that are still valid for Icelake.

Speaking of the workarounds, where do we stand with at least landing the split out of init_workarounds_ring()?

Rebuilding the invariant wa_regs[] on every reset is annoying, and how many of the general mmio need to be reemitted everytime? I would dearly like to get the flow of the gt/context workarounds improved. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#26 lore raw
Quoted 10 lines · Chris Wilson

Quoting Oscar Mateo (2018-04-06 23:24:57)

Quoted 2 lines

Inherit workarounds from previous platforms that are still valid for Icelake.

Speaking of the workarounds, where do we stand with at least landing the split out of init_workarounds_ring()?

Rebuilding the invariant wa_regs[] on every reset is annoying, and how many of the general mmio need to be reemitted everytime? I would dearly like to get the flow of the gt/context workarounds improved. -Chris

I'm afraid we stand nowhere. The latest patches I sent were sidetracked by a conversation about where i915.rst should reside:

https://patchwork.freedesktop.org/patch/206937/
https://patchwork.freedesktop.org/patch/206557/

I can try once more, see if I am more lucky this time around?
_______________________________________________
Intel-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx