public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv
@ 2015-01-21 17:37 ville.syrjala
  2015-01-21 17:37 ` [PATCH 2/4] drm/i915: Drop some more CHV pre-production workarounds ville.syrjala
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: ville.syrjala @ 2015-01-21 17:37 UTC (permalink / raw)
  To: intel-gfx

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

Wa4x4STCOptimizationDisable got only implemented for BDW, but according
to the w/a database CHV needs it too, so add it.

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

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index d7aa5c4..2a1a178 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -851,6 +851,10 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)
 	 */
 	WA_CLR_BIT_MASKED(CACHE_MODE_0_GEN7, HIZ_RAW_STALL_OPT_DISABLE);
 
+	/* Wa4x4STCOptimizationDisable:chv */
+	WA_SET_BIT_MASKED(CACHE_MODE_1,
+			  GEN8_4x4_STC_OPTIMIZATION_DISABLE);
+
 	/* Improve HiZ throughput on CHV. */
 	WA_SET_BIT_MASKED(HIZ_CHICKEN, CHV_HZ_8X8_MODE_IN_1X);
 
-- 
2.0.5

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

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

* [PATCH 2/4] drm/i915: Drop some more CHV pre-production workarounds
  2015-01-21 17:37 [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv ville.syrjala
@ 2015-01-21 17:37 ` ville.syrjala
  2015-01-21 17:38 ` [PATCH 3/4] drm/i915: Change CHV WIZ hashing mode to 16x4 ville.syrjala
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: ville.syrjala @ 2015-01-21 17:37 UTC (permalink / raw)
  To: intel-gfx

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

Drop WaDisablePwrmtrEvent:chv as it's no longer needed.

Also remove the WaSetMaskForGfxBusyness:chv note, but we still
leave the GEN6_RP_MEDIA_IS_GFX bit enabled as that's still the
recommended setting.

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 4f7a2a5..e94371e 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -4789,14 +4789,10 @@ static void cherryview_enable_rps(struct drm_device *dev)
 
 	I915_WRITE(GEN6_RP_IDLE_HYSTERSIS, 10);
 
-	/* WaDisablePwrmtrEvent:chv (pre-production hw) */
-	I915_WRITE(0xA80C, I915_READ(0xA80C) & 0x00ffffff);
-	I915_WRITE(0xA810, I915_READ(0xA810) & 0xffffff00);
-
 	/* 5: Enable RPS */
 	I915_WRITE(GEN6_RP_CONTROL,
 		   GEN6_RP_MEDIA_HW_NORMAL_MODE |
-		   GEN6_RP_MEDIA_IS_GFX | /* WaSetMaskForGfxBusyness:chv (pre-production hw ?) */
+		   GEN6_RP_MEDIA_IS_GFX |
 		   GEN6_RP_ENABLE |
 		   GEN6_RP_UP_BUSY_AVG |
 		   GEN6_RP_DOWN_IDLE_AVG);
-- 
2.0.5

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

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

* [PATCH 3/4] drm/i915: Change CHV WIZ hashing mode to 16x4
  2015-01-21 17:37 [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv ville.syrjala
  2015-01-21 17:37 ` [PATCH 2/4] drm/i915: Drop some more CHV pre-production workarounds ville.syrjala
@ 2015-01-21 17:38 ` ville.syrjala
  2015-01-21 17:38 ` [PATCH 4/4] drm/i915: Change VLV " ville.syrjala
  2015-01-21 18:50 ` [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv Siluvery, Arun
  3 siblings, 0 replies; 6+ messages in thread
From: ville.syrjala @ 2015-01-21 17:38 UTC (permalink / raw)
  To: intel-gfx

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

I ran a few tests with xonotic and synmark2 trying out the
different WIZ hashing modes on CHV. The results seem to match the
results I got with IVB/HSW when I did the similar tests on them
in the past. That is 16x4 is generally the fastest mode, 8x8 comes
next and finally 8x4. On CHV the difference between the modes is
at most ~1% in most tests. IIRC on IVB/HSW the difference was a little
bigger, but as there doesn't seem to be any real downside to 16x4
let's use it by default.

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

diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 2a1a178..0bd3976 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -858,6 +858,18 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)
 	/* Improve HiZ throughput on CHV. */
 	WA_SET_BIT_MASKED(HIZ_CHICKEN, CHV_HZ_8X8_MODE_IN_1X);
 
+	/*
+	 * BSpec recommends 8x4 when MSAA is used,
+	 * however in practice 16x4 seems fastest.
+	 *
+	 * Note that PS/WM thread counts depend on the WIZ hashing
+	 * disable bit, which we don't touch here, but it's good
+	 * to keep in mind (see 3DSTATE_PS and 3DSTATE_WM).
+	 */
+	WA_SET_FIELD_MASKED(GEN7_GT_MODE,
+			    GEN6_WIZ_HASHING_MASK,
+			    GEN6_WIZ_HASHING_16x4);
+
 	return 0;
 }
 
-- 
2.0.5

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

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

* [PATCH 4/4] drm/i915: Change VLV WIZ hashing mode to 16x4
  2015-01-21 17:37 [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv ville.syrjala
  2015-01-21 17:37 ` [PATCH 2/4] drm/i915: Drop some more CHV pre-production workarounds ville.syrjala
  2015-01-21 17:38 ` [PATCH 3/4] drm/i915: Change CHV WIZ hashing mode to 16x4 ville.syrjala
@ 2015-01-21 17:38 ` ville.syrjala
  2015-01-21 18:50 ` [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv Siluvery, Arun
  3 siblings, 0 replies; 6+ messages in thread
From: ville.syrjala @ 2015-01-21 17:38 UTC (permalink / raw)
  To: intel-gfx

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

We set the WIZ hashing mode to 16x4 for all the other gen6+
platfotrms, so let's follow suit on VLV.

My VLV is AWOL currently so I didn't test this, but since the results
for all the other platforms agree that 16x4 is the fastest we might
assume the same holds for VLV.

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

diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index e94371e..3e630fe 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -6230,6 +6230,17 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 		   _MASKED_BIT_ENABLE(PIXEL_SUBSPAN_COLLECT_OPT_DISABLE));
 
 	/*
+	 * BSpec recommends 8x4 when MSAA is used,
+	 * however in practice 16x4 seems fastest.
+	 *
+	 * Note that PS/WM thread counts depend on the WIZ hashing
+	 * disable bit, which we don't touch here, but it's good
+	 * to keep in mind (see 3DSTATE_PS and 3DSTATE_WM).
+	 */
+	I915_WRITE(GEN7_GT_MODE,
+		   _MASKED_FIELD(GEN6_WIZ_HASHING_MASK, GEN6_WIZ_HASHING_16x4));
+
+	/*
 	 * WaIncreaseL3CreditsForVLVB0:vlv
 	 * This is the hardware default actually.
 	 */
-- 
2.0.5

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

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

* Re: [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv
  2015-01-21 17:37 [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv ville.syrjala
                   ` (2 preceding siblings ...)
  2015-01-21 17:38 ` [PATCH 4/4] drm/i915: Change VLV " ville.syrjala
@ 2015-01-21 18:50 ` Siluvery, Arun
  2015-01-22  6:16   ` Daniel Vetter
  3 siblings, 1 reply; 6+ messages in thread
From: Siluvery, Arun @ 2015-01-21 18:50 UTC (permalink / raw)
  To: ville.syrjala, intel-gfx

On 21/01/2015 17:37, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Wa4x4STCOptimizationDisable got only implemented for BDW, but according
> to the w/a database CHV needs it too, so add it.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>   drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index d7aa5c4..2a1a178 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -851,6 +851,10 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)
>   	 */
>   	WA_CLR_BIT_MASKED(CACHE_MODE_0_GEN7, HIZ_RAW_STALL_OPT_DISABLE);
>
> +	/* Wa4x4STCOptimizationDisable:chv */
> +	WA_SET_BIT_MASKED(CACHE_MODE_1,
> +			  GEN8_4x4_STC_OPTIMIZATION_DISABLE);
> +
>   	/* Improve HiZ throughput on CHV. */
>   	WA_SET_BIT_MASKED(HIZ_CHICKEN, CHV_HZ_8X8_MODE_IN_1X);
>
>
Looks good to me.
only tested Wa4x4STCOptimizationDisable on Android, no issues observed.

For the whole series,
Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>

regards
Arun

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

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

* Re: [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv
  2015-01-21 18:50 ` [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv Siluvery, Arun
@ 2015-01-22  6:16   ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2015-01-22  6:16 UTC (permalink / raw)
  To: Siluvery, Arun; +Cc: intel-gfx

On Wed, Jan 21, 2015 at 06:50:41PM +0000, Siluvery, Arun wrote:
> On 21/01/2015 17:37, ville.syrjala@linux.intel.com wrote:
> >From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> >Wa4x4STCOptimizationDisable got only implemented for BDW, but according
> >to the w/a database CHV needs it too, so add it.
> >
> >Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >---
> >  drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> >diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> >index d7aa5c4..2a1a178 100644
> >--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> >+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> >@@ -851,6 +851,10 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)
> >  	 */
> >  	WA_CLR_BIT_MASKED(CACHE_MODE_0_GEN7, HIZ_RAW_STALL_OPT_DISABLE);
> >
> >+	/* Wa4x4STCOptimizationDisable:chv */
> >+	WA_SET_BIT_MASKED(CACHE_MODE_1,
> >+			  GEN8_4x4_STC_OPTIMIZATION_DISABLE);
> >+
> >  	/* Improve HiZ throughput on CHV. */
> >  	WA_SET_BIT_MASKED(HIZ_CHICKEN, CHV_HZ_8X8_MODE_IN_1X);
> >
> >
> Looks good to me.
> only tested Wa4x4STCOptimizationDisable on Android, no issues observed.
> 
> For the whole series,
> Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com>

All merged, thanks.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2015-01-22  6:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-21 17:37 [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv ville.syrjala
2015-01-21 17:37 ` [PATCH 2/4] drm/i915: Drop some more CHV pre-production workarounds ville.syrjala
2015-01-21 17:38 ` [PATCH 3/4] drm/i915: Change CHV WIZ hashing mode to 16x4 ville.syrjala
2015-01-21 17:38 ` [PATCH 4/4] drm/i915: Change VLV " ville.syrjala
2015-01-21 18:50 ` [PATCH 1/4] drm/i915: Implement Wa4x4STCOptimizationDisable:chv Siluvery, Arun
2015-01-22  6:16   ` Daniel Vetter

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