public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 00/30] drm/i915: Lots of workaround changes
@ 2013-07-05 13:48 ville.syrjala
  2013-07-05 13:48 ` [PATCH 01/30] drm/i915: We implement WaDisableL3Bank2xClockGate:vlv ville.syrjala
                   ` (30 more replies)
  0 siblings, 31 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

I was going over the workaround database with VLV mainly in mind, but I
ended up stumbling on quite a few others as well.

This series adds the workarounds names in a bunch of places where we
missed them, adds a few workarounds we seem to have missed, drops some
that were never supposed to be there, and drops quite a few pre-production
workarounds.

I'm not sure we want to drop some of the VLV workarounds quite yet. I know
Jani will hate me when he comes back from vacation since his current machine
would be affected.

I've run these on my VLV and IVB machines, and didn't spot any problems.
The SNB and HSW ones I've not actually tested.

^ permalink raw reply	[flat|nested] 37+ messages in thread

* [PATCH 01/30] drm/i915: We implement WaDisableL3Bank2xClockGate:vlv
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 02/30] drm/i915: We implement WaGsvBringDownFreqInRc6:vlv ville.syrjala
                   ` (29 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index f675215..15c9c3b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4887,6 +4887,7 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 		   GEN6_RCPBUNIT_CLOCK_GATE_DISABLE |
 		   GEN6_RCCUNIT_CLOCK_GATE_DISABLE);
 
+	/* WaDisableL3Bank2xClockGate:vlv */
 	I915_WRITE(GEN7_UCGCTL4, GEN7_L3BANK2X_CLOCK_GATE_DISABLE);
 
 	I915_WRITE(MI_ARB_VLV, MI_ARB_DISPLAY_TRICKLE_FEED_DISABLE);
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 02/30] drm/i915: We implement WaGsvBringDownFreqInRc6:vlv
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
  2013-07-05 13:48 ` [PATCH 01/30] drm/i915: We implement WaDisableL3Bank2xClockGate:vlv ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 03/30] drm/i915: We implement WaEnableVGAAccessThroughIOPort:ctg, elk, ilk, snb, ivb, vlv, hsw ville.syrjala
                   ` (28 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaGsvBringDownFreqInRc6:vlv tells us to switch to RPe from a timer.
Which is what we do.

There's another workaround by the name of
WaGsvBringDownFreqBeforeRenderRC6:vlv which instructs us to keep render
always awake, and then drop the freq to 200MHz and allow RC6 just before
entering D3. That doesn't sound as nice, especially since we don't
have runtime PM yet.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 15c9c3b..a160b4c 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3451,6 +3451,8 @@ static void vlv_rps_timer_work(struct work_struct *work)
 	 * Vmin we were shooting for.  That should give us better
 	 * perf when we come back out of RC6 than if we used the
 	 * min freq available.
+	 *
+	 * WaGsvBringDownFreqInRc6:vlv
 	 */
 	mutex_lock(&dev_priv->rps.hw_lock);
 	if (dev_priv->rps.cur_delay > dev_priv->rps.rpe_delay)
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 03/30] drm/i915: We implement WaEnableVGAAccessThroughIOPort:ctg, elk, ilk, snb, ivb, vlv, hsw
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
  2013-07-05 13:48 ` [PATCH 01/30] drm/i915: We implement WaDisableL3Bank2xClockGate:vlv ville.syrjala
  2013-07-05 13:48 ` [PATCH 02/30] drm/i915: We implement WaGsvBringDownFreqInRc6:vlv ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 04/30] drm/i915: WaPsdDispatchEnable seems to be another name for WaDisablePSDDualDispatchEnable ville.syrjala
                   ` (27 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 76796b1..fc2af13 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9624,6 +9624,7 @@ static void i915_disable_vga(struct drm_device *dev)
 	u8 sr1;
 	u32 vga_reg = i915_vgacntrl_reg(dev);
 
+	/* WaEnableVGAAccessThroughIOPort:ctg,elk,ilk,snb,ivb,vlv,hsw */
 	vga_get_uninterruptible(dev->pdev, VGA_RSRC_LEGACY_IO);
 	outb(SR01, VGA_SR_INDEX);
 	sr1 = inb(VGA_SR_DATA);
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 04/30] drm/i915: WaPsdDispatchEnable seems to be another name for WaDisablePSDDualDispatchEnable
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (2 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 03/30] drm/i915: We implement WaEnableVGAAccessThroughIOPort:ctg, elk, ilk, snb, ivb, vlv, hsw ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 05/30] drm/i915: We implement WaDisableL3CacheAging:vlv ville.syrjala
                   ` (26 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The w/a database lists both WaPsdDispatchEnable and
WaDisablePSDDualDispatchEnable for VLV. They appear to be the same
thing, so list both names.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index a160b4c..9a562aa 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4835,6 +4835,7 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 		   CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE |
 		   CHICKEN3_DGMG_DONE_FIX_DISABLE);
 
+	/* WaPsdDispatchEnable:vlv */
 	/* WaDisablePSDDualDispatchEnable:vlv */
 	I915_WRITE(GEN7_HALF_SLICE_CHICKEN1,
 		   _MASKED_BIT_ENABLE(GEN7_MAX_PS_THREAD_DEP |
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 05/30] drm/i915: We implement WaDisableL3CacheAging:vlv
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (3 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 04/30] drm/i915: WaPsdDispatchEnable seems to be another name for WaDisablePSDDualDispatchEnable ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 06/30] drm/i915: We implement WaDisableDopClockGating:ivb ville.syrjala
                   ` (25 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 9a562aa..2884a32 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4845,8 +4845,9 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
 		   GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC);
 
-	/* WaApplyL3ControlAndL3ChickenMode:vlv */
+	/* WaDisableL3CacheAging:vlv */
 	I915_WRITE(GEN7_L3CNTLREG1, I915_READ(GEN7_L3CNTLREG1) | GEN7_L3AGDIS);
+	/* WaApplyL3ControlAndL3ChickenMode:vlv */
 	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER, GEN7_WA_L3_CHICKEN_MODE);
 
 	/* WaForceL3Serialization:vlv */
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 06/30] drm/i915: We implement WaDisableDopClockGating:ivb
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (4 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 05/30] drm/i915: We implement WaDisableL3CacheAging:vlv ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 07/30] drm/i915: We implement WaDisableRCCUnitClockGating:snb ville.syrjala
                   ` (24 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 2884a32..69d4693 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4762,6 +4762,8 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 			GEN7_WA_FOR_GEN7_L3_CONTROL);
 	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
 		   GEN7_WA_L3_CHICKEN_MODE);
+
+	/* WaDisableDopClockGating:ivb */
 	if (IS_IVB_GT1(dev))
 		I915_WRITE(GEN7_ROW_CHICKEN2,
 			   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 07/30] drm/i915: We implement WaDisableRCCUnitClockGating:snb
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (5 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 06/30] drm/i915: We implement WaDisableDopClockGating:ivb ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 08/30] drm/i915: We implement WaMiSetContext_Hang ville.syrjala
                   ` (23 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 69d4693..b6d8d81 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4581,6 +4581,7 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 	 * but we didn't debug actual testcases to find it out.
 	 *
 	 * Also apply WaDisableVDSUnitClockGating:snb and
+	 * WaDisableRCCUnitClockGating:snb and
 	 * WaDisableRCPBUnitClockGating:snb.
 	 */
 	I915_WRITE(GEN6_UCGCTL2,
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 08/30] drm/i915: We implement WaMiSetContext_Hang
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (6 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 07/30] drm/i915: We implement WaDisableRCCUnitClockGating:snb ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 14:05   ` Chris Wilson
  2013-07-05 13:48 ` [PATCH 09/30] drm/i915: Rename GEN7_MISCCPCTL to GEN6_MISCCPCTL ville.syrjala
                   ` (22 subsequent siblings)
  30 siblings, 1 reply; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaMiSetContext_Hang tells us that a MI_NOOP must follow MI_SET_CONTEXT.

The other thing WaMiSetContext_Hang seems to say is that URB_FENCE isn't
allowed to straddle two cachelines. But we don't issue those from the
kernel so we don't care.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem_context.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 51b7a21..8ba2e2b 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -382,7 +382,10 @@ mi_set_context(struct intel_ring_buffer *ring,
 			MI_SAVE_EXT_STATE_EN |
 			MI_RESTORE_EXT_STATE_EN |
 			hw_flags);
-	/* w/a: MI_SET_CONTEXT must always be followed by MI_NOOP */
+	/*
+	 * w/a: MI_SET_CONTEXT must always be followed by MI_NOOP
+	 * WaMiSetContext_Hang:snb,ivb,vlv
+	 */
 	intel_ring_emit(ring, MI_NOOP);
 
 	if (IS_GEN7(ring->dev))
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 09/30] drm/i915: Rename GEN7_MISCCPCTL to GEN6_MISCCPCTL
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (7 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 08/30] drm/i915: We implement WaMiSetContext_Hang ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 10/30] drm/i915: Implement WaDisableDopClockGating:snb ville.syrjala
                   ` (21 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

This register exists already on SNB.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c   | 8 ++++----
 drivers/gpu/drm/i915/i915_irq.c   | 8 ++++----
 drivers/gpu/drm/i915/i915_reg.h   | 4 ++--
 drivers/gpu/drm/i915/i915_sysfs.c | 6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4200c32..83eebfa 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4039,9 +4039,9 @@ void i915_gem_l3_remap(struct drm_device *dev)
 	if (!dev_priv->l3_parity.remap_info)
 		return;
 
-	misccpctl = I915_READ(GEN7_MISCCPCTL);
-	I915_WRITE(GEN7_MISCCPCTL, misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE);
-	POSTING_READ(GEN7_MISCCPCTL);
+	misccpctl = I915_READ(GEN6_MISCCPCTL);
+	I915_WRITE(GEN6_MISCCPCTL, misccpctl & ~GEN6_DOP_CLOCK_GATE_ENABLE);
+	POSTING_READ(GEN6_MISCCPCTL);
 
 	for (i = 0; i < GEN7_L3LOG_SIZE; i += 4) {
 		u32 remap = I915_READ(GEN7_L3LOG_BASE + i);
@@ -4056,7 +4056,7 @@ void i915_gem_l3_remap(struct drm_device *dev)
 	/* Make sure all the writes land before disabling dop clock gating */
 	POSTING_READ(GEN7_L3LOG_BASE);
 
-	I915_WRITE(GEN7_MISCCPCTL, misccpctl);
+	I915_WRITE(GEN6_MISCCPCTL, misccpctl);
 }
 
 void i915_gem_init_swizzling(struct drm_device *dev)
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 4c1b1e3..08a1c4c 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -765,9 +765,9 @@ static void ivybridge_parity_work(struct work_struct *work)
 	 */
 	mutex_lock(&dev_priv->dev->struct_mutex);
 
-	misccpctl = I915_READ(GEN7_MISCCPCTL);
-	I915_WRITE(GEN7_MISCCPCTL, misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE);
-	POSTING_READ(GEN7_MISCCPCTL);
+	misccpctl = I915_READ(GEN6_MISCCPCTL);
+	I915_WRITE(GEN6_MISCCPCTL, misccpctl & ~GEN6_DOP_CLOCK_GATE_ENABLE);
+	POSTING_READ(GEN6_MISCCPCTL);
 
 	error_status = I915_READ(GEN7_L3CDERRST1);
 	row = GEN7_PARITY_ERROR_ROW(error_status);
@@ -778,7 +778,7 @@ static void ivybridge_parity_work(struct work_struct *work)
 				    GEN7_L3CDERRST1_ENABLE);
 	POSTING_READ(GEN7_L3CDERRST1);
 
-	I915_WRITE(GEN7_MISCCPCTL, misccpctl);
+	I915_WRITE(GEN6_MISCCPCTL, misccpctl);
 
 	spin_lock_irqsave(&dev_priv->irq_lock, flags);
 	dev_priv->gt_irq_mask &= ~GT_RENDER_L3_PARITY_ERROR_INTERRUPT;
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index af8b0eb..035ae03 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -4593,8 +4593,8 @@
 #define   GEN6_RC6			3
 #define   GEN6_RC7			4
 
-#define GEN7_MISCCPCTL			(0x9424)
-#define   GEN7_DOP_CLOCK_GATE_ENABLE	(1<<0)
+#define GEN6_MISCCPCTL			(0x9424)
+#define   GEN6_DOP_CLOCK_GATE_ENABLE	(1<<0)
 
 /* IVYBRIDGE DPF */
 #define GEN7_L3CDERRST1			0xB008 /* L3CD Error Status 1 */
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index a777e7f..036fb26 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -129,13 +129,13 @@ i915_l3_read(struct file *filp, struct kobject *kobj,
 	if (ret)
 		return ret;
 
-	misccpctl = I915_READ(GEN7_MISCCPCTL);
-	I915_WRITE(GEN7_MISCCPCTL, misccpctl & ~GEN7_DOP_CLOCK_GATE_ENABLE);
+	misccpctl = I915_READ(GEN6_MISCCPCTL);
+	I915_WRITE(GEN6_MISCCPCTL, misccpctl & ~GEN6_DOP_CLOCK_GATE_ENABLE);
 
 	for (i = offset; count >= 4 && i < GEN7_L3LOG_SIZE; i += 4, count -= 4)
 		*((uint32_t *)(&buf[i])) = I915_READ(GEN7_L3LOG_BASE + i);
 
-	I915_WRITE(GEN7_MISCCPCTL, misccpctl);
+	I915_WRITE(GEN6_MISCCPCTL, misccpctl);
 
 	mutex_unlock(&drm_dev->struct_mutex);
 
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 10/30] drm/i915: Implement WaDisableDopClockGating:snb
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (8 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 09/30] drm/i915: Rename GEN7_MISCCPCTL to GEN6_MISCCPCTL ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 19:49   ` Ben Widawsky
  2013-08-01 14:58   ` Ville Syrjälä
  2013-07-05 13:48 ` [PATCH 11/30] drm/i915: Fix IVB GT2 WaDisableDopClockGating and WaDisablePSDDualDispatchEnable ville.syrjala
                   ` (20 subsequent siblings)
  30 siblings, 2 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Certain SNB steppings need to disable DOP clock gating, and the only
way to do that is to use the MISCCPCTL register.

Just disable it for every SNB, and then I suppose we may not have to
worry about WaRevertDopClockGateFix2.

There's also another seemingly related workaround called
WaForTogglingDopClkGatingBit, but there are no details to explain what
needs to be done.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index b6d8d81..d18fb39 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4565,6 +4565,10 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(CACHE_MODE_0,
 		   _MASKED_BIT_DISABLE(CM0_STC_EVICT_DISABLE_LRA_SNB));
 
+	/* WaDisableDopClockGating:snb */
+	I915_WRITE(GEN6_MISCCPCTL, I915_READ(GEN6_MISCCPCTL) &
+		   ~GEN6_DOP_CLOCK_GATE_ENABLE);
+
 	I915_WRITE(GEN6_UCGCTL1,
 		   I915_READ(GEN6_UCGCTL1) |
 		   GEN6_BLBUNIT_CLOCK_GATE_DISABLE |
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 11/30] drm/i915: Fix IVB GT2 WaDisableDopClockGating and WaDisablePSDDualDispatchEnable
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (9 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 10/30] drm/i915: Implement WaDisableDopClockGating:snb ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 12/30] drm/i915: Drop WaDisablePSDDualDispatchEnable:ivb for IVB GT2 ville.syrjala
                   ` (19 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

IVB GT2 has two registers for these things, and both must be written.

To add a bit more confusion both Bspec and the W/A database state that
WaDisablePSDDualDispatchEnable is only needed for IVB GT1, but the W/A
database also says to write even the second GT2 only register. So I
don't really know what the right thing here is.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index d18fb39..530eb6b 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4754,9 +4754,13 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	if (IS_IVB_GT1(dev))
 		I915_WRITE(GEN7_HALF_SLICE_CHICKEN1,
 			   _MASKED_BIT_ENABLE(GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE));
-	else
+	else {
+		/* must write both registers */
+		I915_WRITE(GEN7_HALF_SLICE_CHICKEN1,
+			   _MASKED_BIT_ENABLE(GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE));
 		I915_WRITE(GEN7_HALF_SLICE_CHICKEN1_GT2,
 			   _MASKED_BIT_ENABLE(GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE));
+	}
 
 	/* Apply the WaDisableRHWOOptimizationForRenderHang:ivb workaround. */
 	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
@@ -4772,10 +4776,13 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	if (IS_IVB_GT1(dev))
 		I915_WRITE(GEN7_ROW_CHICKEN2,
 			   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
-	else
+	else {
+		/* must write both registers */
+		I915_WRITE(GEN7_ROW_CHICKEN2,
+			   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
 		I915_WRITE(GEN7_ROW_CHICKEN2_GT2,
 			   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
-
+	}
 
 	/* WaForceL3Serialization:ivb */
 	I915_WRITE(GEN7_L3SQCREG4, I915_READ(GEN7_L3SQCREG4) &
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 12/30] drm/i915: Drop WaDisablePSDDualDispatchEnable:ivb for IVB GT2
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (10 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 11/30] drm/i915: Fix IVB GT2 WaDisableDopClockGating and WaDisablePSDDualDispatchEnable ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 13/30] drm/i915: Implement WaIncreaseL3CreditsForVLVB0:vlv ville.syrjala
                   ` (18 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Both Bspec and the W/A database state that WaDisablePSDDualDispatchEnable
is only needed for IVB GT1.

The only real confusion here is that the the W/A database also says to
write to the GT2 only register as well, which is strange if the W/A is
only for GT1.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 530eb6b..fe7f147 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4754,13 +4754,6 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	if (IS_IVB_GT1(dev))
 		I915_WRITE(GEN7_HALF_SLICE_CHICKEN1,
 			   _MASKED_BIT_ENABLE(GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE));
-	else {
-		/* must write both registers */
-		I915_WRITE(GEN7_HALF_SLICE_CHICKEN1,
-			   _MASKED_BIT_ENABLE(GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE));
-		I915_WRITE(GEN7_HALF_SLICE_CHICKEN1_GT2,
-			   _MASKED_BIT_ENABLE(GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE));
-	}
 
 	/* Apply the WaDisableRHWOOptimizationForRenderHang:ivb workaround. */
 	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 13/30] drm/i915: Implement WaIncreaseL3CreditsForVLVB0:vlv
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (11 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 12/30] drm/i915: Drop WaDisablePSDDualDispatchEnable:ivb for IVB GT2 ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 14/30] drm/i915: WaDisableVDSUnitClockGating isn't applicable to SNB ville.syrjala
                   ` (17 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_reg.h | 3 +++
 drivers/gpu/drm/i915/intel_pm.c | 6 ++++++
 2 files changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 035ae03..29172fb 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -3775,6 +3775,9 @@
 #define GEN7_COMMON_SLICE_CHICKEN1		0x7010
 # define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC	((1<<10) | (1<<26))
 
+#define GEN7_L3SQCREG1				0xB010
+#define  VLV_B0_WA_L3SQCREG1_VALUE		0x00D30000
+
 #define GEN7_L3CNTLREG1				0xB01C
 #define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C4FFF8C
 #define  GEN7_L3AGDIS				(1<<19)
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index fe7f147..4483c25 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4907,6 +4907,12 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 		   _MASKED_BIT_ENABLE(PIXEL_SUBSPAN_COLLECT_OPT_DISABLE));
 
 	/*
+	 * WaIncreaseL3CreditsForVLVB0:vlv
+	 * This is the hardware default actually.
+	 */
+	I915_WRITE(GEN7_L3SQCREG1, VLV_B0_WA_L3SQCREG1_VALUE);
+
+	/*
 	 * WaDisableVLVClockGating_VBIIssue:vlv
 	 * Disable clock gating on th GCFG unit to prevent a delay
 	 * in the reporting of vblank events.
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 14/30] drm/i915: WaDisableVDSUnitClockGating isn't applicable to SNB
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (12 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 13/30] drm/i915: Implement WaIncreaseL3CreditsForVLVB0:vlv ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 15/30] drm/i915: WaDisableRCCUnitClockGating isn't applicable to IVB ville.syrjala
                   ` (16 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Can't find any mention of WaDisableVDSUnitClockGating ever being
relevant for SNB. Remove it.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 4483c25..b24a4c2 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4584,12 +4584,10 @@ 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.
 	 *
-	 * Also apply WaDisableVDSUnitClockGating:snb and
-	 * WaDisableRCCUnitClockGating:snb and
-	 * WaDisableRCPBUnitClockGating:snb.
+	 * WaDisableRCCUnitClockGating:snb
+	 * WaDisableRCPBUnitClockGating:snb
 	 */
 	I915_WRITE(GEN6_UCGCTL2,
-		   GEN7_VDSUNIT_CLOCK_GATE_DISABLE |
 		   GEN6_RCPBUNIT_CLOCK_GATE_DISABLE |
 		   GEN6_RCCUNIT_CLOCK_GATE_DISABLE);
 
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 15/30] drm/i915: WaDisableRCCUnitClockGating isn't applicable to IVB
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (13 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 14/30] drm/i915: WaDisableVDSUnitClockGating isn't applicable to SNB ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 16/30] drm/i915: WaDisableRCCUnitClockGating isn't applicaple to VLV ville.syrjala
                   ` (15 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaDisableRCCUnitClockGating is only relevant for SNB.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index b24a4c2..576f648 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4786,15 +4786,11 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	 * Sanctuary and Tropics, and apparently anything else with
 	 * alpha test or pixel discard.
 	 *
-	 * According to the spec, bit 11 (RCCUNIT) must also be set,
-	 * but we didn't debug actual testcases to find it out.
-	 *
 	 * According to the spec, bit 13 (RCZUNIT) must be set on IVB.
 	 * This implements the WaDisableRCZUnitClockGating:ivb workaround.
 	 */
 	I915_WRITE(GEN6_UCGCTL2,
-		   GEN6_RCZUNIT_CLOCK_GATE_DISABLE |
-		   GEN6_RCCUNIT_CLOCK_GATE_DISABLE);
+		   GEN6_RCZUNIT_CLOCK_GATE_DISABLE);
 
 	/* This is required by WaCatErrorRejectionIssue:ivb */
 	I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG,
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 16/30] drm/i915: WaDisableRCCUnitClockGating isn't applicaple to VLV
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (14 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 15/30] drm/i915: WaDisableRCCUnitClockGating isn't applicable to IVB ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 17/30] drm/i915: WaDisableRHWOOptimizationForRenderHang isn't applicable to HSW ville.syrjala
                   ` (14 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaDisableRCCUnitClockGating is only relevant for SNB.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 576f648..82665d5 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4876,9 +4876,6 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 	 * Sanctuary and Tropics, and apparently anything else with
 	 * alpha test or pixel discard.
 	 *
-	 * According to the spec, bit 11 (RCCUNIT) must also be set,
-	 * but we didn't debug actual testcases to find it out.
-	 *
 	 * According to the spec, bit 13 (RCZUNIT) must be set on IVB.
 	 * This implements the WaDisableRCZUnitClockGating:vlv workaround.
 	 *
@@ -4889,8 +4886,7 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 		   GEN7_VDSUNIT_CLOCK_GATE_DISABLE |
 		   GEN7_TDLUNIT_CLOCK_GATE_DISABLE |
 		   GEN6_RCZUNIT_CLOCK_GATE_DISABLE |
-		   GEN6_RCPBUNIT_CLOCK_GATE_DISABLE |
-		   GEN6_RCCUNIT_CLOCK_GATE_DISABLE);
+		   GEN6_RCPBUNIT_CLOCK_GATE_DISABLE);
 
 	/* WaDisableL3Bank2xClockGate:vlv */
 	I915_WRITE(GEN7_UCGCTL4, GEN7_L3BANK2X_CLOCK_GATE_DISABLE);
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 17/30] drm/i915: WaDisableRHWOOptimizationForRenderHang isn't applicable to HSW
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (15 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 16/30] drm/i915: WaDisableRCCUnitClockGating isn't applicaple to VLV ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 18/30] drm/i915: WaDisableRHWOOptimizationForRenderHang isn't applicable to VLV ville.syrjala
                   ` (13 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Can't find WaDisableRHWOOptimizationForRenderHang listed for HSW.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 82665d5..22f1053 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4690,10 +4690,6 @@ static void haswell_init_clock_gating(struct drm_device *dev)
 	 */
 	I915_WRITE(GEN6_UCGCTL2, GEN6_RCZUNIT_CLOCK_GATE_DISABLE);
 
-	/* Apply the WaDisableRHWOOptimizationForRenderHang:hsw workaround. */
-	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
-		   GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC);
-
 	/* WaApplyL3ControlAndL3ChickenMode:hsw */
 	I915_WRITE(GEN7_L3CNTLREG1,
 			GEN7_WA_FOR_GEN7_L3_CONTROL);
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 18/30] drm/i915: WaDisableRHWOOptimizationForRenderHang isn't applicable to VLV
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (16 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 17/30] drm/i915: WaDisableRHWOOptimizationForRenderHang isn't applicable to HSW ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 19/30] drm/i915: WaApplyL3ControlAndL3ChickenMode isn't applicable for VLV ville.syrjala
                   ` (12 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Can't find WaDisableRHWOOptimizationForRenderHang listed for VLV.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 22f1053..40393ef 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4838,10 +4838,6 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 		   _MASKED_BIT_ENABLE(GEN7_MAX_PS_THREAD_DEP |
 				      GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE));
 
-	/* Apply the WaDisableRHWOOptimizationForRenderHang:vlv workaround. */
-	I915_WRITE(GEN7_COMMON_SLICE_CHICKEN1,
-		   GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC);
-
 	/* WaDisableL3CacheAging:vlv */
 	I915_WRITE(GEN7_L3CNTLREG1, I915_READ(GEN7_L3CNTLREG1) | GEN7_L3AGDIS);
 	/* WaApplyL3ControlAndL3ChickenMode:vlv */
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 19/30] drm/i915: WaApplyL3ControlAndL3ChickenMode isn't applicable for VLV
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (17 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 18/30] drm/i915: WaDisableRHWOOptimizationForRenderHang isn't applicable to VLV ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 20/30] drm/i915: Drop bogus comment about RCPB unit clock gating on IVB ville.syrjala
                   ` (11 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaApplyL3ControlAndL3ChickenMode is only listed for IVB and HSW in
W/A database and BSpec.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 40393ef..6303041 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4840,8 +4840,6 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 
 	/* WaDisableL3CacheAging:vlv */
 	I915_WRITE(GEN7_L3CNTLREG1, I915_READ(GEN7_L3CNTLREG1) | GEN7_L3AGDIS);
-	/* WaApplyL3ControlAndL3ChickenMode:vlv */
-	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER, GEN7_WA_L3_CHICKEN_MODE);
 
 	/* WaForceL3Serialization:vlv */
 	I915_WRITE(GEN7_L3SQCREG4, I915_READ(GEN7_L3SQCREG4) &
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 20/30] drm/i915: Drop bogus comment about RCPB unit clock gating on IVB
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (18 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 19/30] drm/i915: WaApplyL3ControlAndL3ChickenMode isn't applicable for VLV ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 21/30] drm/i915: Drop WaDisableRCZUnitClockGating:hsw ville.syrjala
                   ` (10 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Someone copy pasted the comment from the SNB code w/o reading it.
We never actually implemented the workaround to disable RCPB unit
clock gating on IVB. It would have been needed for early steppings,
but we don't care about those anymore, so just remove the stale
comment.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 6303041..d8f60e2 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4775,13 +4775,7 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_L3SQCREG4, I915_READ(GEN7_L3SQCREG4) &
 		   ~L3SQ_URB_READ_CAM_MATCH_DISABLE);
 
-	/* According to the BSpec vol1g, bit 12 (RCPBUNIT) clock
-	 * gating disable must be set.  Failure to set it results in
-	 * flickering pixels due to Z write ordering failures after
-	 * some amount of runtime in the Mesa "fire" demo, and Unigine
-	 * Sanctuary and Tropics, and apparently anything else with
-	 * alpha test or pixel discard.
-	 *
+	/*
 	 * According to the spec, bit 13 (RCZUNIT) must be set on IVB.
 	 * This implements the WaDisableRCZUnitClockGating:ivb workaround.
 	 */
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 21/30] drm/i915: Drop WaDisableRCZUnitClockGating:hsw
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (19 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 20/30] drm/i915: Drop bogus comment about RCPB unit clock gating on IVB ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 22/30] drm/i915: Drop WaApplyL3ControlAndL3ChickenMode:hsw ville.syrjala
                   ` (9 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaDisableRCZUnitClockGating was needed with early HSW steppings only.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index d8f60e2..8b6d3b3 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4685,11 +4685,6 @@ static void haswell_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(WM2_LP_ILK, 0);
 	I915_WRITE(WM1_LP_ILK, 0);
 
-	/* According to the spec, bit 13 (RCZUNIT) must be set on IVB.
-	 * This implements the WaDisableRCZUnitClockGating:hsw workaround.
-	 */
-	I915_WRITE(GEN6_UCGCTL2, GEN6_RCZUNIT_CLOCK_GATE_DISABLE);
-
 	/* WaApplyL3ControlAndL3ChickenMode:hsw */
 	I915_WRITE(GEN7_L3CNTLREG1,
 			GEN7_WA_FOR_GEN7_L3_CONTROL);
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 22/30] drm/i915: Drop WaApplyL3ControlAndL3ChickenMode:hsw
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (20 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 21/30] drm/i915: Drop WaDisableRCZUnitClockGating:hsw ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 23/30] drm/i915: Drop WaDisableRCPBUnitClockGating:vlv ville.syrjala
                   ` (8 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaApplyL3ControlAndL3ChickenMode is only relevant to early HSW
steppings..

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 8b6d3b3..9cf09c6 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4685,12 +4685,6 @@ static void haswell_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(WM2_LP_ILK, 0);
 	I915_WRITE(WM1_LP_ILK, 0);
 
-	/* WaApplyL3ControlAndL3ChickenMode:hsw */
-	I915_WRITE(GEN7_L3CNTLREG1,
-			GEN7_WA_FOR_GEN7_L3_CONTROL);
-	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
-			GEN7_WA_L3_CHICKEN_MODE);
-
 	/* This is required by WaCatErrorRejectionIssue:hsw */
 	I915_WRITE(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG,
 			I915_READ(GEN7_SQ_CHICKEN_MBCUNIT_CONFIG) |
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 23/30] drm/i915: Drop WaDisableRCPBUnitClockGating:vlv
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (21 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 22/30] drm/i915: Drop WaApplyL3ControlAndL3ChickenMode:hsw ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 24/30] drm/i915: Drop WaDisableVDSUtnitClockGating:vlv ville.syrjala
                   ` (7 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Only early VLV steppings needed thist. Should no longer be relevant.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 9cf09c6..b11bb70 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4842,24 +4842,16 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 		   GEN6_MBCTL_ENABLE_BOOT_FETCH);
 
 
-	/* According to the BSpec vol1g, bit 12 (RCPBUNIT) clock
-	 * gating disable must be set.  Failure to set it results in
-	 * flickering pixels due to Z write ordering failures after
-	 * some amount of runtime in the Mesa "fire" demo, and Unigine
-	 * Sanctuary and Tropics, and apparently anything else with
-	 * alpha test or pixel discard.
-	 *
+	/*
 	 * According to the spec, bit 13 (RCZUNIT) must be set on IVB.
 	 * This implements the WaDisableRCZUnitClockGating:vlv workaround.
 	 *
-	 * Also apply WaDisableVDSUnitClockGating:vlv and
-	 * WaDisableRCPBUnitClockGating:vlv.
+	 * Also apply WaDisableVDSUnitClockGating:vlv.
 	 */
 	I915_WRITE(GEN6_UCGCTL2,
 		   GEN7_VDSUNIT_CLOCK_GATE_DISABLE |
 		   GEN7_TDLUNIT_CLOCK_GATE_DISABLE |
-		   GEN6_RCZUNIT_CLOCK_GATE_DISABLE |
-		   GEN6_RCPBUNIT_CLOCK_GATE_DISABLE);
+		   GEN6_RCZUNIT_CLOCK_GATE_DISABLE);
 
 	/* WaDisableL3Bank2xClockGate:vlv */
 	I915_WRITE(GEN7_UCGCTL4, GEN7_L3BANK2X_CLOCK_GATE_DISABLE);
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 24/30] drm/i915: Drop WaDisableVDSUtnitClockGating:vlv
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (22 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 23/30] drm/i915: Drop WaDisableRCPBUnitClockGating:vlv ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 25/30] drm/i915: Drop WaDisableTDLUnitClockGating:vlv ville.syrjala
                   ` (6 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaDisableVDSUtnitClockGating was only relevant for early steepings of
VLV.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index b11bb70..9153e6d 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4845,11 +4845,8 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 	/*
 	 * According to the spec, bit 13 (RCZUNIT) must be set on IVB.
 	 * This implements the WaDisableRCZUnitClockGating:vlv workaround.
-	 *
-	 * Also apply WaDisableVDSUnitClockGating:vlv.
 	 */
 	I915_WRITE(GEN6_UCGCTL2,
-		   GEN7_VDSUNIT_CLOCK_GATE_DISABLE |
 		   GEN7_TDLUNIT_CLOCK_GATE_DISABLE |
 		   GEN6_RCZUNIT_CLOCK_GATE_DISABLE);
 
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 25/30] drm/i915: Drop WaDisableTDLUnitClockGating:vlv
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (23 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 24/30] drm/i915: Drop WaDisableVDSUtnitClockGating:vlv ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 26/30] drm/i915: gen7_setup_fixed_func_scheduler() actually implements WaVSThreadDispatchOverride ville.syrjala
                   ` (5 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaDisableTDLUnitClockGating is only relevant for early steppings of VLV.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 9153e6d..847f6dc 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4847,7 +4847,6 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 	 * This implements the WaDisableRCZUnitClockGating:vlv workaround.
 	 */
 	I915_WRITE(GEN6_UCGCTL2,
-		   GEN7_TDLUNIT_CLOCK_GATE_DISABLE |
 		   GEN6_RCZUNIT_CLOCK_GATE_DISABLE);
 
 	/* WaDisableL3Bank2xClockGate:vlv */
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 26/30] drm/i915: gen7_setup_fixed_func_scheduler() actually implements WaVSThreadDispatchOverride
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (24 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 25/30] drm/i915: Drop WaDisableTDLUnitClockGating:vlv ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 27/30] drm/i915: Don't apply WaVSThreadDispatchOverride on HSW ville.syrjala
                   ` (4 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

The current comments indicate that this function implements
WaVSRefCountFullforceMissDisable, which is only true for HSW.
The original purpose of the function is to implement
WaVSThreadDispatchOverride (and a bit more). Fix up the comments
to match reality.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 847f6dc..4ab8aeb 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4635,11 +4635,18 @@ static void gen7_setup_fixed_func_scheduler(struct drm_i915_private *dev_priv)
 {
 	uint32_t reg = I915_READ(GEN7_FF_THREAD_MODE);
 
+	/*
+	 * WaVSThreadDispatchOverride:ivb,hsw
+	 *
+	 * This actually overrides the dispatch
+	 * mode for all thread types.
+	 */
 	reg &= ~GEN7_FF_SCHED_MASK;
 	reg |= GEN7_FF_TS_SCHED_HW;
 	reg |= GEN7_FF_VS_SCHED_HW;
 	reg |= GEN7_FF_DS_SCHED_HW;
 
+	/* WaVSRefCountFullforceMissDisable:hsw */
 	if (IS_HASWELL(dev_priv->dev))
 		reg &= ~GEN7_FF_VS_REF_CNT_FFME;
 
@@ -4692,7 +4699,6 @@ static void haswell_init_clock_gating(struct drm_device *dev)
 
 	g4x_disable_trickle_feed(dev);
 
-	/* WaVSRefCountFullforceMissDisable:hsw */
 	gen7_setup_fixed_func_scheduler(dev_priv);
 
 	/* WaDisable4x2SubspanOptimization:hsw */
@@ -4782,7 +4788,6 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN6_MBCTL, I915_READ(GEN6_MBCTL) |
 		   GEN6_MBCTL_ENABLE_BOOT_FETCH);
 
-	/* WaVSRefCountFullforceMissDisable:ivb */
 	gen7_setup_fixed_func_scheduler(dev_priv);
 
 	/* WaDisable4x2SubspanOptimization:ivb */
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 27/30] drm/i915: Don't apply WaVSThreadDispatchOverride on HSW
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (25 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 26/30] drm/i915: gen7_setup_fixed_func_scheduler() actually implements WaVSThreadDispatchOverride ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 28/30] drm/i915: VLV wants WaVSThreadDispatchOverride too ville.syrjala
                   ` (3 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

BSpec states that the thread override values set by
gen7_setup_fixed_func_scheduler() are invalid for HSW. So let's not
muck around with them.

Since gen7_setup_fixed_func_scheduler() now has two totally independent
parts, one for IVB and one for HSW, move the HSW part directly into
haswell_init_clock_gating().

Note tht there's another workaround by the name of
WaHSWVSRefCountFullforceMissDisable which basically claims that later
steppings don't need the fix, but since WaVSRefCountFullforceMissDisable
is listed to be needed for all steppings play it safe and keep applying
the workaround.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 4ab8aeb..22cbe68 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4636,7 +4636,7 @@ static void gen7_setup_fixed_func_scheduler(struct drm_i915_private *dev_priv)
 	uint32_t reg = I915_READ(GEN7_FF_THREAD_MODE);
 
 	/*
-	 * WaVSThreadDispatchOverride:ivb,hsw
+	 * WaVSThreadDispatchOverride:ivb
 	 *
 	 * This actually overrides the dispatch
 	 * mode for all thread types.
@@ -4646,10 +4646,6 @@ static void gen7_setup_fixed_func_scheduler(struct drm_i915_private *dev_priv)
 	reg |= GEN7_FF_VS_SCHED_HW;
 	reg |= GEN7_FF_DS_SCHED_HW;
 
-	/* WaVSRefCountFullforceMissDisable:hsw */
-	if (IS_HASWELL(dev_priv->dev))
-		reg &= ~GEN7_FF_VS_REF_CNT_FFME;
-
 	I915_WRITE(GEN7_FF_THREAD_MODE, reg);
 }
 
@@ -4699,7 +4695,9 @@ static void haswell_init_clock_gating(struct drm_device *dev)
 
 	g4x_disable_trickle_feed(dev);
 
-	gen7_setup_fixed_func_scheduler(dev_priv);
+	/* WaVSRefCountFullforceMissDisable:hsw */
+	I915_WRITE(GEN7_FF_THREAD_MODE,
+		   I915_READ(GEN7_FF_THREAD_MODE) & ~GEN7_FF_VS_REF_CNT_FFME);
 
 	/* WaDisable4x2SubspanOptimization:hsw */
 	I915_WRITE(CACHE_MODE_1,
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 28/30] drm/i915: VLV wants WaVSThreadDispatchOverride too
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (26 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 27/30] drm/i915: Don't apply WaVSThreadDispatchOverride on HSW ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 29/30] drm/i915: WaDisableDopClockGating isn't applicable to IVB ville.syrjala
                   ` (2 subsequent siblings)
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Call gen7_setup_fixed_func_scheduler() on VLV as well.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 22cbe68..49e4e0a 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4636,7 +4636,7 @@ static void gen7_setup_fixed_func_scheduler(struct drm_i915_private *dev_priv)
 	uint32_t reg = I915_READ(GEN7_FF_THREAD_MODE);
 
 	/*
-	 * WaVSThreadDispatchOverride:ivb
+	 * WaVSThreadDispatchOverride:ivb,vlv
 	 *
 	 * This actually overrides the dispatch
 	 * mode for all thread types.
@@ -4844,6 +4844,7 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN6_MBCTL, I915_READ(GEN6_MBCTL) |
 		   GEN6_MBCTL_ENABLE_BOOT_FETCH);
 
+	gen7_setup_fixed_func_scheduler(dev_priv);
 
 	/*
 	 * According to the spec, bit 13 (RCZUNIT) must be set on IVB.
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 29/30] drm/i915: WaDisableDopClockGating isn't applicable to IVB
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (27 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 28/30] drm/i915: VLV wants WaVSThreadDispatchOverride too ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 13:48 ` [PATCH 30/30] drm/i915: Clarify WaDisable4x2SubspanOptimization situation for VLV ville.syrjala
  2013-07-05 19:51 ` [PATCH 00/30] drm/i915: Lots of workaround changes Ben Widawsky
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

I can't see WaDisableDopClockGating listed for IVB in W/A database.

Also I'm not quite sure we were even disabling the right thing. Register
0x9424 has one DOP clock gating disable bit, amd 0xe4f4/0xf4f4 appears
to have  another one, but I don't actually know which is the one were
suposed to frob. This question is more relevant for VLV where this
workaround is still being applied via register 0xe4f4. Maybe it should
actually use 0x9424 instead.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 49e4e0a..ce78928 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4752,18 +4752,6 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_L3_CHICKEN_MODE_REGISTER,
 		   GEN7_WA_L3_CHICKEN_MODE);
 
-	/* WaDisableDopClockGating:ivb */
-	if (IS_IVB_GT1(dev))
-		I915_WRITE(GEN7_ROW_CHICKEN2,
-			   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
-	else {
-		/* must write both registers */
-		I915_WRITE(GEN7_ROW_CHICKEN2,
-			   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
-		I915_WRITE(GEN7_ROW_CHICKEN2_GT2,
-			   _MASKED_BIT_ENABLE(DOP_CLOCK_GATING_DISABLE));
-	}
-
 	/* WaForceL3Serialization:ivb */
 	I915_WRITE(GEN7_L3SQCREG4, I915_READ(GEN7_L3SQCREG4) &
 		   ~L3SQ_URB_READ_CAM_MATCH_DISABLE);
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCH 30/30] drm/i915: Clarify WaDisable4x2SubspanOptimization situation for VLV
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (28 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 29/30] drm/i915: WaDisableDopClockGating isn't applicable to IVB ville.syrjala
@ 2013-07-05 13:48 ` ville.syrjala
  2013-07-05 19:51 ` [PATCH 00/30] drm/i915: Lots of workaround changes Ben Widawsky
  30 siblings, 0 replies; 37+ messages in thread
From: ville.syrjala @ 2013-07-05 13:48 UTC (permalink / raw)
  To: intel-gfx

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

WaDisable4x2SubspanOptimization isn't listed for VLV in the workaround
database, but BSpec says that the relevant bit must be set. Add a
comment to remind people of this.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index ce78928..f1ff216 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4846,6 +4846,10 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 
 	I915_WRITE(MI_ARB_VLV, MI_ARB_DISPLAY_TRICKLE_FEED_DISABLE);
 
+	/*
+	 * BSpec says this must be set, even though
+	 * WaDisable4x2SubspanOptimization isn't listed for VLV.
+	 */
 	I915_WRITE(CACHE_MODE_1,
 		   _MASKED_BIT_ENABLE(PIXEL_SUBSPAN_COLLECT_OPT_DISABLE));
 
-- 
1.8.1.5

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* Re: [PATCH 08/30] drm/i915: We implement WaMiSetContext_Hang
  2013-07-05 13:48 ` [PATCH 08/30] drm/i915: We implement WaMiSetContext_Hang ville.syrjala
@ 2013-07-05 14:05   ` Chris Wilson
  0 siblings, 0 replies; 37+ messages in thread
From: Chris Wilson @ 2013-07-05 14:05 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

On Fri, Jul 05, 2013 at 04:48:26PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> WaMiSetContext_Hang tells us that a MI_NOOP must follow MI_SET_CONTEXT.
> 
> The other thing WaMiSetContext_Hang seems to say is that URB_FENCE isn't
> allowed to straddle two cachelines. But we don't issue those from the
> kernel so we don't care.

URB_FENCE: Could be a cut'n'paste error from an earlier gen4 erratum? I
don't recall that being documented after the erratum was fixed in later
gen.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 10/30] drm/i915: Implement WaDisableDopClockGating:snb
  2013-07-05 13:48 ` [PATCH 10/30] drm/i915: Implement WaDisableDopClockGating:snb ville.syrjala
@ 2013-07-05 19:49   ` Ben Widawsky
  2013-08-01 14:58   ` Ville Syrjälä
  1 sibling, 0 replies; 37+ messages in thread
From: Ben Widawsky @ 2013-07-05 19:49 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

On Fri, Jul 05, 2013 at 04:48:28PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Certain SNB steppings need to disable DOP clock gating, and the only
> way to do that is to use the MISCCPCTL register.
> 
> Just disable it for every SNB, and then I suppose we may not have to
> worry about WaRevertDopClockGateFix2.

Damien needs to refine the script to allow it to express when one wa
excludes another :D

> 
> There's also another seemingly related workaround called
> WaForTogglingDopClkGatingBit, but there are no details to explain what
> needs to be done.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index b6d8d81..d18fb39 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4565,6 +4565,10 @@ static void gen6_init_clock_gating(struct drm_device *dev)
>  	I915_WRITE(CACHE_MODE_0,
>  		   _MASKED_BIT_DISABLE(CM0_STC_EVICT_DISABLE_LRA_SNB));
>  
> +	/* WaDisableDopClockGating:snb */
> +	I915_WRITE(GEN6_MISCCPCTL, I915_READ(GEN6_MISCCPCTL) &
> +		   ~GEN6_DOP_CLOCK_GATE_ENABLE);
> +
>  	I915_WRITE(GEN6_UCGCTL1,
>  		   I915_READ(GEN6_UCGCTL1) |
>  		   GEN6_BLBUNIT_CLOCK_GATE_DISABLE |
> -- 
> 1.8.1.5
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ben Widawsky, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/30] drm/i915: Lots of workaround changes
  2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
                   ` (29 preceding siblings ...)
  2013-07-05 13:48 ` [PATCH 30/30] drm/i915: Clarify WaDisable4x2SubspanOptimization situation for VLV ville.syrjala
@ 2013-07-05 19:51 ` Ben Widawsky
  2013-07-05 20:02   ` Ville Syrjälä
  30 siblings, 1 reply; 37+ messages in thread
From: Ben Widawsky @ 2013-07-05 19:51 UTC (permalink / raw)
  To: ville.syrjala; +Cc: intel-gfx

On Fri, Jul 05, 2013 at 04:48:18PM +0300, ville.syrjala@linux.intel.com wrote:
> I was going over the workaround database with VLV mainly in mind, but I
> ended up stumbling on quite a few others as well.
> 
> This series adds the workarounds names in a bunch of places where we
> missed them, adds a few workarounds we seem to have missed, drops some
> that were never supposed to be there, and drops quite a few pre-production
> workarounds.
> 
> I'm not sure we want to drop some of the VLV workarounds quite yet. I know
> Jani will hate me when he comes back from vacation since his current machine
> would be affected.
> 
> I've run these on my VLV and IVB machines, and didn't spot any problems.
> The SNB and HSW ones I've not actually tested.

I have a sneaking suspicion at least a few of these will blow up once
their in the wild. You're trusting the docs an awful lot. At least the
patches seem quite bisectable though, so that's a saving grace.

One thing which might be interesting/compelling is some performance data
(especially around places where you've removed unneeded workarounds).

> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ben Widawsky, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/30] drm/i915: Lots of workaround changes
  2013-07-05 19:51 ` [PATCH 00/30] drm/i915: Lots of workaround changes Ben Widawsky
@ 2013-07-05 20:02   ` Ville Syrjälä
  2013-07-05 20:13     ` Daniel Vetter
  0 siblings, 1 reply; 37+ messages in thread
From: Ville Syrjälä @ 2013-07-05 20:02 UTC (permalink / raw)
  To: Ben Widawsky; +Cc: intel-gfx

On Fri, Jul 05, 2013 at 12:51:54PM -0700, Ben Widawsky wrote:
> On Fri, Jul 05, 2013 at 04:48:18PM +0300, ville.syrjala@linux.intel.com wrote:
> > I was going over the workaround database with VLV mainly in mind, but I
> > ended up stumbling on quite a few others as well.
> > 
> > This series adds the workarounds names in a bunch of places where we
> > missed them, adds a few workarounds we seem to have missed, drops some
> > that were never supposed to be there, and drops quite a few pre-production
> > workarounds.
> > 
> > I'm not sure we want to drop some of the VLV workarounds quite yet. I know
> > Jani will hate me when he comes back from vacation since his current machine
> > would be affected.
> > 
> > I've run these on my VLV and IVB machines, and didn't spot any problems.
> > The SNB and HSW ones I've not actually tested.
> 
> I have a sneaking suspicion at least a few of these will blow up once
> their in the wild. You're trusting the docs an awful lot. At least the
> patches seem quite bisectable though, so that's a saving grace.

Yeah I wanted to keep them as isolated as possible just for that reason.

> One thing which might be interesting/compelling is some performance data
> (especially around places where you've removed unneeded workarounds).

Some power consumption numbers migth be nice, since quite a few are
clock gating related.

There are plenty of options to deal with the risk:
- Throw the patches away and pretend they never existed
- Merge them all and watch out for fireworks
- Drop a few of them into every kernel release to avoid too
  many regressions at once. I guess it'll take a few years
  get through the list this way.

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 00/30] drm/i915: Lots of workaround changes
  2013-07-05 20:02   ` Ville Syrjälä
@ 2013-07-05 20:13     ` Daniel Vetter
  0 siblings, 0 replies; 37+ messages in thread
From: Daniel Vetter @ 2013-07-05 20:13 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: Ben Widawsky, intel-gfx

On Fri, Jul 05, 2013 at 11:02:48PM +0300, Ville Syrjälä wrote:
> On Fri, Jul 05, 2013 at 12:51:54PM -0700, Ben Widawsky wrote:
> > On Fri, Jul 05, 2013 at 04:48:18PM +0300, ville.syrjala@linux.intel.com wrote:
> > > I was going over the workaround database with VLV mainly in mind, but I
> > > ended up stumbling on quite a few others as well.
> > > 
> > > This series adds the workarounds names in a bunch of places where we
> > > missed them, adds a few workarounds we seem to have missed, drops some
> > > that were never supposed to be there, and drops quite a few pre-production
> > > workarounds.
> > > 
> > > I'm not sure we want to drop some of the VLV workarounds quite yet. I know
> > > Jani will hate me when he comes back from vacation since his current machine
> > > would be affected.
> > > 
> > > I've run these on my VLV and IVB machines, and didn't spot any problems.
> > > The SNB and HSW ones I've not actually tested.
> > 
> > I have a sneaking suspicion at least a few of these will blow up once
> > their in the wild. You're trusting the docs an awful lot. At least the
> > patches seem quite bisectable though, so that's a saving grace.
> 
> Yeah I wanted to keep them as isolated as possible just for that reason.
> 
> > One thing which might be interesting/compelling is some performance data
> > (especially around places where you've removed unneeded workarounds).
> 
> Some power consumption numbers migth be nice, since quite a few are
> clock gating related.
> 
> There are plenty of options to deal with the risk:
> - Throw the patches away and pretend they never existed
> - Merge them all and watch out for fireworks
> - Drop a few of them into every kernel release to avoid too
>   many regressions at once. I guess it'll take a few years
>   get through the list this way.

Imo review them again, drop them into dinq, see what happens. If they blow
up we can yell at the Bsepc or w/a guys ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCH 10/30] drm/i915: Implement WaDisableDopClockGating:snb
  2013-07-05 13:48 ` [PATCH 10/30] drm/i915: Implement WaDisableDopClockGating:snb ville.syrjala
  2013-07-05 19:49   ` Ben Widawsky
@ 2013-08-01 14:58   ` Ville Syrjälä
  1 sibling, 0 replies; 37+ messages in thread
From: Ville Syrjälä @ 2013-08-01 14:58 UTC (permalink / raw)
  To: intel-gfx

On Fri, Jul 05, 2013 at 04:48:28PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Certain SNB steppings need to disable DOP clock gating, and the only
> way to do that is to use the MISCCPCTL register.

Based on some more research it appears we don't need this after all.
It should only affect pre-production hardware.

> Just disable it for every SNB, and then I suppose we may not have to
> worry about WaRevertDopClockGateFix2.
> 
> There's also another seemingly related workaround called
> WaForTogglingDopClkGatingBit, but there are no details to explain what
> needs to be done.

Which could mean we need to look into these two...

> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index b6d8d81..d18fb39 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -4565,6 +4565,10 @@ static void gen6_init_clock_gating(struct drm_device *dev)
>  	I915_WRITE(CACHE_MODE_0,
>  		   _MASKED_BIT_DISABLE(CM0_STC_EVICT_DISABLE_LRA_SNB));
>  
> +	/* WaDisableDopClockGating:snb */
> +	I915_WRITE(GEN6_MISCCPCTL, I915_READ(GEN6_MISCCPCTL) &
> +		   ~GEN6_DOP_CLOCK_GATE_ENABLE);
> +
>  	I915_WRITE(GEN6_UCGCTL1,
>  		   I915_READ(GEN6_UCGCTL1) |
>  		   GEN6_BLBUNIT_CLOCK_GATE_DISABLE |
> -- 
> 1.8.1.5

-- 
Ville Syrjälä
Intel OTC

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2013-08-01 14:58 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-05 13:48 [PATCH 00/30] drm/i915: Lots of workaround changes ville.syrjala
2013-07-05 13:48 ` [PATCH 01/30] drm/i915: We implement WaDisableL3Bank2xClockGate:vlv ville.syrjala
2013-07-05 13:48 ` [PATCH 02/30] drm/i915: We implement WaGsvBringDownFreqInRc6:vlv ville.syrjala
2013-07-05 13:48 ` [PATCH 03/30] drm/i915: We implement WaEnableVGAAccessThroughIOPort:ctg, elk, ilk, snb, ivb, vlv, hsw ville.syrjala
2013-07-05 13:48 ` [PATCH 04/30] drm/i915: WaPsdDispatchEnable seems to be another name for WaDisablePSDDualDispatchEnable ville.syrjala
2013-07-05 13:48 ` [PATCH 05/30] drm/i915: We implement WaDisableL3CacheAging:vlv ville.syrjala
2013-07-05 13:48 ` [PATCH 06/30] drm/i915: We implement WaDisableDopClockGating:ivb ville.syrjala
2013-07-05 13:48 ` [PATCH 07/30] drm/i915: We implement WaDisableRCCUnitClockGating:snb ville.syrjala
2013-07-05 13:48 ` [PATCH 08/30] drm/i915: We implement WaMiSetContext_Hang ville.syrjala
2013-07-05 14:05   ` Chris Wilson
2013-07-05 13:48 ` [PATCH 09/30] drm/i915: Rename GEN7_MISCCPCTL to GEN6_MISCCPCTL ville.syrjala
2013-07-05 13:48 ` [PATCH 10/30] drm/i915: Implement WaDisableDopClockGating:snb ville.syrjala
2013-07-05 19:49   ` Ben Widawsky
2013-08-01 14:58   ` Ville Syrjälä
2013-07-05 13:48 ` [PATCH 11/30] drm/i915: Fix IVB GT2 WaDisableDopClockGating and WaDisablePSDDualDispatchEnable ville.syrjala
2013-07-05 13:48 ` [PATCH 12/30] drm/i915: Drop WaDisablePSDDualDispatchEnable:ivb for IVB GT2 ville.syrjala
2013-07-05 13:48 ` [PATCH 13/30] drm/i915: Implement WaIncreaseL3CreditsForVLVB0:vlv ville.syrjala
2013-07-05 13:48 ` [PATCH 14/30] drm/i915: WaDisableVDSUnitClockGating isn't applicable to SNB ville.syrjala
2013-07-05 13:48 ` [PATCH 15/30] drm/i915: WaDisableRCCUnitClockGating isn't applicable to IVB ville.syrjala
2013-07-05 13:48 ` [PATCH 16/30] drm/i915: WaDisableRCCUnitClockGating isn't applicaple to VLV ville.syrjala
2013-07-05 13:48 ` [PATCH 17/30] drm/i915: WaDisableRHWOOptimizationForRenderHang isn't applicable to HSW ville.syrjala
2013-07-05 13:48 ` [PATCH 18/30] drm/i915: WaDisableRHWOOptimizationForRenderHang isn't applicable to VLV ville.syrjala
2013-07-05 13:48 ` [PATCH 19/30] drm/i915: WaApplyL3ControlAndL3ChickenMode isn't applicable for VLV ville.syrjala
2013-07-05 13:48 ` [PATCH 20/30] drm/i915: Drop bogus comment about RCPB unit clock gating on IVB ville.syrjala
2013-07-05 13:48 ` [PATCH 21/30] drm/i915: Drop WaDisableRCZUnitClockGating:hsw ville.syrjala
2013-07-05 13:48 ` [PATCH 22/30] drm/i915: Drop WaApplyL3ControlAndL3ChickenMode:hsw ville.syrjala
2013-07-05 13:48 ` [PATCH 23/30] drm/i915: Drop WaDisableRCPBUnitClockGating:vlv ville.syrjala
2013-07-05 13:48 ` [PATCH 24/30] drm/i915: Drop WaDisableVDSUtnitClockGating:vlv ville.syrjala
2013-07-05 13:48 ` [PATCH 25/30] drm/i915: Drop WaDisableTDLUnitClockGating:vlv ville.syrjala
2013-07-05 13:48 ` [PATCH 26/30] drm/i915: gen7_setup_fixed_func_scheduler() actually implements WaVSThreadDispatchOverride ville.syrjala
2013-07-05 13:48 ` [PATCH 27/30] drm/i915: Don't apply WaVSThreadDispatchOverride on HSW ville.syrjala
2013-07-05 13:48 ` [PATCH 28/30] drm/i915: VLV wants WaVSThreadDispatchOverride too ville.syrjala
2013-07-05 13:48 ` [PATCH 29/30] drm/i915: WaDisableDopClockGating isn't applicable to IVB ville.syrjala
2013-07-05 13:48 ` [PATCH 30/30] drm/i915: Clarify WaDisable4x2SubspanOptimization situation for VLV ville.syrjala
2013-07-05 19:51 ` [PATCH 00/30] drm/i915: Lots of workaround changes Ben Widawsky
2013-07-05 20:02   ` Ville Syrjälä
2013-07-05 20:13     ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox