Skip to contentSkip to conversation

drm/i915/bxt: Enable WaVSRefCountFullforceMissDisable

PATCH In review Nick Hoath 4 participants 11 messages Jun 29, 2015 – Sep 7, 2015

Subsystems (2)
lore
Share & tools
lore

Nick Hoath

author
#0 lore raw

PATCH 1/4 drm/i915/bxt: Enable WaVSRefCountFullforceMissDisable

From: Rafael Barbalho <[email protected]>

---
 drivers/gpu/drm/i915/intel_pm.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +5 -0
index 32ff034..d635d0a 100644
@@ -59,6 +59,11 @@ static void gen9_init_clock_gating(struct drm_device *dev)
 	/* WaEnableLbsSlaRetryTimerDecrement:skl */
 	I915_WRITE(BDW_SCRATCH1, I915_READ(BDW_SCRATCH1) |
 		   GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE);
+
+	/* WaVSRefCountFullforceMissDisable:skl,bxt */
+	I915_WRITE(GEN7_FF_THREAD_MODE,
+		   I915_READ(GEN7_FF_THREAD_MODE) &
+		   ~(GEN7_FF_VS_REF_CNT_FFME));
 }
 
 static void skl_init_clock_gating(struct drm_device *dev)
Signature · 6 lines
2.1.1

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

PATCH 2/4 drm/i915/bxt: Enable WaDSRefCountFullforceMissDisable

From: Rafael Barbalho <[email protected]>

---
 drivers/gpu/drm/i915/intel_pm.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +5 -2
index d635d0a..f29e575 100644
@@ -60,10 +60,13 @@ static void gen9_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(BDW_SCRATCH1, I915_READ(BDW_SCRATCH1) |
 		   GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE);
 
-	/* WaVSRefCountFullforceMissDisable:skl,bxt */
+	/*
+	 * WaVSRefCountFullforceMissDisable:skl,bxt
+	 * WaDSRefCountFullforceMissDisable:skl,bxt
+	 */
 	I915_WRITE(GEN7_FF_THREAD_MODE,
 		   I915_READ(GEN7_FF_THREAD_MODE) &
-		   ~(GEN7_FF_VS_REF_CNT_FFME));
+		   ~(GEN8_FF_DS_REF_CNT_FFME | GEN7_FF_VS_REF_CNT_FFME));
 }
 
 static void skl_init_clock_gating(struct drm_device *dev)
Signature · 6 lines
2.1.1

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

PATCH 3/4 drm/i915/bxt: Enable WaOCLCoherentLineFlush

In reply to Nick Hoath
Cc Rafael Barbalho <[email protected]>
---
 drivers/gpu/drm/i915/i915_reg.h | 1 +
 drivers/gpu/drm/i915/intel_pm.c | 4 ++++
 2 files changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +1 -0
index b9f6b8c..115911a 100644
@@ -5807,6 +5807,7 @@ enum skl_disp_power_wells {
 #define  GEN7_WA_L3_CHICKEN_MODE				0x20000000
 
 #define GEN7_L3SQCREG4				0xb034
+#define  GEN8_PIPELINE_FLUSH_COHERENT_LINES	(1<<21)
 #define  L3SQ_URB_READ_CAM_MATCH_DISABLE	(1<<27)
 
 #define GEN8_L3SQCREG4				0xb118
drivers/gpu/drm/i915/intel_pm.c +4 -0
index f29e575..26ef146 100644
@@ -67,6 +67,10 @@ static void gen9_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(GEN7_FF_THREAD_MODE,
 		   I915_READ(GEN7_FF_THREAD_MODE) &
 		   ~(GEN8_FF_DS_REF_CNT_FFME | GEN7_FF_VS_REF_CNT_FFME));
+
+	/* WaOCLCoherentLineFlush:skl,bxt */
+	I915_WRITE(GEN8_L3SQCREG4, I915_READ(GEN8_L3SQCREG4) |
+			GEN8_PIPELINE_FLUSH_COHERENT_LINES);
 }
 
 static void skl_init_clock_gating(struct drm_device *dev)
Signature · 6 lines
2.1.1

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

PATCH 4/4 drm/i915/bxt: Clean up bxt_init_clock_gating

In reply to Nick Hoath

Add stepping check for A0 workarounds, and remove the associated FIXME tags.
Split out unrelated WAs for later condition checking.

v2: Fixed format (PeterL)
v3: Corrected stepping check for WaDisableSDEUnitClockGating
- Ignoring comment, following hardware spec instead. (ChrisH) Added description for TILECTL setting (JonB)

Cc Peter Lawthers <[email protected]>
Cc Chris Harris <[email protected]>
Cc Jon Bloomfield <[email protected]>
---
 drivers/gpu/drm/i915/intel_pm.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +11 -5
index 26ef146..86a4ced 100644
@@ -115,18 +115,24 @@ static void bxt_init_clock_gating(struct drm_device *dev)
 
 	gen9_init_clock_gating(dev);
 
+	/* WaDisableSDEUnitClockGating:bxt */
+	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
+		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
+
 	/*
 	 * FIXME:
-	 * GEN8_SDEUNIT_CLOCK_GATE_DISABLE applies on A0 only.
 	 * GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ applies on 3x6 GT SKUs only.
 	 */
-	 /* WaDisableSDEUnitClockGating:bxt */
 	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
-		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE |
 		   GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
 
-	/* FIXME: apply on A0 only */
-	I915_WRITE(TILECTL, I915_READ(TILECTL) | TILECTL_TLBPF);
+	if (INTEL_REVID(dev) == BXT_REVID_A0) {
+		/*
+		 * Hardware specification requires this bit to be
+		 * set to 1 for A0
+		 */
+		I915_WRITE(TILECTL, I915_READ(TILECTL) | TILECTL_TLBPF);
+	}
 }
 
 static void i915_pineview_get_mem_freq(struct drm_device *dev)
Signature · 6 lines
2.1.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 4/4
#4 lore raw

Re: [PATCH 4/4] drm/i915/bxt: Clean up bxt_init_clock_gating

Quoted 29 lines · Nick Hoath

Add stepping check for A0 workarounds, and remove the associated FIXME tags.
Split out unrelated WAs for later condition checking.

v2: Fixed format (PeterL)
v3: Corrected stepping check for WaDisableSDEUnitClockGating
- Ignoring comment, following hardware spec instead. (ChrisH) Added description for TILECTL setting (JonB)

Cc Peter Lawthers <[email protected]>
Cc Chris Harris <[email protected]>
Cc Jon Bloomfield <[email protected]>
---
 drivers/gpu/drm/i915/intel_pm.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +4 -0
index 26ef146..86a4ced 100644
@@ -115,18 +115,24 @@ static void bxt_init_clock_gating(struct drm_device *dev)
 
 	gen9_init_clock_gating(dev);
 
+	/* WaDisableSDEUnitClockGating:bxt */
+	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
+		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
+

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device *dev) · line 128

Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +0 -3
 	/*
 	 * FIXME:
-	 * GEN8_SDEUNIT_CLOCK_GATE_DISABLE applies on A0 only.
 	 * GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ applies on 3x6 GT SKUs only.
 	 */
-	 /* WaDisableSDEUnitClockGating:bxt */
 	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
-		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE |
 		   GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
 

I guess you decided not to combine the writes due to FIXME.

Quoted 19 lines
drivers/gpu/drm/i915/intel_pm.c +7 -2
-	/* FIXME: apply on A0 only */
-	I915_WRITE(TILECTL, I915_READ(TILECTL) | TILECTL_TLBPF);
+	if (INTEL_REVID(dev) == BXT_REVID_A0) {
+		/*
+		 * Hardware specification requires this bit to be
+		 * set to 1 for A0
+		 */
+		I915_WRITE(TILECTL, I915_READ(TILECTL) | TILECTL_TLBPF);
+	}
 }
 
 static void i915_pineview_get_mem_freq(struct drm_device *dev)
Signature · 6 lines
2.1.1

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

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

author
#5 lore raw

Re: [PATCH 4/4] drm/i915/bxt: Clean up bxt_init_clock_gating

Quoted 44 lines · Mika Kuoppala
Quoted 29 lines · Nick Hoath

Add stepping check for A0 workarounds, and remove the associated FIXME tags.
Split out unrelated WAs for later condition checking.

v2: Fixed format (PeterL)
v3: Corrected stepping check for WaDisableSDEUnitClockGating
- Ignoring comment, following hardware spec instead. (ChrisH) Added description for TILECTL setting (JonB)

Cc Peter Lawthers <[email protected]>
Cc Chris Harris <[email protected]>
Cc Jon Bloomfield <[email protected]>
---
  drivers/gpu/drm/i915/intel_pm.c | 16 +++++++++++-----
  1 file changed, 11 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +4 -0
index 26ef146..86a4ced 100644
@@ -115,18 +115,24 @@ static void bxt_init_clock_gating(struct drm_device *dev)
 
  	gen9_init_clock_gating(dev);
 
+	/* WaDisableSDEUnitClockGating:bxt */
+	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
+		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
+

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device *dev) · line 128

Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +0 -3
  	/*
  	 * FIXME:
-	 * GEN8_SDEUNIT_CLOCK_GATE_DISABLE applies on A0 only.
  	 * GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ applies on 3x6 GT SKUs only.
  	 */
-	 /* WaDisableSDEUnitClockGating:bxt */
  	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
-		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE |
  		   GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
 

I guess you decided not to combine the writes due to FIXME.

Quoted 1 line

Looks like this one has fallen through the cracks & not been merged...

Quoted 13 lines
Quoted 13 lines
drivers/gpu/drm/i915/intel_pm.c +7 -2
-	/* FIXME: apply on A0 only */
-	I915_WRITE(TILECTL, I915_READ(TILECTL) | TILECTL_TLBPF);
+	if (INTEL_REVID(dev) == BXT_REVID_A0) {
+		/*
+		 * Hardware specification requires this bit to be
+		 * set to 1 for A0
+		 */
+		I915_WRITE(TILECTL, I915_READ(TILECTL) | TILECTL_TLBPF);
+	}
  }
 
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +0 -1
  static void i915_pineview_get_mem_freq(struct drm_device *dev)
--

2.1.1

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

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

#6 lore raw

Re: [PATCH 4/4] drm/i915/bxt: Clean up bxt_init_clock_gating

Quoted 45 lines · Nick Hoath
Quoted 44 lines · Mika Kuoppala
Quoted 29 lines · Nick Hoath

Add stepping check for A0 workarounds, and remove the associated FIXME tags.
Split out unrelated WAs for later condition checking.

v2: Fixed format (PeterL)
v3: Corrected stepping check for WaDisableSDEUnitClockGating
- Ignoring comment, following hardware spec instead. (ChrisH) Added description for TILECTL setting (JonB)

Cc Peter Lawthers <[email protected]>
Cc Chris Harris <[email protected]>
Cc Jon Bloomfield <[email protected]>
---
 drivers/gpu/drm/i915/intel_pm.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +4 -0
index 26ef146..86a4ced 100644
@@ -115,18 +115,24 @@ static void bxt_init_clock_gating(struct drm_device *dev)
 
 	gen9_init_clock_gating(dev);
 
+	/* WaDisableSDEUnitClockGating:bxt */
+	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
+		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE);
+

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device *dev) · line 128

Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +0 -3
 	/*
 	 * FIXME:
-	 * GEN8_SDEUNIT_CLOCK_GATE_DISABLE applies on A0 only.
 	 * GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ applies on 3x6 GT SKUs only.
 	 */
-	 /* WaDisableSDEUnitClockGating:bxt */
 	I915_WRITE(GEN8_UCGCTL6, I915_READ(GEN8_UCGCTL6) |
-		   GEN8_SDEUNIT_CLOCK_GATE_DISABLE |
 		   GEN8_HDCUNIT_CLOCK_GATE_DISABLE_HDCREQ);
 

I guess you decided not to combine the writes due to FIXME.

Quoted 3 lines
Quoted 1 line

Looks like this one has fallen through the cracks & not been merged...

Thanks for the ping, applied to dinq.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Tested-by on v1 4/4
#7 lore raw

Re: [PATCH 4/4] drm/i915/bxt: Clean up bxt_init_clock_gating

In reply to Nick Hoath

Task id: 6665 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied

ILK                                  302/302              302/302
SNB                                  312/316              312/316
IVB                                  343/343              343/343

BYT -2 287/287 285/287
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*BYT igt@gem_partial_pwrite_pread@reads PASS(1) FAIL(1)
*BYT igt@gem_partial_pwrite_pread@reads-display PASS(1) FAIL(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#8 lore raw
In reply to Nick Hoath

Hi,

Quoted 13 lines · Nick Hoath

From: Rafael Barbalho <[email protected]>

---
 drivers/gpu/drm/i915/intel_pm.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +0 -0
index 32ff034..d635d0a 100644

drivers/gpu/drm/i915/intel_pm.c static void gen9_init_clock_gating(struct drm_device *dev) · line 68

Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +5 -0
@@ -59,6 +59,11 @@ static void gen9_init_clock_gating(struct drm_device *dev)
 	/* WaEnableLbsSlaRetryTimerDecrement:skl */
 	I915_WRITE(BDW_SCRATCH1, I915_READ(BDW_SCRATCH1) |
 		   GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE);
+
+	/* WaVSRefCountFullforceMissDisable:skl,bxt */
+	I915_WRITE(GEN7_FF_THREAD_MODE,
+		   I915_READ(GEN7_FF_THREAD_MODE) &
+		   ~(GEN7_FF_VS_REF_CNT_FFME));
 }
 

This bit 19 seems to be about Tesselation DOP gating disable with gen9+ onwards. And with that workaroundname, the applicability should be hsw,bdw. I am confused.

-Mika

Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
 static void skl_init_clock_gating(struct drm_device *dev)
Signature · 6 lines
2.1.1

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

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

author
#9 lore raw
Quoted 24 lines · Mika Kuoppala

Hi,

Quoted 19 lines · Nick Hoath

From: Rafael Barbalho <[email protected]>

---
  drivers/gpu/drm/i915/intel_pm.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +3 -0
index 32ff034..d635d0a 100644
@@ -59,6 +59,11 @@ static void gen9_init_clock_gating(struct drm_device *dev)
  	/* WaEnableLbsSlaRetryTimerDecrement:skl */
  	I915_WRITE(BDW_SCRATCH1, I915_READ(BDW_SCRATCH1) |
  		   GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE);
+
+	/* WaVSRefCountFullforceMissDisable:skl,bxt */
+	I915_WRITE(GEN7_FF_THREAD_MODE,
Quoted 9 lines

drivers/gpu/drm/i915/intel_pm.c static void gen9_init_clock_gating(struct drm_device *dev) · line 68

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +2 -0
+		   I915_READ(GEN7_FF_THREAD_MODE) &
+		   ~(GEN7_FF_VS_REF_CNT_FFME));
  }
 

This bit 19 seems to be about Tesselation DOP gating disable with gen9+ onwards. And with that workaroundname, the applicability should be hsw,bdw. I am confused.

The specs say these WAs are required for GEN9+, BDW & HSW. So I'm at a loss to see the confusion.

Quoted 11 lines

-Mika

Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +0 -1
  static void skl_init_clock_gating(struct drm_device *dev)
--

2.1.1

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

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

#10 lore raw
Quoted 35 lines · Nick Hoath
Quoted 24 lines · Mika Kuoppala

Hi,

Quoted 19 lines · Nick Hoath

From: Rafael Barbalho <[email protected]>

---
  drivers/gpu/drm/i915/intel_pm.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +3 -0
index 32ff034..d635d0a 100644
@@ -59,6 +59,11 @@ static void gen9_init_clock_gating(struct drm_device *dev)
  	/* WaEnableLbsSlaRetryTimerDecrement:skl */
  	I915_WRITE(BDW_SCRATCH1, I915_READ(BDW_SCRATCH1) |
  		   GEN9_LBS_SLA_RETRY_TIMER_DECREMENT_ENABLE);
+
+	/* WaVSRefCountFullforceMissDisable:skl,bxt */
+	I915_WRITE(GEN7_FF_THREAD_MODE,
Quoted 9 lines

drivers/gpu/drm/i915/intel_pm.c static void gen9_init_clock_gating(struct drm_device *dev) · line 68

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +2 -0
+		   I915_READ(GEN7_FF_THREAD_MODE) &
+		   ~(GEN7_FF_VS_REF_CNT_FFME));
  }
 

This bit 19 seems to be about Tesselation DOP gating disable with gen9+ onwards. And with that workaroundname, the applicability should be hsw,bdw. I am confused.

Quoted 3 lines

The specs say these WAs are required for GEN9+, BDW & HSW. So I'm at a loss to see the confusion.

I was wrong about the bit 19. It is bit 15. But the issue remains, bit 15 is not about VS reference counts but TDS bypassing on SKL. The meaning of bitsfield have changed on skl. So we need to hunt down where the refcount disable has been moved?

-Mika

Quoted 11 lines
Quoted 11 lines

-Mika

Quoted 8 lines
drivers/gpu/drm/i915/intel_pm.c +0 -1
  static void skl_init_clock_gating(struct drm_device *dev)
--

2.1.1

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

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