drm/i915: Add IS_BDW_GT3 macro.
Subsystems (2)
Rodrigo Vivi
maintainerPATCH 1/5 drm/i915: Add IS_BDW_GT3 macro.
It will be usefull to specify w/a that affects only BDW GT3.
--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +2 -0
@@ -2099,6 +2099,8 @@ struct drm_i915_cmd_table { ((INTEL_DEVID(dev) & 0xf) == 0x2 || \ (INTEL_DEVID(dev) & 0xf) == 0x6 || \ (INTEL_DEVID(dev) & 0xf) == 0xe)) +#define IS_BDW_GT3 (dev) (IS_BROADWELL(dev) && \ + (INTEL_DEVID(dev) & 0x00F0) == 0x0020)#define IS_HSW_ULT (dev) (IS_HASWELL(dev) && \ (INTEL_DEVID(dev) & 0xFF00) == 0x0A00)#define IS_ULT (dev) (IS_HSW_ULT(dev) || IS_BDW_ULT(dev))
Signature · 1 line
1.9.3
Rodrigo Vivi
maintainerPATCH 2/5 drm/i915/bdw: WaDisableFenceDestinationToSLM
This WA affect BDW GT3 E and F steppings.
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -4836,6 +4836,7 @@ enum punit_power_well {/* GEN8 chicken */ #define HDC_CHICKEN0 0x7300#define HDC_FORCE_NON_COHERENT (1<<4) +#define HDC_FENCE_DEST_SLM_DISABLE (1<<14)/* WaCatErrorRejectionIssue */ #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030
drivers/gpu/drm/i915/intel_ringbuffer.c +5 -1
@@ -740,8 +740,12 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)* workaround for for a possible hang in the unlikely event a TLB * invalidation occurs during a PSD flush. */ +/* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production E/F) */ intel_ring_emit_wa (ring,HDC_CHICKEN0 , -_MASKED_BIT_ENABLE (HDC_FORCE_NON_COHERENT )); +_MASKED_BIT_ENABLE (HDC_FORCE_NON_COHERENT | + (IS_BDW_GT3 (dev) ? +HDC_FENCE_DEST_SLM_DISABLE :0 ) + ));/* Wa4x4STCOptimizationDisable:bdw */ intel_ring_emit_wa(ring, CACHE_MODE_1,
Signature · 1 line
1.9.3
Re: [PATCH 2/5] drm/i915/bdw: WaDisableFenceDestinationToSLM
Quoted 3 lines · Rodrigo Vivi
This WA affect BDW GT3 E and F steppings.
Signed-off-by Rodrigo Vivi <[email protected]>
Quoted 42 lines
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -4836,6 +4836,7 @@ enum punit_power_well {/* GEN8 chicken */ #define HDC_CHICKEN0 0x7300#define HDC_FORCE_NON_COHERENT (1<<4) +#define HDC_FENCE_DEST_SLM_DISABLE (1<<14)/* WaCatErrorRejectionIssue */ #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030drivers/gpu/drm/i915/intel_ringbuffer.c +5
-1@@ -740,8 +740,12 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)* workaround for for a possible hang in the unlikely event a TLB * invalidation occurs during a PSD flush. */ +/* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production E/F) */ intel_ring_emit_wa (ring,HDC_CHICKEN0 , -_MASKED_BIT_ENABLE (HDC_FORCE_NON_COHERENT )); +_MASKED_BIT_ENABLE (HDC_FORCE_NON_COHERENT | + (IS_BDW_GT3 (dev) ? +HDC_FENCE_DEST_SLM_DISABLE :0 ) + ));/* Wa4x4STCOptimizationDisable:bdw */ intel_ring_emit_wa(ring, CACHE_MODE_1,Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedRe: [PATCH 2/5] drm/i915/bdw: WaDisableFenceDestinationToSLM
Quoted 3 lines · Mika Kuoppala
Quoted 1 line · Rodrigo Vivi
This WA affect BDW GT3 E and F steppings.
Thou shalt not mention steppings in public. Fixed here and in the comment below while applying.
Quoted 4 lines
Quoted 2 lines
Signed-off-by Rodrigo Vivi <[email protected]>Reviewed-by Mika Kuoppala <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Quoted 47 lines
Quoted 43 lines
--- drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -4836,6 +4836,7 @@ enum punit_power_well {/* GEN8 chicken */ #define HDC_CHICKEN0 0x7300#define HDC_FORCE_NON_COHERENT (1<<4) +#define HDC_FENCE_DEST_SLM_DISABLE (1<<14)/* WaCatErrorRejectionIssue */ #define GEN7_SQ_CHICKEN_MBCUNIT_CONFIG 0x9030drivers/gpu/drm/i915/intel_ringbuffer.c +5
-1@@ -740,8 +740,12 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)* workaround for for a possible hang in the unlikely event a TLB * invalidation occurs during a PSD flush. */ +/* WaDisableFenceDestinationToSLM:bdw (GT3 pre-production E/F) */ intel_ring_emit_wa (ring,HDC_CHICKEN0 , -_MASKED_BIT_ENABLE (HDC_FORCE_NON_COHERENT )); +_MASKED_BIT_ENABLE (HDC_FORCE_NON_COHERENT | + (IS_BDW_GT3 (dev) ? +HDC_FENCE_DEST_SLM_DISABLE :0 ) + ));/* Wa4x4STCOptimizationDisable:bdw */ intel_ring_emit_wa(ring, CACHE_MODE_1,Signature · 6 lines
1.9.3 _______________________________________________ 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
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Re: [PATCH 2/5] drm/i915/bdw: WaDisableFenceDestinationToSLM
Quoted 5 lines · Daniel Vetter
Quoted 3 lines
Quoted 1 line
Signed-off-by Rodrigo Vivi <[email protected]>Reviewed-by Mika Kuoppala <[email protected]>Queued for -next, thanks for the patch.
Well doesn't compile too well without the previous patch to introduce IS_GT3, so dropped again.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Mika Kuoppala
Reviewed-byRe: [PATCH 2/5] drm/i915/bdw: WaDisableFenceDestinationToSLM
Quoted 10 lines · Daniel Vetter
Quoted 5 lines · Daniel Vetter
Quoted 3 lines
Quoted 1 line
Signed-off-by Rodrigo Vivi <[email protected]>Reviewed-by Mika Kuoppala <[email protected]>Queued for -next, thanks for the patch.
Well doesn't compile too well without the previous patch to introduce
IS_GT3, so dropped again.
-Daniel
My mistake. I reviewed it but I failed at mailing. Mailed the r-b only to Rodrigo apparently.
Patch 1/5 is
-Mika
Quoted 4 lines
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Re: [PATCH 2/5] drm/i915/bdw: WaDisableFenceDestinationToSLM
Quoted 13 lines · Mika Kuoppala
Quoted 10 lines · Daniel Vetter
Quoted 5 lines · Daniel Vetter
Quoted 3 lines
Quoted 1 line
Signed-off-by Rodrigo Vivi <[email protected]>Reviewed-by Mika Kuoppala <[email protected]>Queued for -next, thanks for the patch.
Well doesn't compile too well without the previous patch to introduce
IS_GT3, so dropped again.
-Daniel
Quoted 6 lines
My mistake. I reviewed it but I failed at mailing. Mailed the r-b only to Rodrigo apparently.
Patch 1/5 is
Reviewed-by Mika Kuoppala <[email protected]>
Jesse also reviewed patch 1, so I've merged the first 2 to dinq this morning. Thanks anyway.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Rodrigo Vivi
maintainerPATCH 3/5 drm/i915/bdw: WaProgramL3SqcReg1Default
In reply to Rodrigo ViviProgram the default initial value of the L3SqcReg1 on BDW for performance
--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 3 +++ 2 files changed, 6 insertions(+)
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -4821,6 +4821,9 @@ enum punit_power_well {#define GEN7_L3SQCREG1 0xB010#define VLV_B0_WA_L3SQCREG1_VALUE 0x00D30000 +#define GEN8_L3SQCREG1 0xB100 +#define BDW_WA_L3SQCREG1_DEFAULT 0x00610000 +#define GEN7_L3CNTLREG1 0xB01C#define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C47FF8C#define GEN7_L3AGDIS (1<<19)
drivers/gpu/drm/i915/intel_pm.c +3 -0
@@ -5811,6 +5811,9 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) |GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +/* WaProgramL3SqcReg1Default:bdw */ +I915_WRITE (GEN8_L3SQCREG1 ,BDW_WA_L3SQCREG1_DEFAULT ); +lpt_init_clock_gating (dev); }
Signature · 1 line
1.9.3
Re: [PATCH 3/5] drm/i915/bdw: WaProgramL3SqcReg1Default
Quoted 13 lines · Rodrigo Vivi
Program the default initial value of the L3SqcReg1 on BDW for performance
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 3 +++ 2 files changed, 6 insertions(+)drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum punit_power_well { · line 4826
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -4821,6 +4821,9 @@ enum punit_power_well {#define GEN7_L3SQCREG1 0xB010#define VLV_B0_WA_L3SQCREG1_VALUE 0x00D30000 +#define GEN8_L3SQCREG1 0xB100 +#define BDW_WA_L3SQCREG1_DEFAULT 0x00610000 +
This is the default after reset. I think we want 0x00810000
-Mika
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define GEN7_L3CNTLREG1 0xB01C#define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C47FF8C#define GEN7_L3AGDIS (1<<19)drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c static void broadwell_init_clock_gating(struct drm_device *dev) · line 5816
Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +3
-0@@ -5811,6 +5811,9 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) |GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +/* WaProgramL3SqcReg1Default:bdw */ +I915_WRITE (GEN8_L3SQCREG1 ,BDW_WA_L3SQCREG1_DEFAULT ); +
Should we use intel_ring_emit_wa?
-Mika
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +0
-0lpt_init_clock_gating (dev); }Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/5] drm/i915/bdw: WaProgramL3SqcReg1Default
Quoted 19 lines · Mika Kuoppala
Quoted 16 lines · Rodrigo Vivi
Program the default initial value of the L3SqcReg1 on BDW for performance
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 3 +++ 2 files changed, 6 insertions(+)drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -4821,6 +4821,9 @@ enum punit_power_well {#define GEN7_L3SQCREG1 0xB010#define VLV_B0_WA_L3SQCREG1_VALUE 0x00D30000
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h enum punit_power_well { · line 4826
Quoted 3 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0+#define GEN8_L3SQCREG1 0xB100 +#define BDW_WA_L3SQCREG1_DEFAULT 0x00610000 +This is the default after reset. I think we want
0x00810000
Why do you think that?
Bspec explict says
Default Value: 0x00610000 [BDW]
And bit by bit:
[23:19] 01100b 24 (default)
[18:14] 00100b 8 (default)
0 as default for all other bits what end up on 0x00610000
Quoted 14 lines
-Mika
Quoted 11 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define GEN7_L3CNTLREG1 0xB01C#define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C47FF8C#define GEN7_L3AGDIS (1<<19)drivers/gpu/drm/i915/intel_pm.c +0
-0@@ -5811,6 +5811,9 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) |GEN8_SDEUNIT_CLOCK_GATE_DISABLE );
Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c static void broadwell_init_clock_gating(struct drm_device *dev) · line 5816
Quoted 3 lines
drivers/gpu/drm/i915/intel_pm.c +3
-0+/* WaProgramL3SqcReg1Default:bdw */ +I915_WRITE (GEN8_L3SQCREG1 ,BDW_WA_L3SQCREG1_DEFAULT ); +Should we use
intel_ring_emit_wa?
Yes, this is probably better to do it after all resets right?! I do a v2 after we agree on the default value.
Quoted 17 lines
-Mika
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +0
-1lpt_init_clock_gating (dev); } --1.9.3
_______________________________________________
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
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Re: [PATCH 3/5] drm/i915/bdw: WaProgramL3SqcReg1Default
In reply to Mika KuoppalaQuoted 18 lines · Mika Kuoppala
Quoted 16 lines · Rodrigo Vivi
Program the default initial value of the L3SqcReg1 on BDW for performance
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 3 +++ 2 files changed, 6 insertions(+)drivers/gpu/drm/i915/i915_reg.h +0
-0@@ -4821,6 +4821,9 @@ enum punit_power_well {#define GEN7_L3SQCREG1 0xB010#define VLV_B0_WA_L3SQCREG1_VALUE 0x00D30000
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h enum punit_power_well { · line 4826
Quoted 3 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0+#define GEN8_L3SQCREG1 0xB100 +#define BDW_WA_L3SQCREG1_DEFAULT 0x00610000 +This is the default after reset. I think we want
0x00810000
Digging through some attached mails in the hsd I found this number:0x00784000
This w/a seems to be a real mess. No bspec update, no actual infromation in the w/a db, and even the hsd stuff is more or less useless until you notice there's some attached email dump that has the actual number :(
Quoted 36 lines
-Mika
Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define GEN7_L3CNTLREG1 0xB01C#define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C47FF8C#define GEN7_L3AGDIS (1<<19)drivers/gpu/drm/i915/intel_pm.c +0
-0drivers/gpu/drm/i915/intel_pm.c static void broadwell_init_clock_gating(struct drm_device *dev) · line 5816
Quoted 6 lines
drivers/gpu/drm/i915/intel_pm.c +3
-0@@ -5811,6 +5811,9 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (GEN8_UCGCTL6 ,I915_READ (GEN8_UCGCTL6 ) |GEN8_SDEUNIT_CLOCK_GATE_DISABLE ); +/* WaProgramL3SqcReg1Default:bdw */ +I915_WRITE (GEN8_L3SQCREG1 ,BDW_WA_L3SQCREG1_DEFAULT ); +Should we use
intel_ring_emit_wa?-Mika
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +0
-0lpt_init_clock_gating (dev); }Signature · 6 lines
1.9.3 _______________________________________________ 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
Signature · 2 lines
Ville Syrjälä Intel OTC
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915/bdw: WaProgramL3SqcReg1Default
Program the default initial value of the L3SqcReg1 on BDW for performance
v2: Default confirmed and using intel_ring_emit_wa as Mika pointed out.
--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_ringbuffer.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -4972,6 +4972,9 @@ enum punit_power_well {#define GEN7_L3SQCREG1 0xB010#define VLV_B0_WA_L3SQCREG1_VALUE 0x00D30000 +#define GEN8_L3SQCREG1 0xB100 +#define BDW_WA_L3SQCREG1_DEFAULT 0x00610000 +#define GEN7_L3CNTLREG1 0xB01C#define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C47FF8C#define GEN7_L3AGDIS (1<<19)
drivers/gpu/drm/i915/intel_ringbuffer.c +4 -1
@@ -707,7 +707,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)* update the number of dwords required based on the * actual number of workarounds applied */ - ret =intel_ring_begin (ring,18 ); + ret =intel_ring_begin (ring,21 );if (ret)return ret;
@@ -751,6 +751,9 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)intel_ring_emit_wa (ring,GEN7_GT_MODE ,GEN6_WIZ_HASHING_MASK | GEN6_WIZ_HASHING_16x4); +/* WaProgramL3SqcReg1Default:bdw */ +intel_ring_emit_wa (ring,GEN8_L3SQCREG1 ,BDW_WA_L3SQCREG1_DEFAULT ); +intel_ring_advance (ring); DRM_DEBUG_DRIVER("Number of Workarounds applied: %d\n",
Signature · 1 line
1.9.3
Re: [PATCH] drm/i915/bdw: WaProgramL3SqcReg1Default
Quoted 16 lines · Rodrigo Vivi
Program the default initial value of the L3SqcReg1 on BDW for performance
v2: Default confirmed and using
intel_ring_emit_waas Mika pointed out.Cc Mika Kuoppala <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_ringbuffer.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum punit_power_well { · line 4977
Quoted 6 lines
drivers/gpu/drm/i915/i915_reg.h +3
-0@@ -4972,6 +4972,9 @@ enum punit_power_well {#define GEN7_L3SQCREG1 0xB010#define VLV_B0_WA_L3SQCREG1_VALUE 0x00D30000 +#define GEN8_L3SQCREG1 0xB100 +#define BDW_WA_L3SQCREG1_DEFAULT 0x00610000 +
This is the default value after reset. I have experimented with other values and nothing improves above noise level. Further, my suggestion to using 0x00810000 will cause a gpu hang...so there is dragons here.
As you are writing the same default value that is already in register, and there is no indication that we should refresh anything, I would say this patch is not needed until someone comes along and shows something better than what the default is.
Thanks,
-Mika
Quoted 33 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define GEN7_L3CNTLREG1 0xB01C#define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C47FF8C#define GEN7_L3AGDIS (1<<19)drivers/gpu/drm/i915/intel_ringbuffer.c +4
-1@@ -707,7 +707,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)* update the number of dwords required based on the * actual number of workarounds applied */ - ret =intel_ring_begin (ring,18 ); + ret =intel_ring_begin (ring,21 );if (ret)return ret;@@ -751,6 +751,9 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)intel_ring_emit_wa (ring,GEN7_GT_MODE ,GEN6_WIZ_HASHING_MASK | GEN6_WIZ_HASHING_16x4); +/* WaProgramL3SqcReg1Default:bdw */ +intel_ring_emit_wa (ring,GEN8_L3SQCREG1 ,BDW_WA_L3SQCREG1_DEFAULT ); +intel_ring_advance (ring); DRM_DEBUG_DRIVER("Number of Workarounds applied: %d\n",Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 4/5 drm/i915: Let number of workarounds more clear
In reply to Rodrigo ViviThis helps when including or removing cs workarounds.
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +12 -4
@@ -694,6 +694,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context,
@@ -704,10 +705,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs));/* -* update the number of dwords required based on the -* actual number of workarounds applied +* update the number of workarounds when adding or removing was +* in order the have propper dwords */ - ret =intel_ring_begin (ring,24 ); + wa_amount =8 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;
@@ -775,6 +777,7 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context,
@@ -784,7 +787,12 @@ static int chv_init_workarounds(struct intel_engine_cs *ring) dev_priv->num_wa_regs =0 ;memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs)); - ret =intel_ring_begin (ring,12 ); +/* +* update the number of workarounds when adding or removing was +* in order the have propper dwords +*/ + wa_amount =4 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;
Signature · 1 line
1.9.3
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915: Let number of workarounds more clear
This helps when including or removing cs workarounds.
v2: Rebase after other Mika's patch that removed some BDW production workarounds.
--- drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.c +12 -4
@@ -694,6 +694,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context,
@@ -704,10 +705,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs));/* -* update the number of dwords required based on the -* actual number of workarounds applied +* update the number of workarounds when adding or removing was +* in order the have propper dwords */ - ret =intel_ring_begin (ring,18 ); + wa_amount =6 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;
@@ -764,6 +766,7 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context,
@@ -773,7 +776,12 @@ static int chv_init_workarounds(struct intel_engine_cs *ring) dev_priv->num_wa_regs =0 ;memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs)); - ret =intel_ring_begin (ring,12 ); +/* +* update the number of workarounds when adding or removing was +* in order the have propper dwords +*/ + wa_amount =4 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;
Signature · 1 line
1.9.3
Re: [PATCH 4/5] drm/i915: Let number of workarounds more clear
In reply to Rodrigo ViviQuoted 23 lines · Rodrigo Vivi
This helps when including or removing cs workarounds.
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_ringbuffer.c +1
-1@@ -694,6 +694,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context, @@ -704,10 +705,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs));/* -* update the number of dwords required based on the
drivers/gpu/drm/i915/intel_ringbuffer.c static int bdw_init_workarounds(struct intel_engine_cs *ring) · line 715
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4
-2-* actual number of workarounds applied +* update the number of workarounds when adding or removing was +* in order the have propper dwords */ - ret =intel_ring_begin (ring,24 ); + wa_amount =8 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;
I have a bit mixed feelings with this patch as I have tripped around here myself recently.
I think we should just drop this patch and use:
ret = intel_ring_begin(ring, 3 * <amount>) on the subsequent patches that modify the amount.
This way the intel_ring_begin will always be the one that shows in a diff. And raises alarm if it doesnt. We don't want this to be too transparent and looking too easy for the next reader. As the reviewer is the only and last line of defense ensuring symmetry between intel_ring_begin and amount of emits.
-Mika
Quoted 29 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +7
-1@@ -775,6 +777,7 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context, @@ -784,7 +787,12 @@ static int chv_init_workarounds(struct intel_engine_cs *ring) dev_priv->num_wa_regs =0 ;memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs)); - ret =intel_ring_begin (ring,12 ); +/* +* update the number of workarounds when adding or removing was +* in order the have propper dwords +*/ + wa_amount =4 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerRe: [PATCH 4/5] drm/i915: Let number of workarounds more clear
Quoted 43 lines · Mika Kuoppala
Quoted 23 lines · Rodrigo Vivi
This helps when including or removing cs workarounds.
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_ringbuffer.c +1
-1@@ -694,6 +694,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context, @@ -704,10 +705,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs));/* -* update the number of dwords required based on the drivers/gpu/drm/i915/intel_ringbuffer.c static int bdw_init_workarounds(struct intel_engine_cs *ring) · line 715
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4
-2-* actual number of workarounds applied +* update the number of workarounds when adding or removing was +* in order the have propper dwords */ - ret =intel_ring_begin (ring,24 ); + wa_amount =8 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;I have a bit mixed feelings with this patch as I have tripped around here myself recently.
I think we should just drop this patch and use:
ret =intel_ring_begin(ring, 3 * <amount>)on the subsequent patches that modify the amount.
Quoted 5 lines
This way the
intel_ring_beginwill always be the one that shows in a diff. And raises alarm if it doesnt. We don't want this to be too transparent and looking too easy for the next reader. As the reviewer is the only and last line of defense ensuring symmetry betweenintel_ring_beginand amount of emits.
Considering intel_ring_emit_wa() adds all the needed information to dev_priv->intel_wa_regs and dev_priv->num_wa_regs anyway, we could trivially split this into constructing dev_priv->intel_wa_regs first, and doing intel_ring_begin() and the intel_ring_emit()s next, and not worry about this again.
BR,
Jani.
Quoted 36 lines
-Mika
Quoted 29 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +7
-1@@ -775,6 +777,7 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context, @@ -784,7 +787,12 @@ static int chv_init_workarounds(struct intel_engine_cs *ring) dev_priv->num_wa_regs =0 ;memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs)); - ret =intel_ring_begin (ring,12 ); +/* +* update the number of workarounds when adding or removing was +* in order the have propper dwords +*/ + wa_amount =4 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;Signature · 6 lines
1.9.3 _______________________________________________ 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
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Re: [PATCH 4/5] drm/i915: Let number of workarounds more clear
Quoted 50 lines · Jani Nikula
Quoted 43 lines · Mika Kuoppala
Quoted 23 lines · Rodrigo Vivi
This helps when including or removing cs workarounds.
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_ringbuffer.c +1
-1@@ -694,6 +694,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context, @@ -704,10 +705,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs));/* -* update the number of dwords required based on the drivers/gpu/drm/i915/intel_ringbuffer.c static int bdw_init_workarounds(struct intel_engine_cs *ring) · line 715
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4
-2-* actual number of workarounds applied +* update the number of workarounds when adding or removing was +* in order the have propper dwords */ - ret =intel_ring_begin (ring,24 ); + wa_amount =8 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;I have a bit mixed feelings with this patch as I have tripped around here myself recently.
I think we should just drop this patch and use:
ret =intel_ring_begin(ring, 3 * <amount>)on the subsequent patches that modify the amount.Quoted 5 lines
This way the
intel_ring_beginwill always be the one that shows in a diff. And raises alarm if it doesnt. We don't want this to be too transparent and looking too easy for the next reader. As the reviewer is the only and last line of defense ensuring symmetry betweenintel_ring_beginand amount of emits.
Quoted 3 lines
Considering
intel_ring_emit_wa()adds all the needed information todev_priv->intel_wa_regsanddev_priv->num_wa_regsanyway, we could trivially split this into constructingdev_priv->intel_wa_regsfirst,
And only *once*.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 4/5] drm/i915: Let number of workarounds more clear
Quoted 13 lines · Chris Wilson
Quoted 13 lines
Quoted 12 lines
I have a bit mixed feelings with this patch as I have tripped around here myself recently.
I think we should just drop this patch and use:
ret =intel_ring_begin(ring, 3 * <amount>)on the subsequent patches that modify the amount.This way the
intel_ring_beginwill always be the one that shows in a diff. And raises alarm if it doesnt. We don't want this to be too transparent and looking too easy for the next reader. As the reviewer is the only and last line of defense ensuring symmetry betweenintel_ring_beginand amount of emits.
Quoted 5 lines
Quoted 3 lines
Considering
intel_ring_emit_wa()adds all the needed information todev_priv->intel_wa_regsanddev_priv->num_wa_regsanyway, we could trivially split this into constructingdev_priv->intel_wa_regsfirst,And only *once*.
Note that Arun is signed up to fix all of that, starting with proposing changes upfront.
Signature · 1 line
Damien
Re: [PATCH 4/5] drm/i915: Let number of workarounds more clear
In reply to Jani NikulaQuoted 50 lines · Jani Nikula
Quoted 43 lines · Mika Kuoppala
Quoted 23 lines · Rodrigo Vivi
This helps when including or removing cs workarounds.
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_ringbuffer.c +1
-1@@ -694,6 +694,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context, @@ -704,10 +705,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs));/* -* update the number of dwords required based on the drivers/gpu/drm/i915/intel_ringbuffer.c static int bdw_init_workarounds(struct intel_engine_cs *ring) · line 715
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4
-2-* actual number of workarounds applied +* update the number of workarounds when adding or removing was +* in order the have propper dwords */ - ret =intel_ring_begin (ring,24 ); + wa_amount =8 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;I have a bit mixed feelings with this patch as I have tripped around here myself recently.
I think we should just drop this patch and use:
ret =intel_ring_begin(ring, 3 * <amount>)on the subsequent patches that modify the amount.Quoted 5 lines
This way the
intel_ring_beginwill always be the one that shows in a diff. And raises alarm if it doesnt. We don't want this to be too transparent and looking too easy for the next reader. As the reviewer is the only and last line of defense ensuring symmetry betweenintel_ring_beginand amount of emits.
Quoted 5 lines
Considering
intel_ring_emit_wa()adds all the needed information todev_priv->intel_wa_regsanddev_priv->num_wa_regsanyway, we could trivially split this into constructingdev_priv->intel_wa_regsfirst, and doingintel_ring_begin()and the intel_ring_emit()s next, and not worry about this again.
My RFC series of fixing the workarounds after reset/suspend does this.
-Mika
Quoted 42 lines
BR,
Jani.Quoted 36 lines
-Mika
Quoted 29 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +7
-1@@ -775,6 +777,7 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context, @@ -784,7 +787,12 @@ static int chv_init_workarounds(struct intel_engine_cs *ring) dev_priv->num_wa_regs =0 ;memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs)); - ret =intel_ring_begin (ring,12 ); +/* +* update the number of workarounds when adding or removing was +* in order the have propper dwords +*/ + wa_amount =4 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;Signature · 6 lines
1.9.3 _______________________________________________ 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-gfxSignature · 1 line
Jani Nikula, Intel Open Source Technology Center
Re: [PATCH 4/5] drm/i915: Let number of workarounds more clear
Quoted 52 lines · Mika Kuoppala
Quoted 50 lines · Jani Nikula
Quoted 48 lines · Mika Kuoppala
Quoted 23 lines · Rodrigo Vivi
This helps when including or removing cs workarounds.
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_ringbuffer.c +1
-1@@ -694,6 +694,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context, @@ -704,10 +705,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs));/* -* update the number of dwords required based on the drivers/gpu/drm/i915/intel_ringbuffer.c static int bdw_init_workarounds(struct intel_engine_cs *ring) · line 715
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4
-2-* actual number of workarounds applied +* update the number of workarounds when adding or removing was +* in order the have propper dwords */ - ret =intel_ring_begin (ring,24 ); + wa_amount =8 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;I have a bit mixed feelings with this patch as I have tripped around here myself recently.
I think we should just drop this patch and use:
ret =intel_ring_begin(ring, 3 * <amount>)on the subsequent patches that modify the amount.This way the
intel_ring_beginwill always be the one that shows in a diff. And raises alarm if it doesnt. We don't want this to be too transparent and looking too easy for the next reader. As the reviewer is the only and last line of defense ensuring symmetry betweenintel_ring_beginand amount of emits.
Quoted 7 lines
Quoted 5 lines
Considering
intel_ring_emit_wa()adds all the needed information todev_priv->intel_wa_regsanddev_priv->num_wa_regsanyway, we could trivially split this into constructingdev_priv->intel_wa_regsfirst, and doingintel_ring_begin()and the intel_ring_emit()s next, and not worry about this again.My RFC series of fixing the workarounds after reset/suspend does this.
And so did mine! :-p
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Re: [PATCH 4/5] drm/i915: Let number of workarounds more clear
so please, just ignore this patch anyway.
Quoted 70 lines · Chris Wilson
Quoted 52 lines · Mika Kuoppala
Quoted 50 lines · Jani Nikula
Quoted 48 lines · Mika Kuoppala
Quoted 23 lines · Rodrigo Vivi
This helps when including or removing cs workarounds.
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_ringbuffer.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/intel_ringbuffer.c +1
-1@@ -694,6 +694,7 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)int ret;struct drm_device *dev = ring->dev;struct drm_i915_private *dev_priv = dev->dev_private; +int wa_amount;/* * workarounds applied in this fn are part of register state context, @@ -704,10 +705,11 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)memset (dev_priv->intel_wa_regs,0 ,sizeof (dev_priv->intel_wa_regs));/* -* update the number of dwords required based on the drivers/gpu/drm/i915/intel_ringbuffer.c static int bdw_init_workarounds(struct intel_engine_cs *ring) · line 715
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +4
-2-* actual number of workarounds applied +* update the number of workarounds when adding or removing was +* in order the have propper dwords */ - ret =intel_ring_begin (ring,24 ); + wa_amount =8 ; + ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;I have a bit mixed feelings with this patch as I have tripped around here myself recently.
I think we should just drop this patch and use:
ret =intel_ring_begin(ring, 3 * <amount>)on the subsequent patches that modify the amount.This way the
intel_ring_beginwill always be the one that shows in a diff. And raises alarm if it doesnt. We don't want this to be too transparent and looking too easy for the next reader. As the reviewer is the only and last line of defense ensuring symmetry betweenintel_ring_beginand amount of emits.Quoted 7 lines
Quoted 5 lines
Considering
intel_ring_emit_wa()adds all the needed information todev_priv->intel_wa_regsanddev_priv->num_wa_regsanyway, we could trivially split this into constructingdev_priv->intel_wa_regsfirst, and doingintel_ring_begin()and the intel_ring_emit()s next, and not worry about this again.My RFC series of fixing the workarounds after reset/suspend does this.
And so did mine! :-p
-Chris--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Rodrigo Vivi
maintainerPATCH 5/5 drm/i915/bdw: Remove BDW preproduction W/As until C stepping.
In reply to Rodrigo ViviLet's clean this a bit
--- drivers/gpu/drm/i915/intel_pm.c | 10 ---------- drivers/gpu/drm/i915/intel_ringbuffer.c | 20 ++++---------------- 2 files changed, 4 insertions(+), 26 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -10
@@ -5774,16 +5774,6 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (WM2_LP_ILK ,0 );I915_WRITE (WM1_LP_ILK ,0 ); -/* FIXME(BDW): Check all the w/a, some might only apply to -* pre-production hw. */ - - -I915_WRITE (GAMTARBMODE ,_MASKED_BIT_ENABLE (ARB_MODE_BWGTLB_DISABLE )); - -I915_WRITE (_3D_CHICKEN3, -_MASKED_BIT_ENABLE (_3D_CHICKEN_SDE_LIMIT_FIFO_POLY_DEPTH (2 ))); - -/* WaSwitchSolVfFArbitrationPriority:bdw */ I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL );
drivers/gpu/drm/i915/intel_ringbuffer.c +4 -16
@@ -708,35 +708,23 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)* update the number of workarounds when adding or removing was * in order the have propper dwords */ - wa_amount =8 ; + wa_amount =6 ; ret =intel_ring_begin (ring,3 * wa_amount);if (ret)return ret;/* WaDisablePartialInstShootdown:bdw */ -/* WaDisableThreadStallDopClockGating:bdw */ -/* FIXME: Unclear whether we really need this on production bdw. */ +/* WaDisableThreadStallDopClockGating:bdw (pre-production until D) */ intel_ring_emit_wa (ring,GEN8_ROW_CHICKEN ,_MASKED_BIT_ENABLE (PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE |STALL_DOP_GATING_DISABLE )); -/* WaDisableDopClockGating:bdw May not be needed for production */ +/* WaDisableDopClockGating:bdw */ intel_ring_emit_wa (ring,GEN7_ROW_CHICKEN2 ,_MASKED_BIT_ENABLE (DOP_CLOCK_GATING_DISABLE )); -/* -* This GEN8_CENTROID_PIXEL_OPT_DIS W/A is only needed for -* pre-production hardware -*/ intel_ring_emit_wa (ring,HALF_SLICE_CHICKEN3 , -_MASKED_BIT_ENABLE (GEN8_CENTROID_PIXEL_OPT_DIS - |GEN8_SAMPLER_POWER_BYPASS_DIS )); - -intel_ring_emit_wa (ring,GEN7_HALF_SLICE_CHICKEN1 , -_MASKED_BIT_ENABLE (GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE )); - -intel_ring_emit_wa (ring,COMMON_SLICE_CHICKEN2 , -_MASKED_BIT_ENABLE (GEN8_CSC2_SBE_VUE_CACHE_CONSERVATIVE )); +_MASKED_BIT_ENABLE (GEN8_SAMPLER_POWER_BYPASS_DIS ));/* Use Force Non-Coherent whenever executing a 3D context. This is a * workaround for for a possible hang in the unlikely event a TLB
Signature · 1 line
1.9.3
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915/bdw: Remove BDW preproduction W/As until C stepping.
Let's clean this a bit
v2: Rebase after other Mika's patch that removed some BDW production workarounds.
--- drivers/gpu/drm/i915/intel_pm.c | 10 ---------- drivers/gpu/drm/i915/intel_ringbuffer.c | 5 ++--- 2 files changed, 2 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -10
@@ -5803,16 +5803,6 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (WM2_LP_ILK ,0 );I915_WRITE (WM1_LP_ILK ,0 ); -/* FIXME(BDW): Check all the w/a, some might only apply to -* pre-production hw. */ - - -I915_WRITE (GAMTARBMODE ,_MASKED_BIT_ENABLE (ARB_MODE_BWGTLB_DISABLE )); - -I915_WRITE (_3D_CHICKEN3, -_MASKED_BIT_ENABLE (_3D_CHICKEN_SDE_LIMIT_FIFO_POLY_DEPTH (2 ))); - -/* WaSwitchSolVfFArbitrationPriority:bdw */ I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL );
drivers/gpu/drm/i915/intel_ringbuffer.c +2 -3
@@ -714,13 +714,12 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)return ret;/* WaDisablePartialInstShootdown:bdw */ -/* WaDisableThreadStallDopClockGating:bdw */ -/* FIXME: Unclear whether we really need this on production bdw. */ +/* WaDisableThreadStallDopClockGating:bdw (pre-production until D) */ intel_ring_emit_wa (ring,GEN8_ROW_CHICKEN ,_MASKED_BIT_ENABLE (PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE |STALL_DOP_GATING_DISABLE )); -/* WaDisableDopClockGating:bdw May not be needed for production */ +/* WaDisableDopClockGating:bdw */ intel_ring_emit_wa (ring,GEN7_ROW_CHICKEN2 ,_MASKED_BIT_ENABLE (DOP_CLOCK_GATING_DISABLE ));
Signature · 1 line
1.9.3
Re: [PATCH] drm/i915/bdw: Remove BDW preproduction W/As until C stepping.
Just a note that v2 here can be useful and applied even without the patch 4/5 which I asked to ignore for now.
Mika, could you please help on review of this?
Quoted 58 lines · Rodrigo Vivi
Let's clean this a bit
v2: Rebase after other Mika's patch that removed some BDW production workarounds.
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 10 ---------- drivers/gpu/drm/i915/intel_ringbuffer.c | 5 ++--- 2 files changed, 2 insertions(+), 13 deletions(-)drivers/gpu/drm/i915/intel_pm.c +0
-10@@ -5803,16 +5803,6 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (WM2_LP_ILK ,0 );I915_WRITE (WM1_LP_ILK ,0 ); -/* FIXME(BDW): Check all the w/a, some might only apply to -* pre-production hw. */ - - -I915_WRITE (GAMTARBMODE ,_MASKED_BIT_ENABLE (ARB_MODE_BWGTLB_DISABLE )); - -I915_WRITE (_3D_CHICKEN3, -_MASKED_BIT_ENABLE (_3D_CHICKEN_SDE_LIMIT_FIFO_POLY_DEPTH (2 ))); - -/* WaSwitchSolVfFArbitrationPriority:bdw */ I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL );drivers/gpu/drm/i915/intel_ringbuffer.c +2
-4@@ -714,13 +714,12 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)return ret;/* WaDisablePartialInstShootdown:bdw */ -/* WaDisableThreadStallDopClockGating:bdw */ -/* FIXME: Unclear whether we really need this on production bdw. */ +/* WaDisableThreadStallDopClockGating:bdw (pre-production until D) */ intel_ring_emit_wa (ring,GEN8_ROW_CHICKEN ,_MASKED_BIT_ENABLE (PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE |STALL_DOP_GATING_DISABLE )); -/* WaDisableDopClockGating:bdw May not be needed for production */ +/* WaDisableDopClockGating:bdw */ intel_ring_emit_wa (ring,GEN7_ROW_CHICKEN2 ,_MASKED_BIT_ENABLE (DOP_CLOCK_GATING_DISABLE )); --1.9.3
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 2 lines
Rodrigo Vivi Blog: http://blog.vivi.eng.br
Re: [PATCH] drm/i915/bdw: Remove BDW preproduction W/As until C stepping.
In reply to Rodrigo ViviQuoted 42 lines · Rodrigo Vivi
Let's clean this a bit
v2: Rebase after other Mika's patch that removed some BDW production workarounds.
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 10 ---------- drivers/gpu/drm/i915/intel_ringbuffer.c | 5 ++--- 2 files changed, 2 insertions(+), 13 deletions(-)drivers/gpu/drm/i915/intel_pm.c +0
-10@@ -5803,16 +5803,6 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (WM2_LP_ILK ,0 );I915_WRITE (WM1_LP_ILK ,0 ); -/* FIXME(BDW): Check all the w/a, some might only apply to -* pre-production hw. */ - - -I915_WRITE (GAMTARBMODE ,_MASKED_BIT_ENABLE (ARB_MODE_BWGTLB_DISABLE )); - -I915_WRITE (_3D_CHICKEN3, -_MASKED_BIT_ENABLE (_3D_CHICKEN_SDE_LIMIT_FIFO_POLY_DEPTH (2 ))); - -/* WaSwitchSolVfFArbitrationPriority:bdw */ I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL );drivers/gpu/drm/i915/intel_ringbuffer.c +1
-2@@ -714,13 +714,12 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)return ret;/* WaDisablePartialInstShootdown:bdw */ -/* WaDisableThreadStallDopClockGating:bdw */ -/* FIXME: Unclear whether we really need this on production bdw. */ +/* WaDisableThreadStallDopClockGating:bdw (pre-production until
Quoted 1 line
D) */
Just remove the fixme line here and dont add D.
drivers/gpu/drm/i915/intel_ringbuffer.c static int bdw_init_workarounds(struct intel_engine_cs *ring) · line 722
Quoted 6 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +1
-1intel_ring_emit_wa (ring,GEN8_ROW_CHICKEN ,_MASKED_BIT_ENABLE (PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE |STALL_DOP_GATING_DISABLE )); -/* WaDisableDopClockGating:bdw May not be needed for production */ +/* WaDisableDopClockGating:bdw */
With comment fixed:
Quoted 10 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0
-0intel_ring_emit_wa (ring,GEN7_ROW_CHICKEN2 ,_MASKED_BIT_ENABLE (DOP_CLOCK_GATING_DISABLE ));Signature · 7 lines
-- 1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerPATCH 1/1 drm/i915/bdw: Remove BDW preproduction W/As until C stepping.
Let's clean this a bit
v2: Rebase after other Mika's patch that removed some BDW production workarounds.
v3: Removed stepping info.
--- drivers/gpu/drm/i915/intel_pm.c | 10 ---------- drivers/gpu/drm/i915/intel_ringbuffer.c | 5 ++--- 2 files changed, 2 insertions(+), 13 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -10
@@ -5654,16 +5654,6 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (WM2_LP_ILK ,0 );I915_WRITE (WM1_LP_ILK ,0 ); -/* FIXME(BDW): Check all the w/a, some might only apply to -* pre-production hw. */ - - -I915_WRITE (GAMTARBMODE ,_MASKED_BIT_ENABLE (ARB_MODE_BWGTLB_DISABLE )); - -I915_WRITE (_3D_CHICKEN3, -_MASKED_BIT_ENABLE (_3D_CHICKEN_SDE_LIMIT_FIFO_POLY_DEPTH (2 ))); - -/* WaSwitchSolVfFArbitrationPriority:bdw */ I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL );
drivers/gpu/drm/i915/intel_ringbuffer.c +2 -3
@@ -712,13 +712,12 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)return ret;/* WaDisablePartialInstShootdown:bdw */ -/* WaDisableThreadStallDopClockGating:bdw */ -/* FIXME: Unclear whether we really need this on production bdw. */ +/* WaDisableThreadStallDopClockGating:bdw (pre-production) */ intel_ring_emit_wa (ring,GEN8_ROW_CHICKEN ,_MASKED_BIT_ENABLE (PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE |STALL_DOP_GATING_DISABLE )); -/* WaDisableDopClockGating:bdw May not be needed for production */ +/* WaDisableDopClockGating:bdw */ intel_ring_emit_wa (ring,GEN7_ROW_CHICKEN2 ,_MASKED_BIT_ENABLE (DOP_CLOCK_GATING_DISABLE ));
Signature · 1 line
1.9.3
Daniel Vetter
AppliedRe: [PATCH] drm/i915/bdw: Remove BDW preproduction W/As until C stepping.
Quoted 7 lines · Rodrigo Vivi
Let's clean this a bit
v2: Rebase after other Mika's patch that removed some BDW production workarounds.
v3: Removed stepping info.Reviewed-by Mika Kuoppala <[email protected]>Signed-off-by Rodrigo Vivi <[email protected]>
Queued for -next, thanks for the patch.
-Daniel
Quoted 53 lines
--- drivers/gpu/drm/i915/intel_pm.c | 10 ---------- drivers/gpu/drm/i915/intel_ringbuffer.c | 5 ++--- 2 files changed, 2 insertions(+), 13 deletions(-)drivers/gpu/drm/i915/intel_pm.c +0
-10@@ -5654,16 +5654,6 @@ static void broadwell_init_clock_gating(struct drm_device *dev)I915_WRITE (WM2_LP_ILK ,0 );I915_WRITE (WM1_LP_ILK ,0 ); -/* FIXME(BDW): Check all the w/a, some might only apply to -* pre-production hw. */ - - -I915_WRITE (GAMTARBMODE ,_MASKED_BIT_ENABLE (ARB_MODE_BWGTLB_DISABLE )); - -I915_WRITE (_3D_CHICKEN3, -_MASKED_BIT_ENABLE (_3D_CHICKEN_SDE_LIMIT_FIFO_POLY_DEPTH (2 ))); - -/* WaSwitchSolVfFArbitrationPriority:bdw */ I915_WRITE (GAM_ECOCHK ,I915_READ (GAM_ECOCHK ) |HSW_ECOCHK_ARB_PRIO_SOL );drivers/gpu/drm/i915/intel_ringbuffer.c +2
-3@@ -712,13 +712,12 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)return ret;/* WaDisablePartialInstShootdown:bdw */ -/* WaDisableThreadStallDopClockGating:bdw */ -/* FIXME: Unclear whether we really need this on production bdw. */ +/* WaDisableThreadStallDopClockGating:bdw (pre-production) */ intel_ring_emit_wa (ring,GEN8_ROW_CHICKEN ,_MASKED_BIT_ENABLE (PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE |STALL_DOP_GATING_DISABLE )); -/* WaDisableDopClockGating:bdw May not be needed for production */ +/* WaDisableDopClockGating:bdw */ intel_ring_emit_wa (ring,GEN7_ROW_CHICKEN2 ,_MASKED_BIT_ENABLE (DOP_CLOCK_GATING_DISABLE ));Signature · 6 lines
1.9.3 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 12 lines · On Fri, 19 Sep 2014 20:16:26 -0400 Rodrigo Vivi <[email protected]> wrote:
It will be usefull to specify w/a that affects only BDW GT3.
Signed-off-by Rodrigo Vivi <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/i915/i915_drv.h +0
-0
drivers/gpu/drm/i915/i915_drv.h struct drm_i915_cmd_table { · line 2106
Quoted 8 lines
drivers/gpu/drm/i915/i915_drv.h +2
-0@@ -2099,6 +2099,8 @@ struct drm_i915_cmd_table { ((INTEL_DEVID(dev) & 0xf) == 0x2 || \ (INTEL_DEVID(dev) & 0xf) == 0x6 || \ (INTEL_DEVID(dev) & 0xf) == 0xe)) +#define IS_BDW_GT3 (dev) (IS_BROADWELL(dev) && \ + (INTEL_DEVID(dev) & 0x00F0) == 0x0020)#define IS_HSW_ULT (dev) (IS_HASWELL(dev) && \ (INTEL_DEVID(dev) & 0xFF00) == 0x0A00)#define IS_ULT (dev) (IS_HSW_ULT(dev) || IS_BDW_ULT(dev))
Looks correct based on the configs I'm staring at...
Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center