Skip to contentSkip to conversation

Ivybridge fixes

PATCH New Eugeni Dodonov 5 participants 18 messages Feb 3, 2012 – Feb 7, 2012

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

PATCH 1/1 Ivybridge fixes

The combination of those 4 workarounds seem to solve random hand-hangs observed in GLBenchmark Egypt and (much more rarely) in World of Padman and Unigine demos.

Eugeni Dodonov (4):
drm/i915: gen7: implement rczunit workaround drm/i915: gen7: add two more IVB workarounds drm/i915: gen7: work around a system hang on IVB drm/i915: gen7: another IVB workaround

 drivers/gpu/drm/i915/i915_reg.h      |   17 +++++++++++++++++
 drivers/gpu/drm/i915/intel_display.c |   23 +++++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)
Signature · 1 line
1.7.8.1
#1 lore raw

PATCH 1/4 drm/i915: gen7: implement rczunit workaround

This is yet another workaround related to clock gating which we need on Gen7.

---
 drivers/gpu/drm/i915/i915_reg.h      |    1 +
 drivers/gpu/drm/i915/intel_display.c |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index c3afb78..80fd6b5 100644
@@ -3618,6 +3618,7 @@
 #define    GT_FIFO_NUM_RESERVED_ENTRIES		20
 
 #define GEN6_UCGCTL2				0x9404
+# define GEN6_RCZUNIT_CLOCK_GATE_DISABLE		(1 << 13)
 # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE		(1 << 12)
 # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE		(1 << 11)
 
drivers/gpu/drm/i915/intel_display.c +4 -0
index b3b51c4..a72100f 100644
@@ -8416,8 +8416,12 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 	 *
 	 * According to the spec, bit 11 (RCCUNIT) must also be set,
 	 * but we didn't debug actual testcases to find it out.
+	 *
+	 * The bit 13 (RCZUNIT) must also be set, to implement the
+	 * WaDisableRCZUnitClockGating workaround.
 	 */
 	I915_WRITE(GEN6_UCGCTL2,
+		   GEN6_RCZUNIT_CLOCK_GATE_DISABLE |
 		   GEN6_RCPBUNIT_CLOCK_GATE_DISABLE |
 		   GEN6_RCCUNIT_CLOCK_GATE_DISABLE);
 
Signature · 1 line
1.7.8.1
#2 lore raw

PATCH 2/4 drm/i915: gen7: add two more IVB workarounds

In reply to Eugeni Dodonov

This adds two cache-related workarounds for Ivy Bridge which can lead to 3D ring hangs and corruptions.

---
 drivers/gpu/drm/i915/i915_reg.h      |    7 +++++++
 drivers/gpu/drm/i915/intel_display.c |    6 ++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +7 -0
index 80fd6b5..92274b1 100644
@@ -3028,6 +3028,13 @@
 #define  DISP_TILE_SURFACE_SWIZZLING	(1<<13)
 #define  DISP_FBC_WM_DIS		(1<<15)
 
+/* GEN7 chicken */
+#define GEN7_COMMON_SLICE_CHICKEN1			0x7010
+#define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C4FFF8C
+
+#define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
+#define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
+
 /* PCH */
 
 /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +6 -0
index a72100f..49e5870 100644
@@ -8445,6 +8445,12 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 		   ILK_DPARB_CLK_GATE  |
 		   ILK_DPFD_CLK_GATE);
 
+	/* IVB workarounds */
+	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
+			GEN7_WA_FOR_GEN7_L3_CONTROL);
+	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
+			GEN7_WA_L3_CHICKEN_MODE);
+
 	for_each_pipe(pipe) {
 		I915_WRITE(DSPCNTR(pipe),
 			   I915_READ(DSPCNTR(pipe)) |
Signature · 1 line
1.7.8.1
#3 lore raw

Re: [PATCH 2/4] drm/i915: gen7: add two more IVB workarounds

Quoted 14 lines · Eugeni Dodonov

This adds two cache-related workarounds for Ivy Bridge which can lead to 3D ring hangs and corruptions.

---
  drivers/gpu/drm/i915/i915_reg.h      |    7 +++++++
  drivers/gpu/drm/i915/intel_display.c |    6 ++++++
  2 files changed, 13 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +0 -0
index 80fd6b5..92274b1 100644

drivers/gpu/drm/i915/i915_reg.h line 3033

Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -3028,6 +3028,13 @@
  #define  DISP_TILE_SURFACE_SWIZZLING	(1<<13)
  #define  DISP_FBC_WM_DIS		(1<<15)
 
+/* GEN7 chicken */
+#define GEN7_COMMON_SLICE_CHICKEN1			0x7010
+#define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C4FFF8C

I'm skeptical of this value. Your mask doesn't match the bits you're setting:

Actual chicken bits - bitdecode(0x3C4FFF8C & 0x0000ffff):
[2, 3, 7, 8, 9, 10, 11, 12, 13, 14, 15]

Mask bits - bitdecode(0x3C4FFF8C >> 16):
[0, 1, 2, 3, 6, 10, 11, 12, 13]

Also, this is an awful lot of workarounds! I doubt we need all of them.
On the BSpec Workaround page, I see a recommendation to set bits 10
and 26, but I don't see a rationale for the other ones. Is that sufficient?

I'd also prefer to see these broken down into separate #defines for each bit rather than setting a magical value.

drivers/gpu/drm/i915/i915_reg.h line 3037

Quoted 3 lines
drivers/gpu/drm/i915/i915_reg.h +3 -0
+#define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
+#define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
+

This WA looks good and matches the docs (vol1i L3 URB > L3 Register Space (Bspec) > config space for L3 > L3CHMD - l3chicken mode).

Quoted 20 lines
drivers/gpu/drm/i915/i915_reg.h +0 -0
  /* PCH */
 
  /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +6 -0
index a72100f..49e5870 100644
@@ -8445,6 +8445,12 @@ static void gen6_init_clock_gating(struct drm_device *dev)
  		   ILK_DPARB_CLK_GATE  |
  		   ILK_DPFD_CLK_GATE);
 
+	/* IVB workarounds */
+	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
+			GEN7_WA_FOR_GEN7_L3_CONTROL);
+	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
+			GEN7_WA_L3_CHICKEN_MODE);
+
  	for_each_pipe(pipe) {
  		I915_WRITE(DSPCNTR(pipe),
  			   I915_READ(DSPCNTR(pipe)) |
#4 lore raw

Re: [PATCH 2/4] drm/i915: gen7: add two more IVB workarounds

In reply to Eugeni Dodonov
Quoted 34 lines · Eugeni Dodonov

This adds two cache-related workarounds for Ivy Bridge which can lead to 3D ring hangs and corruptions.

---
  drivers/gpu/drm/i915/i915_reg.h      |    7 +++++++
  drivers/gpu/drm/i915/intel_display.c |    6 ++++++
  2 files changed, 13 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +7 -0
index 80fd6b5..92274b1 100644
@@ -3028,6 +3028,13 @@
  #define  DISP_TILE_SURFACE_SWIZZLING	(1<<13)
  #define  DISP_FBC_WM_DIS		(1<<15)
 
+/* GEN7 chicken */
+#define GEN7_COMMON_SLICE_CHICKEN1			0x7010
+#define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C4FFF8C
+
+#define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
+#define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
+
  /* PCH */
 
  /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +0 -0
index a72100f..49e5870 100644
@@ -8445,6 +8445,12 @@ static void gen6_init_clock_gating(struct drm_device *dev)
  		   ILK_DPARB_CLK_GATE  |
  		   ILK_DPFD_CLK_GATE);

drivers/gpu/drm/i915/intel_display.c static void gen6_init_clock_gating(struct drm_device *dev) · line 8456

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +6 -0
 
+	/* IVB workarounds */
+	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
+			GEN7_WA_FOR_GEN7_L3_CONTROL);
+	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
+			GEN7_WA_L3_CHICKEN_MODE);
+
  	for_each_pipe(pipe) {
  		I915_WRITE(DSPCNTR(pipe),
  			   I915_READ(DSPCNTR(pipe)) |

Also, shouldn't these be in the ivybridge_init_clock_gating function, not gen6? These are clearly Gen7 registers.

#5 lore raw

PATCH 3/4 drm/i915: gen7: work around a system hang on IVB

In reply to Eugeni Dodonov

This adds the workaround for WaCatErrorRejectionIssue which could result in a system hang..

---
 drivers/gpu/drm/i915/i915_reg.h      |    4 ++++
 drivers/gpu/drm/i915/intel_display.c |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index 92274b1..4f25cd5 100644
@@ -3035,6 +3035,10 @@
 #define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
 #define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
 
+/* WaCatErrorRejectionIssue */
+#define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
+#define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
+
 /* PCH */
 
 /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +4 -0
index 49e5870..f7e86b8 100644
@@ -8451,6 +8451,10 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
 			GEN7_WA_L3_CHICKEN_MODE);
 
+	I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG,
+			I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) |
+			GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB);
+
 	for_each_pipe(pipe) {
 		I915_WRITE(DSPCNTR(pipe),
 			   I915_READ(DSPCNTR(pipe)) |
Signature · 1 line
1.7.8.1
Reviewed-by on v1 3/4
#6 lore raw

Re: [PATCH 3/4] drm/i915: gen7: work around a system hang on IVB

Quoted 29 lines · Eugeni Dodonov

This adds the workaround for WaCatErrorRejectionIssue which could result in a system hang..

---
  drivers/gpu/drm/i915/i915_reg.h      |    4 ++++
  drivers/gpu/drm/i915/intel_display.c |    4 ++++
  2 files changed, 8 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index 92274b1..4f25cd5 100644
@@ -3035,6 +3035,10 @@
  #define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
  #define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
 
+/* WaCatErrorRejectionIssue */
+#define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
+#define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
+
  /* PCH */
 
  /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +0 -0
index 49e5870..f7e86b8 100644

drivers/gpu/drm/i915/intel_display.c static void gen6_init_clock_gating(struct drm_device *dev) · line 8460

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -8451,6 +8451,10 @@ static void gen6_init_clock_gating(struct drm_device *dev)
  	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
  			GEN7_WA_L3_CHICKEN_MODE);
 
+	I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG,
+			I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) |
+			GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB);
+
  	for_each_pipe(pipe) {
  		I915_WRITE(DSPCNTR(pipe),
  			   I915_READ(DSPCNTR(pipe)) |

Ditto: shouldn't this be in ivybridge_init_clock_gating?

This does match the docs (vol1g GT Interface Register [IVB] > GT Interface Register DevIVB > MBCunit Config Space > SQCM - SQ Chicken Modes).

Assuming it gets in a Gen7-specific location...

#7 lore raw

PATCH 4/4 drm/i915: gen7: another IVB workaround

In reply to Eugeni Dodonov

Add the WaDisableEUInstructionShootdown workaround for Ivy Bridge.

---
 drivers/gpu/drm/i915/i915_reg.h      |    5 +++++
 drivers/gpu/drm/i915/intel_display.c |    9 +++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +5 -0
index 4f25cd5..9ba7406 100644
@@ -3039,6 +3039,11 @@
 #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
 #define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
 
+/* WaDisableEUInstructionShootdown */
+#define GEN7_ROW_CHICKEN_MMIO_TDL			 0xE4F0
+#define GEN7_ROW_CHICKEN_MMIO_TDL_GT2		0xF4F0
+#define GEN7_ROW_CHICKEN_DISABLE_EU_INSTR_SHOOTDOWN  ((1 << 8) | (1 << 9))
+
 /* PCH */
 
 /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +9 -0
index f7e86b8..1a87574 100644
@@ -8455,6 +8455,15 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 			I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) |
 			GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB);
 
+	/* WaDisableEUInstructionShootdown */
+	I915_WRITE(GEN7_ROW_CHICKEN_MMIO_TDL,
+			I915_READ(GEN7_ROW_CHICKEN_MMIO_TDL) |
+			GEN7_ROW_CHICKEN_DISABLE_EU_INSTR_SHOOTDOWN);
+
+	I915_WRITE(GEN7_ROW_CHICKEN_MMIO_TDL_GT2,
+			I915_READ(GEN7_ROW_CHICKEN_MMIO_TDL_GT2) |
+			GEN7_ROW_CHICKEN_DISABLE_EU_INSTR_SHOOTDOWN);
+
 	for_each_pipe(pipe) {
 		I915_WRITE(DSPCNTR(pipe),
 			   I915_READ(DSPCNTR(pipe)) |
Signature · 1 line
1.7.8.1
#8 lore raw

cover Ivy Bridge hard-hang fixes

In reply to Eugeni Dodonov

Hi,

this is a set of patches which should fix hard-hangs for Ivy Bridge in different workloads, among which GLBenchmark Egypt is the most notable one.

It also seems to solve random hard-hangs in other applications (the ones I've seen the most are in World of Padman, Unigine games and Nexuiz).

Eugeni Dodonov (3):
drm/i915: gen7: implement rczunit workaround drm/i915: gen7: add two more IVB workarounds drm/i915: gen7: work around a system hang on IVB

 drivers/gpu/drm/i915/i915_reg.h      |   12 ++++++++++++
 drivers/gpu/drm/i915/intel_display.c |   25 ++++++++++++++++++++++---
 2 files changed, 34 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.8.4
#9 lore raw

PATCH 1/3 drm/i915: gen7: implement rczunit workaround

This is yet another workaround related to clock gating which we need on Ivy Bridge.

---
 drivers/gpu/drm/i915/i915_reg.h      |    1 +
 drivers/gpu/drm/i915/intel_display.c |   14 +++++++++++---
 2 files changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index c3afb78..80fd6b5 100644
@@ -3618,6 +3618,7 @@
 #define    GT_FIFO_NUM_RESERVED_ENTRIES		20
 
 #define GEN6_UCGCTL2				0x9404
+# define GEN6_RCZUNIT_CLOCK_GATE_DISABLE		(1 << 13)
 # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE		(1 << 12)
 # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE		(1 << 11)
 
drivers/gpu/drm/i915/intel_display.c +11 -3
index f1744aa..1defd42 100644
@@ -8396,6 +8396,7 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	int pipe;
 	uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE;
+	u32 gstate;
 
 	I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
 
@@ -8416,10 +8417,17 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 	 *
 	 * According to the spec, bit 11 (RCCUNIT) must also be set,
 	 * but we didn't debug actual testcases to find it out.
+	 *
+	 * The bit 13 (RCZUNIT) must also be set, to implement the
+	 * WaDisableRCZUnitClockGating workaround on Ivy Bridge.
 	 */
-	I915_WRITE(GEN6_UCGCTL2,
-		   GEN6_RCPBUNIT_CLOCK_GATE_DISABLE |
-		   GEN6_RCCUNIT_CLOCK_GATE_DISABLE);
+	gstate = GEN6_RCPBUNIT_CLOCK_GATE_DISABLE |
+		GEN6_RCCUNIT_CLOCK_GATE_DISABLE;
+
+	if (IS_IVYBRIDGE(dev))
+		gstate |= GEN6_RCZUNIT_CLOCK_GATE_DISABLE;
+
+	I915_WRITE(GEN6_UCGCTL2, gstate);
 
 	/*
 	 * According to the spec the following bits should be
Signature · 1 line
1.7.8.4
#10 lore raw

Re: [PATCH 1/3] drm/i915: gen7: implement rczunit workaround

Quoted 44 lines · Eugeni Dodonov

This is yet another workaround related to clock gating which we need on Ivy Bridge.

---
  drivers/gpu/drm/i915/i915_reg.h      |    1 +
  drivers/gpu/drm/i915/intel_display.c |   14 +++++++++++---
  2 files changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index c3afb78..80fd6b5 100644
@@ -3618,6 +3618,7 @@
  #define    GT_FIFO_NUM_RESERVED_ENTRIES		20
 
  #define GEN6_UCGCTL2				0x9404
+# define GEN6_RCZUNIT_CLOCK_GATE_DISABLE		(1<<  13)
  # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE		(1<<  12)
  # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE		(1<<  11)
 
drivers/gpu/drm/i915/intel_display.c +4 -3
index f1744aa..1defd42 100644
@@ -8396,6 +8396,7 @@ static void gen6_init_clock_gating(struct drm_device *dev)
  	struct drm_i915_private *dev_priv = dev->dev_private;
  	int pipe;
  	uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE;
+	u32 gstate;
 
  	I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
 
@@ -8416,10 +8417,17 @@ static void gen6_init_clock_gating(struct drm_device *dev)
  	 *
  	 * According to the spec, bit 11 (RCCUNIT) must also be set,
  	 * but we didn't debug actual testcases to find it out.
+	 *
+	 * The bit 13 (RCZUNIT) must also be set, to implement the
+	 * WaDisableRCZUnitClockGating workaround on Ivy Bridge.
  	 */
-	I915_WRITE(GEN6_UCGCTL2,
-		   GEN6_RCPBUNIT_CLOCK_GATE_DISABLE |
-		   GEN6_RCCUNIT_CLOCK_GATE_DISABLE);

drivers/gpu/drm/i915/intel_display.c static void gen6_init_clock_gating(struct drm_device *dev) · line 8433

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +7 -0
+	gstate = GEN6_RCPBUNIT_CLOCK_GATE_DISABLE |
+		GEN6_RCCUNIT_CLOCK_GATE_DISABLE;
+
+	if (IS_IVYBRIDGE(dev))
+		gstate |= GEN6_RCZUNIT_CLOCK_GATE_DISABLE;
+
+	I915_WRITE(GEN6_UCGCTL2, gstate);
 
  	/*
  	 * According to the spec the following bits should be

Nack. gen6_init_clock_gating won't get run on Ivybridge...

#11 lore raw

PATCH 2/3 drm/i915: gen7: add two more IVB workarounds

In reply to Eugeni Dodonov

This adds two cache-related workarounds for Ivy Bridge which can lead to 3D ring hangs and corruptions.

---
 drivers/gpu/drm/i915/i915_reg.h      |    7 +++++++
 drivers/gpu/drm/i915/intel_display.c |    6 ++++++
 2 files changed, 13 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +7 -0
index 80fd6b5..92274b1 100644
@@ -3028,6 +3028,13 @@
 #define  DISP_TILE_SURFACE_SWIZZLING	(1<<13)
 #define  DISP_FBC_WM_DIS		(1<<15)
 
+/* GEN7 chicken */
+#define GEN7_COMMON_SLICE_CHICKEN1			0x7010
+#define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C4FFF8C
+
+#define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
+#define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
+
 /* PCH */
 
 /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +6 -0
index 1defd42..eee0e75 100644
@@ -8475,6 +8475,12 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 		   CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE |
 		   CHICKEN3_DGMG_DONE_FIX_DISABLE);
 
+	/* WaApplyL3ControlAndL3ChickenMode requires those two on Ivy Bridge */
+	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
+			GEN7_WA_FOR_GEN7_L3_CONTROL);
+	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
+			GEN7_WA_L3_CHICKEN_MODE);
+
 	for_each_pipe(pipe) {
 		I915_WRITE(DSPCNTR(pipe),
 			   I915_READ(DSPCNTR(pipe)) |
Signature · 1 line
1.7.8.4
Reviewed-by on v1 2/3
#12 lore raw

Re: [PATCH 2/3] drm/i915: gen7: add two more IVB workarounds

Quoted 34 lines · Eugeni Dodonov

This adds two cache-related workarounds for Ivy Bridge which can lead to 3D ring hangs and corruptions.

---
  drivers/gpu/drm/i915/i915_reg.h      |    7 +++++++
  drivers/gpu/drm/i915/intel_display.c |    6 ++++++
  2 files changed, 13 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +7 -0
index 80fd6b5..92274b1 100644
@@ -3028,6 +3028,13 @@
  #define  DISP_TILE_SURFACE_SWIZZLING	(1<<13)
  #define  DISP_FBC_WM_DIS		(1<<15)
 
+/* GEN7 chicken */
+#define GEN7_COMMON_SLICE_CHICKEN1			0x7010
+#define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C4FFF8C
+
+#define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
+#define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
+
  /* PCH */
 
  /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +0 -0
index 1defd42..eee0e75 100644
@@ -8475,6 +8475,12 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
  		   CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE |
  		   CHICKEN3_DGMG_DONE_FIX_DISABLE);

drivers/gpu/drm/i915/intel_display.c static void ivybridge_init_clock_gating(struct drm_device *dev) · line 8486

Quoted 10 lines
drivers/gpu/drm/i915/intel_display.c +6 -0
 
+	/* WaApplyL3ControlAndL3ChickenMode requires those two on Ivy Bridge */
+	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
+			GEN7_WA_FOR_GEN7_L3_CONTROL);
+	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
+			GEN7_WA_L3_CHICKEN_MODE);
+
  	for_each_pipe(pipe) {
  		I915_WRITE(DSPCNTR(pipe),
  			   I915_READ(DSPCNTR(pipe)) |
#14 lore raw

PATCH 3/3 drm/i915: gen7: work around a system hang on IVB

In reply to Eugeni Dodonov

This adds the workaround for WaCatErrorRejectionIssue which could result in a system hang.

---
 drivers/gpu/drm/i915/i915_reg.h      |    4 ++++
 drivers/gpu/drm/i915/intel_display.c |    5 +++++
 2 files changed, 9 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +4 -0
index 92274b1..4f25cd5 100644
@@ -3035,6 +3035,10 @@
 #define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
 #define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
 
+/* WaCatErrorRejectionIssue */
+#define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
+#define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)
+
 /* PCH */
 
 /* south display engine interrupt */
drivers/gpu/drm/i915/intel_display.c +5 -0
index eee0e75..08c3292 100644
@@ -8481,6 +8481,11 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
 			GEN7_WA_L3_CHICKEN_MODE);
 
+	/* This is required by WaCatErrorRejectionIssue */
+	I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG,
+			I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) |
+			GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB);
+
 	for_each_pipe(pipe) {
 		I915_WRITE(DSPCNTR(pipe),
 			   I915_READ(DSPCNTR(pipe)) |
Signature · 1 line
1.7.8.4
Reviewed-by on v1 3/3
#15 lore raw

Re: [PATCH 3/3] drm/i915: gen7: work around a system hang on IVB

Quoted 15 lines · Eugeni Dodonov

This adds the workaround for WaCatErrorRejectionIssue which could result in a system hang.

---
 drivers/gpu/drm/i915/i915_reg.h      |    4 ++++
 drivers/gpu/drm/i915/intel_display.c |    5 +++++
 2 files changed, 9 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +0 -0
index 92274b1..4f25cd5 100644

drivers/gpu/drm/i915/i915_reg.h line 3040

Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -3035,6 +3035,10 @@
 #define GEN7_L3_CHICKEN_MODE_REGISTER		0xB030
 #define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
 
+/* WaCatErrorRejectionIssue */
+#define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG		0x9030
+#define  GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB	(1<<11)

In the BSpec, this is "SQCM" and they say "9030" not "9030h" like normal, so it was hard to search for. Also, I'm not sure what SQINTMOB is supposed to mean. The bit is named "Rejection FifoFlush Disable" in the docs I can find.

I'd like to see the names fixed up so that we can find them again later, but other than that,

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

#16 lore raw

Re: [PATCH 0/3] Ivy Bridge hard-hang fixes

In reply to Eugeni Dodonov
Quoted 5 lines · Eugeni Dodonov

Hi,

this is a set of patches which should fix hard-hangs for Ivy Bridge in different workloads, among which GLBenchmark Egypt is the most notable one.

Quoted 8 lines

It also seems to solve random hard-hangs in other applications (the ones I've seen the most are in World of Padman, Unigine games and Nexuiz).

Eugeni Dodonov (3):
drm/i915: gen7: implement rczunit workaround drm/i915: gen7: add two more IVB workarounds drm/i915: gen7: work around a system hang on IVB

Would be nice if the summary lines for these patches was a bit more descriptive...

Also, 3/3 has a Rb line from Ken, but I don't see the mail from him with that.

These look like -fixes material; is there someone already reviewing 1/3 so I can get them upstreamed soon?

Signature · 1 line
[email protected]

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

#17 lore raw

Re: [PATCH 0/3] Ivy Bridge hard-hang fixes

Quoted 3 lines · Keith Packard

Would be nice if the summary lines for these patches was a bit more
descriptive...

Yes, makes sense, I'll update it.

Quoted 4 lines

Also, 3/3 has a Rb line from Ken, but I don't see the mail from him with that.

It is from Message-ID: <[email protected]>

I'll update patch1 with Ken's comments and resend with better summaries.

Signature · 2 lines
Eugeni Dodonov
<http://eugeni.dodonov.net/>

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