Skip to contentSkip to conversation

drm/i915:bxt: implement WaProgramL3SqcReg1DefaultForPerf

PATCH Superseded [email protected] 6 participants 10 messages Apr 20, 2016 – Apr 21, 2016

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 drm/i915:bxt: implement WaProgramL3SqcReg1DefaultForPerf

From: Tim Gore <[email protected]>

This patch applies a performance enhancement workaround based on analysis of DX and OCL S-Curve workloads.

v2: Only apply to B0 onwards

---
 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 f0a6d85..13e154a 100644
@@ -6074,6 +6074,7 @@ enum skl_disp_power_wells {
 
 #define GEN8_L3SQCREG1				_MMIO(0xB100)
 #define  BDW_WA_L3SQCREG1_DEFAULT		0x784000
+#define  BXT_WA_L3SQCREG1_DEFAULT		0xF84000
 
 #define GEN7_L3CNTLREG1				_MMIO(0xB01C)
 #define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C47FF8C
drivers/gpu/drm/i915/intel_pm.c +4 -0
index b7c2186..eecdc3a6 100644
@@ -76,6 +76,10 @@ static void bxt_init_clock_gating(struct drm_device *dev)
 	if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER))
 		I915_WRITE(GEN9_CLKGATE_DIS_0, I915_READ(GEN9_CLKGATE_DIS_0) |
 			   PWM1_GATING_DIS | PWM2_GATING_DIS);
+
+	/* WaProgramL3SqcReg1DefaultForPerf:bxt */
+	if (IS_BXT_REVID(dev, BXT_REVID_B0, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1, BXT_WA_L3SQCREG1_DEFAULT);
 }
 
 static void i915_pineview_get_mem_freq(struct drm_device *dev)
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 31 lines · On 4/20/2016 3:23 PM, [email protected] wrote:

From: Tim Gore <[email protected]>

This patch applies a performance enhancement workaround based on analysis of DX and OCL S-Curve workloads.

v2: Only apply to B0 onwards

---
  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 f0a6d85..13e154a 100644
@@ -6074,6 +6074,7 @@ enum skl_disp_power_wells {
 
  #define GEN8_L3SQCREG1				_MMIO(0xB100)
  #define  BDW_WA_L3SQCREG1_DEFAULT		0x784000
+#define  BXT_WA_L3SQCREG1_DEFAULT		0xF84000
 
  #define GEN7_L3CNTLREG1				_MMIO(0xB01C)
  #define  GEN7_WA_FOR_GEN7_L3_CONTROL			0x3C47FF8C
drivers/gpu/drm/i915/intel_pm.c +0 -0
index b7c2186..eecdc3a6 100644

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

Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +4 -0
@@ -76,6 +76,10 @@ static void bxt_init_clock_gating(struct drm_device *dev)
  	if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER))
  		I915_WRITE(GEN9_CLKGATE_DIS_0, I915_READ(GEN9_CLKGATE_DIS_0) |
  			   PWM1_GATING_DIS | PWM2_GATING_DIS);
+
+	/* WaProgramL3SqcReg1DefaultForPerf:bxt */
+	if (IS_BXT_REVID(dev, BXT_REVID_B0, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1, BXT_WA_L3SQCREG1_DEFAULT);
  }
 
  static void i915_pineview_get_mem_freq(struct drm_device *dev)

Isnt it better to add this to bxt_init_workarounds() instead of bxt_init_clock_gating()?

And It doesnt hurt to put what it is doing in the commit msg, i.e.:
"Increasing GP credits to 62 (from default 56), and reducing HP credits to 2 (from default 8)"

-Michel

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

author
#2 lore raw

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 49 lines

-----Original Message-----
From: Thierry, Michel
Sent: Wednesday, April 20, 2016 4:00 PM
To: Gore, Tim; [email protected]
Subject: Re: [PATCH v2] drm/i915:bxt: implement
WaProgramL3SqcReg1DefaultForPerf

Quoted 18 lines · On 4/20/2016 3:23 PM, [email protected] wrote:

From: Tim Gore <[email protected]>

This patch applies a performance enhancement workaround based on analysis of DX and OCL S-Curve workloads.

v2: Only apply to B0 onwards

---
  drivers/gpu/drm/i915/i915_reg.h | 1 +
  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
  2 files changed, 5 insertions(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_reg.h index f0a6d85..13e154a 100644

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6080

Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -6074,6 +6074,7 @@ enum skl_disp_power_wells {
 
  #define GEN8_L3SQCREG1				_MMIO(0xB100)
  #define  BDW_WA_L3SQCREG1_DEFAULT		0x784000
+#define  BXT_WA_L3SQCREG1_DEFAULT		0xF84000
 
  #define GEN7_L3CNTLREG1				_MMIO(0xB01C)
  #define  GEN7_WA_FOR_GEN7_L3_CONTROL
	0x3C47FF8C

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device

Quoted 5 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_pm.c index b7c2186..eecdc3a6 100644

drivers/gpu/drm/i915/intel_pm.c +0 -0
@@ -76,6 +76,10 @@ static void bxt_init_clock_gating(struct drm_device

*dev)

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device · line 77

Quoted 2 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  	if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER))
  		I915_WRITE(GEN9_CLKGATE_DIS_0,

I915_READ(GEN9_CLKGATE_DIS_0) |

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

Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +4 -0
  			   PWM1_GATING_DIS | PWM2_GATING_DIS);
+
+	/* WaProgramL3SqcReg1DefaultForPerf:bxt */
+	if (IS_BXT_REVID(dev, BXT_REVID_B0, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1,

BXT_WA_L3SQCREG1_DEFAULT);

Quoted 7 lines

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

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  }
 
  static void i915_pineview_get_mem_freq(struct drm_device *dev)

Isnt it better to add this to bxt_init_workarounds() instead of bxt_init_clock_gating()?

There is an equivalent Wa for bdw in bdw_init_clock_gating, so I just tried to stay consistent with that. I'm not sure if this W/a will persist across suspend/resume. bxt_init_workarounds only gets called after reset, not on resume as far as I know. I'll investigate further

Quoted 4 lines

And It doesnt hurt to put what it is doing in the commit msg, i.e.:
"Increasing GP credits to 62 (from default 56), and reducing HP credits to 2 (from default 8)"

Fair comment

Quoted 2 lines

-Michel

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

#3 lore raw
Quoted 59 lines · Tim

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 54 lines

-----Original Message-----
From: Thierry, Michel
Sent: Wednesday, April 20, 2016 4:00 PM
To: Gore, Tim; [email protected]
Subject: Re: [PATCH v2] drm/i915:bxt: implement
WaProgramL3SqcReg1DefaultForPerf

Quoted 18 lines · On 4/20/2016 3:23 PM, [email protected] wrote:

From: Tim Gore <[email protected]>

This patch applies a performance enhancement workaround based on analysis of DX and OCL S-Curve workloads.

v2: Only apply to B0 onwards

---
  drivers/gpu/drm/i915/i915_reg.h | 1 +
  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
  2 files changed, 5 insertions(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_reg.h index f0a6d85..13e154a 100644

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6080

Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -6074,6 +6074,7 @@ enum skl_disp_power_wells {
 
  #define GEN8_L3SQCREG1				_MMIO(0xB100)
  #define  BDW_WA_L3SQCREG1_DEFAULT		0x784000
+#define  BXT_WA_L3SQCREG1_DEFAULT		0xF84000
 
  #define GEN7_L3CNTLREG1				_MMIO(0xB01C)
  #define  GEN7_WA_FOR_GEN7_L3_CONTROL
	0x3C47FF8C

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device

Quoted 5 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_pm.c index b7c2186..eecdc3a6 100644

drivers/gpu/drm/i915/intel_pm.c +0 -0
@@ -76,6 +76,10 @@ static void bxt_init_clock_gating(struct drm_device

*dev)

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device · line 77

Quoted 2 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  	if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER))
  		I915_WRITE(GEN9_CLKGATE_DIS_0,

I915_READ(GEN9_CLKGATE_DIS_0) |

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

Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +4 -0
  			   PWM1_GATING_DIS | PWM2_GATING_DIS);
+
+	/* WaProgramL3SqcReg1DefaultForPerf:bxt */
+	if (IS_BXT_REVID(dev, BXT_REVID_B0, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1,

BXT_WA_L3SQCREG1_DEFAULT);

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  }
 
  static void i915_pineview_get_mem_freq(struct drm_device *dev)
Quoted 7 lines
Quoted 2 lines

Isnt it better to add this to bxt_init_workarounds() instead of bxt_init_clock_gating()?

There is an equivalent Wa for bdw in bdw_init_clock_gating, so I just tried to stay consistent with that. I'm not sure if this W/a will persist across suspend/resume. bxt_init_workarounds only gets called after reset, not on resume as far as I know. I'll investigate further

init_clock_gating() is called on init/reset/resume. Use it to set global registers. (Once upon a time it did only setup the clock gatings...)

init_workarounds() is the equivalent for per-context registers. -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 63 lines · Chris Wilson
Quoted 62 lines · Tim

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 56 lines

-----Original Message-----
From: Thierry, Michel
Sent: Wednesday, April 20, 2016 4:00 PM
To: Gore, Tim; [email protected]
Subject: Re: [PATCH v2] drm/i915:bxt: implement
WaProgramL3SqcReg1DefaultForPerf

Quoted 18 lines · On 4/20/2016 3:23 PM, [email protected] wrote:

From: Tim Gore <[email protected]>

This patch applies a performance enhancement workaround based on analysis of DX and OCL S-Curve workloads.

v2: Only apply to B0 onwards

---
  drivers/gpu/drm/i915/i915_reg.h | 1 +
  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
  2 files changed, 5 insertions(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_reg.h index f0a6d85..13e154a 100644

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6080

Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -6074,6 +6074,7 @@ enum skl_disp_power_wells {
 
  #define GEN8_L3SQCREG1				_MMIO(0xB100)
  #define  BDW_WA_L3SQCREG1_DEFAULT		0x784000
+#define  BXT_WA_L3SQCREG1_DEFAULT		0xF84000
 
  #define GEN7_L3CNTLREG1				_MMIO(0xB01C)
  #define  GEN7_WA_FOR_GEN7_L3_CONTROL
	0x3C47FF8C

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device

Quoted 5 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_pm.c index b7c2186..eecdc3a6 100644

drivers/gpu/drm/i915/intel_pm.c +0 -0
@@ -76,6 +76,10 @@ static void bxt_init_clock_gating(struct drm_device

*dev)

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device · line 77

Quoted 2 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  	if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER))
  		I915_WRITE(GEN9_CLKGATE_DIS_0,

I915_READ(GEN9_CLKGATE_DIS_0) |

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

Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +4 -0
  			   PWM1_GATING_DIS | PWM2_GATING_DIS);
+
+	/* WaProgramL3SqcReg1DefaultForPerf:bxt */
+	if (IS_BXT_REVID(dev, BXT_REVID_B0, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1,

BXT_WA_L3SQCREG1_DEFAULT);

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

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  }
 
  static void i915_pineview_get_mem_freq(struct drm_device *dev)

Isnt it better to add this to bxt_init_workarounds() instead of bxt_init_clock_gating()?

Quoted 7 lines
Quoted 4 lines

There is an equivalent Wa for bdw in bdw_init_clock_gating, so I just tried to stay consistent with that. I'm not sure if this W/a will persist across suspend/resume. bxt_init_workarounds only gets called after reset, not on resume as far as I know. I'll investigate further

init_clock_gating() is called on init/reset/resume. Use it to set global registers. (Once upon a time it did only setup the clock gatings...)

It's not called on reset. Or at least that was the case last time I looked. Which is a rather big problem. My old idea was that we'd move anything that gets clobbered by a GPU reset out from init_clock_gating into some more suitable place that does get called on reset.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw
Quoted 69 lines · Ville Syrjälä
Quoted 68 lines · Chris Wilson
Quoted 66 lines · Tim

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 49 lines

-----Original Message-----
From: Thierry, Michel
Sent: Wednesday, April 20, 2016 4:00 PM
To: Gore, Tim; [email protected]
Subject: Re: [PATCH v2] drm/i915:bxt: implement
WaProgramL3SqcReg1DefaultForPerf

Quoted 18 lines · On 4/20/2016 3:23 PM, [email protected] wrote:

From: Tim Gore <[email protected]>

This patch applies a performance enhancement workaround based on analysis of DX and OCL S-Curve workloads.

v2: Only apply to B0 onwards

---
  drivers/gpu/drm/i915/i915_reg.h | 1 +
  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
  2 files changed, 5 insertions(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_reg.h index f0a6d85..13e154a 100644

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6080

Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -6074,6 +6074,7 @@ enum skl_disp_power_wells {
 
  #define GEN8_L3SQCREG1				_MMIO(0xB100)
  #define  BDW_WA_L3SQCREG1_DEFAULT		0x784000
+#define  BXT_WA_L3SQCREG1_DEFAULT		0xF84000
 
  #define GEN7_L3CNTLREG1				_MMIO(0xB01C)
  #define  GEN7_WA_FOR_GEN7_L3_CONTROL
	0x3C47FF8C

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device

Quoted 5 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_pm.c index b7c2186..eecdc3a6 100644

drivers/gpu/drm/i915/intel_pm.c +0 -0
@@ -76,6 +76,10 @@ static void bxt_init_clock_gating(struct drm_device

*dev)

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device · line 77

Quoted 2 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  	if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER))
  		I915_WRITE(GEN9_CLKGATE_DIS_0,

I915_READ(GEN9_CLKGATE_DIS_0) |

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

Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +4 -0
  			   PWM1_GATING_DIS | PWM2_GATING_DIS);
+
+	/* WaProgramL3SqcReg1DefaultForPerf:bxt */
+	if (IS_BXT_REVID(dev, BXT_REVID_B0, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1,

BXT_WA_L3SQCREG1_DEFAULT);

Quoted 7 lines

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

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  }
 
  static void i915_pineview_get_mem_freq(struct drm_device *dev)

Isnt it better to add this to bxt_init_workarounds() instead of bxt_init_clock_gating()?

There is an equivalent Wa for bdw in bdw_init_clock_gating, so I just tried to stay consistent with that. I'm not sure if this W/a will persist across suspend/resume. bxt_init_workarounds only gets called after reset, not on resume as far as I know. I'll investigate further

Quoted 7 lines
Quoted 2 lines

init_clock_gating() is called on init/reset/resume. Use it to set global registers. (Once upon a time it did only setup the clock gatings...)

It's not called on reset. Or at least that was the case last time I looked. Which is a rather big problem. My old idea was that we'd move anything that gets clobbered by a GPU reset out from init_clock_gating into some more suitable place that does get called on reset.

Oh, I call upon Daniel!
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
author
#6 lore raw

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 92 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Wednesday, April 20, 2016 7:48 PM
To: Ville Syrjälä
Cc: Gore, Tim; Daniel Vetter; Thierry, Michel; [email protected]
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915:bxt: implement WaProgramL3SqcReg1DefaultForPerf

Quoted 29 lines · Ville Syrjälä
Quoted 28 lines · Chris Wilson
Quoted 27 lines · Tim

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 21 lines

-----Original Message-----
From: Thierry, Michel
Sent: Wednesday, April 20, 2016 4:00 PM
To: Gore, Tim; [email protected]
Subject: Re: [PATCH v2] drm/i915:bxt: implement
WaProgramL3SqcReg1DefaultForPerf

Quoted 13 lines · On 4/20/2016 3:23 PM, [email protected] wrote:

From: Tim Gore <[email protected]>

This patch applies a performance enhancement workaround based on analysis of DX and OCL S-Curve workloads.

v2: Only apply to B0 onwards

---
  drivers/gpu/drm/i915/i915_reg.h | 1 +
  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
  2 files changed, 5 insertions(+)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6075

Quoted 8 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_reg.h index f0a6d85..13e154a 100644

drivers/gpu/drm/i915/i915_reg.h +0 -0
@@ -6074,6 +6074,7 @@ enum skl_disp_power_wells {
 
  #define GEN8_L3SQCREG1
	_MMIO(0xB100)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells {

Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +1 -0
  #define  BDW_WA_L3SQCREG1_DEFAULT		0x784000
+#define  BXT_WA_L3SQCREG1_DEFAULT		0xF84000
 
  #define GEN7_L3CNTLREG1
	_MMIO(0xB01C)
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6080

Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0 -0
  #define  GEN7_WA_FOR_GEN7_L3_CONTROL
	0x3C47FF8C
Quoted 7 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_pm.c index b7c2186..eecdc3a6 100644

drivers/gpu/drm/i915/intel_pm.c +0 -0
@@ -76,6 +76,10 @@ static void bxt_init_clock_gating(struct

drm_device

*dev)

Quoted 1 line

if (IS_BXT_REVID(dev_priv, BXT_REVID_B0,

REVID_FOREVER))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

I915_WRITE(GEN9_CLKGATE_DIS_0,

I915_READ(GEN9_CLKGATE_DIS_0) |

Quoted 1 line

PWM1_GATING_DIS |

PWM2_GATING_DIS);

Quoted 24 lines
Quoted 23 lines
Quoted 11 lines
Quoted 11 lines

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

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +4 -0
+
+	/* WaProgramL3SqcReg1DefaultForPerf:bxt */
+	if (IS_BXT_REVID(dev, BXT_REVID_B0, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1,

BXT_WA_L3SQCREG1_DEFAULT);

Quoted 5 lines
  }

static void i915_pineview_get_mem_freq(struct drm_device
*dev)

Quoted 8 lines
Quoted 2 lines

Isnt it better to add this to bxt_init_workarounds() instead of bxt_init_clock_gating()?

There is an equivalent Wa for bdw in bdw_init_clock_gating, so I just tried to stay consistent with that. I'm not sure if this W/a will persist across suspend/resume. bxt_init_workarounds only gets called after reset, not on resume as far as I know. I'll investigate further

init_clock_gating() is called on init/reset/resume. Use it to set global registers. (Once upon a time it did only setup the clock gatings...)

Quoted 8 lines
Quoted 4 lines

It's not called on reset. Or at least that was the case last time I looked. Which is a rather big problem. My old idea was that we'd move anything that gets clobbered by a GPU reset out from init_clock_gating into some more suitable place that does get called on reset.

Oh, I call upon Daniel!
-Chris

Looks to me that init_clock_gating is called on reset thus:

    I915_handle_error
      ->  i915_reset_and_wakeup
         ->  intel_finish_reset
            ->  intel_modeset_init_hw
               ->  intel_init_clock_gating
                  ->  display.init_clock_gating

Or perhaps we should put WaProgramL3SqcReg1DefaultForPerf in the new gtt_write_workarounds function in i915_gem_gtt.c. I believe this is called on Init, reset and resume. ?

Tim

Quoted 1 line

Chris Wilson, Intel Open Source Technology Centre

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

#7 lore raw
Quoted 114 lines · Tim

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 92 lines

-----Original Message-----
From: Chris Wilson [mailto:[email protected]]
Sent: Wednesday, April 20, 2016 7:48 PM
To: Ville Syrjälä
Cc: Gore, Tim; Daniel Vetter; Thierry, Michel; [email protected]
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915:bxt: implement WaProgramL3SqcReg1DefaultForPerf

Quoted 29 lines · Ville Syrjälä
Quoted 28 lines · Chris Wilson
Quoted 27 lines · Tim

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 21 lines

-----Original Message-----
From: Thierry, Michel
Sent: Wednesday, April 20, 2016 4:00 PM
To: Gore, Tim; [email protected]
Subject: Re: [PATCH v2] drm/i915:bxt: implement
WaProgramL3SqcReg1DefaultForPerf

Quoted 13 lines · On 4/20/2016 3:23 PM, [email protected] wrote:

From: Tim Gore <[email protected]>

This patch applies a performance enhancement workaround based on analysis of DX and OCL S-Curve workloads.

v2: Only apply to B0 onwards

---
  drivers/gpu/drm/i915/i915_reg.h | 1 +
  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
  2 files changed, 5 insertions(+)
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6075

Quoted 8 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_reg.h index f0a6d85..13e154a 100644

drivers/gpu/drm/i915/i915_reg.h +0 -0
@@ -6074,6 +6074,7 @@ enum skl_disp_power_wells {
 
  #define GEN8_L3SQCREG1
	_MMIO(0xB100)
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6079

Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +1 -0
  #define  BDW_WA_L3SQCREG1_DEFAULT		0x784000
+#define  BXT_WA_L3SQCREG1_DEFAULT		0xF84000
 
  #define GEN7_L3CNTLREG1
	_MMIO(0xB01C)
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines
Quoted 11 lines

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6080

Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0 -0
  #define  GEN7_WA_FOR_GEN7_L3_CONTROL
	0x3C47FF8C
Quoted 7 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_pm.c index b7c2186..eecdc3a6 100644

drivers/gpu/drm/i915/intel_pm.c +0 -0
@@ -76,6 +76,10 @@ static void bxt_init_clock_gating(struct

drm_device

*dev)

Quoted 1 line

if (IS_BXT_REVID(dev_priv, BXT_REVID_B0,

REVID_FOREVER))

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

I915_WRITE(GEN9_CLKGATE_DIS_0,

I915_READ(GEN9_CLKGATE_DIS_0) |

Quoted 1 line

PWM1_GATING_DIS |

PWM2_GATING_DIS);

Quoted 24 lines
Quoted 23 lines
Quoted 11 lines
Quoted 11 lines

drivers/gpu/drm/i915/intel_pm.c

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +4 -0
+
+	/* WaProgramL3SqcReg1DefaultForPerf:bxt */
+	if (IS_BXT_REVID(dev, BXT_REVID_B0, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1,

BXT_WA_L3SQCREG1_DEFAULT);

Quoted 5 lines
  }

static void i915_pineview_get_mem_freq(struct drm_device
*dev)

Quoted 8 lines
Quoted 2 lines

Isnt it better to add this to bxt_init_workarounds() instead of bxt_init_clock_gating()?

There is an equivalent Wa for bdw in bdw_init_clock_gating, so I just tried to stay consistent with that. I'm not sure if this W/a will persist across suspend/resume. bxt_init_workarounds only gets called after reset, not on resume as far as I know. I'll investigate further

init_clock_gating() is called on init/reset/resume. Use it to set global registers. (Once upon a time it did only setup the clock gatings...)

Quoted 8 lines
Quoted 4 lines

It's not called on reset. Or at least that was the case last time I looked. Which is a rather big problem. My old idea was that we'd move anything that gets clobbered by a GPU reset out from init_clock_gating into some more suitable place that does get called on reset.

Oh, I call upon Daniel!
-Chris

Looks to me that init_clock_gating is called on reset thus:

    I915_handle_error
      ->  i915_reset_and_wakeup
         ->  intel_finish_reset
            ->  intel_modeset_init_hw
               ->  intel_init_clock_gating
                  ->  display.init_clock_gating
Quoted 3 lines

Or perhaps we should put WaProgramL3SqcReg1DefaultForPerf in the new gtt_write_workarounds function in i915_gem_gtt.c. I believe this is called on Init, reset and resume. ?

intel_modeset_init_hw should only be called on old crap where a gpu reset kills the entire chip, including the display block. That's not the case on modern stuff, much less once we have TDR.

If it's getting called unconditionally that's a bug. -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw
In reply to Chris Wilson
Quoted 73 lines · Chris Wilson
Quoted 72 lines · Ville Syrjälä
Quoted 70 lines · Chris Wilson
Quoted 59 lines · Tim

Tim Gore
Intel Corporation (UK) Ltd. - Co. Reg. #1134945 - Pipers Way, Swindon SN3 1RJ

Quoted 54 lines

-----Original Message-----
From: Thierry, Michel
Sent: Wednesday, April 20, 2016 4:00 PM
To: Gore, Tim; [email protected]
Subject: Re: [PATCH v2] drm/i915:bxt: implement
WaProgramL3SqcReg1DefaultForPerf

Quoted 18 lines · On 4/20/2016 3:23 PM, [email protected] wrote:

From: Tim Gore <[email protected]>

This patch applies a performance enhancement workaround based on analysis of DX and OCL S-Curve workloads.

v2: Only apply to B0 onwards

---
  drivers/gpu/drm/i915/i915_reg.h | 1 +
  drivers/gpu/drm/i915/intel_pm.c | 4 ++++
  2 files changed, 5 insertions(+)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_reg.h index f0a6d85..13e154a 100644

drivers/gpu/drm/i915/i915_reg.h enum skl_disp_power_wells { · line 6080

Quoted 7 lines
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -6074,6 +6074,7 @@ enum skl_disp_power_wells {
 
  #define GEN8_L3SQCREG1				_MMIO(0xB100)
  #define  BDW_WA_L3SQCREG1_DEFAULT		0x784000
+#define  BXT_WA_L3SQCREG1_DEFAULT		0xF84000
 
  #define GEN7_L3CNTLREG1				_MMIO(0xB01C)
  #define  GEN7_WA_FOR_GEN7_L3_CONTROL
	0x3C47FF8C

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device

Quoted 5 lines
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/intel_pm.c index b7c2186..eecdc3a6 100644

drivers/gpu/drm/i915/intel_pm.c +0 -0
@@ -76,6 +76,10 @@ static void bxt_init_clock_gating(struct drm_device

*dev)

drivers/gpu/drm/i915/intel_pm.c static void bxt_init_clock_gating(struct drm_device · line 77

Quoted 2 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  	if (IS_BXT_REVID(dev_priv, BXT_REVID_B0, REVID_FOREVER))
  		I915_WRITE(GEN9_CLKGATE_DIS_0,

I915_READ(GEN9_CLKGATE_DIS_0) |

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

Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +4 -0
  			   PWM1_GATING_DIS | PWM2_GATING_DIS);
+
+	/* WaProgramL3SqcReg1DefaultForPerf:bxt */
+	if (IS_BXT_REVID(dev, BXT_REVID_B0, REVID_FOREVER))
+		I915_WRITE(GEN8_L3SQCREG1,

BXT_WA_L3SQCREG1_DEFAULT);

Quoted 4 lines
drivers/gpu/drm/i915/intel_pm.c +0 -0
  }
 
  static void i915_pineview_get_mem_freq(struct drm_device *dev)
Quoted 7 lines
Quoted 2 lines

Isnt it better to add this to bxt_init_workarounds() instead of bxt_init_clock_gating()?

There is an equivalent Wa for bdw in bdw_init_clock_gating, so I just tried to stay consistent with that. I'm not sure if this W/a will persist across suspend/resume. bxt_init_workarounds only gets called after reset, not on resume as far as I know. I'll investigate further

init_clock_gating() is called on init/reset/resume. Use it to set global registers. (Once upon a time it did only setup the clock gatings...)

Quoted 6 lines
Quoted 4 lines

It's not called on reset. Or at least that was the case last time I looked. Which is a rather big problem. My old idea was that we'd move anything that gets clobbered by a GPU reset out from init_clock_gating into some more suitable place that does get called on reset.

Oh, I call upon Daniel!

We have that place already since ages. Either
- wa batch if it's in the context
- per-engine init function (most of those are for rcs)

init_clock_gating is for display/uncore wa only. I thought this is known by now?
-Daniel

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

✗ Fi.CI.BAT: failure for drm/i915:bxt: implement WaProgramL3SqcReg1DefaultForPerf (rev2)

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915:bxt: implement WaProgramL3SqcReg1DefaultForPerf (rev2)
URL : https://patchwork.freedesktop.org/series/5990/
State : failure

== Summary ==

Series 5990v2 drm/i915:bxt: implement WaProgramL3SqcReg1DefaultForPerf
http://patchwork.freedesktop.org/api/1.0/series/5990/revisions/2/mbox/

Test gem_busy:

        Subgroup basic-blt:
                pass       -> SKIP       (bsw-nuc-2)
Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                fail       -> PASS       (bsw-nuc-2)
Test kms_force_connector_basic:
        Subgroup force-load-detect:
                pass       -> SKIP       (ivb-t430s)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-a:
                pass       -> FAIL       (ivb-t430s)
bdw-nuci7        total:194  pass:182  dwarn:0   dfail:0   fail:0   skip:12 
bdw-ultra        total:194  pass:170  dwarn:0   dfail:0   fail:1   skip:23 
bsw-nuc-2        total:193  pass:153  dwarn:0   dfail:0   fail:0   skip:40 
byt-nuc          total:193  pass:155  dwarn:0   dfail:0   fail:0   skip:38 
hsw-brixbox      total:194  pass:170  dwarn:0   dfail:0   fail:0   skip:24 
ilk-hp8440p      total:194  pass:137  dwarn:0   dfail:0   fail:0   skip:57 
ivb-t430s        total:194  pass:164  dwarn:0   dfail:0   fail:1   skip:29 
skl-i7k-2        total:194  pass:168  dwarn:0   dfail:0   fail:1   skip:25 
skl-nuci5        total:194  pass:183  dwarn:0   dfail:0   fail:0   skip:11 

Results at /archive/results/CI_IGT_test/Patchwork_1961/

eb848ab2b19d25a08ca3b2b5e4b2f74c7f7c962c drm-intel-nightly: 2016y-04m-20d-18h-48m-11s UTC integration manifest d726e637 drm/i915:bxt: implement WaProgramL3SqcReg1DefaultForPerf

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