drm/i915: Implement Wa4x4STCOptimizationDisable:chv
Subsystems (2)
PATCH 1/4 drm/i915: Implement Wa4x4STCOptimizationDisable:chv
From: Ville Syrjälä <[email protected]>
Wa4x4STCOptimizationDisable got only implemented for BDW, but according to the w/a database CHV needs it too, so add it.
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/intel_ringbuffer.c +4 -0
@@ -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 );
Signature · 6 lines
2.0.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/4 drm/i915: Drop some more CHV pre-production workarounds
From: Ville Syrjälä <[email protected]>
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.
--- drivers/gpu/drm/i915/intel_pm.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +1 -5
@@ -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 );
Signature · 6 lines
2.0.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/4 drm/i915: Change CHV WIZ hashing mode to 16x4
In reply to [email protected]From: Ville Syrjälä <[email protected]>
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.
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/intel_ringbuffer.c +12 -0
@@ -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 ; }
Signature · 6 lines
2.0.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/4 drm/i915: Change VLV WIZ hashing mode to 16x4
In reply to [email protected]From: Ville Syrjälä <[email protected]>
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.
--- drivers/gpu/drm/i915/intel_pm.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/i915/intel_pm.c +11 -0
@@ -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. */
Signature · 6 lines
2.0.5 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 16 lines · On 21/01/2015 17:37, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
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ä <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/i915/intel_ringbuffer.c +0
-0
drivers/gpu/drm/i915/intel_ringbuffer.c static int chv_init_workarounds(struct intel_engine_cs *ring) · line 860
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4
-0@@ -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,
regards
Arun
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 30 lines · Arun
Quoted 16 lines · On 21/01/2015 17:37, [email protected] wrote:
From: Ville Syrjälä <[email protected]>
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ä <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/i915/intel_ringbuffer.c +0
-0drivers/gpu/drm/i915/intel_ringbuffer.c static int chv_init_workarounds(struct intel_engine_cs *ring) · line 860
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4
-0@@ -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.
Quoted 2 lines
For the whole series,
Reviewed-by Arun Siluvery <[email protected]>
All merged, thanks.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx