drm/i915/tgl: Add IS_TGL_REVID
Subsystems (2)
PATCH 1/11 drm/i915/tgl: Add IS_TGL_REVID
We are going to need this macro on limiting
the workaround scope.
--- drivers/gpu/drm/i915/i915_drv.h | 5 +++++ 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/i915_drv.h +5 -0
@@ -1686,6 +1686,11 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define IS_ICL_REVID (p, since, until) \ (IS_ICELAKE(p) && IS_REVID(p, since, until)) +#define TGL_REVID_A0 0x0 + +#define IS_TGL_REVID (p, since, until) \ + (IS_TIGERLAKE(p) && IS_REVID(p, since, until)) +#define IS_LP (dev_priv) (INTEL_INFO(dev_priv)->is_lp)#define IS_GEN9_LP (dev_priv) (IS_GEN(dev_priv, 9) && IS_LP(dev_priv))#define IS_GEN9_BC (dev_priv) (IS_GEN(dev_priv, 9) && !IS_LP(dev_priv))
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/11 drm/i915/tgl: Include ro parts of l3 to invalidate
Aim for completeness and invalidate also the ro parts in l3 cache. This might allow to get rid of the preparser disable/enable workaround on invalidation path.
--- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + drivers/gpu/drm/i915/gt/intel_lrc.c | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +1 -0
@@ -233,6 +233,7 @@#define PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH (1<<12)/* gen6+ */ #define PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE (1<<11)/* MBZ on ILK */ #define PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE (1<<10)/* GM45+ only */ +#define PIPE_CONTROL_L3_RO_CACHE_INVALIDATE (1<<10)/* gen12 */ #define PIPE_CONTROL_INDIRECT_STATE_DISABLE (1<<9)#define PIPE_CONTROL_NOTIFY (1<<8)#define PIPE_CONTROL_FLUSH_ENABLE (1<<7)/* gen7+ */
drivers/gpu/drm/i915/gt/intel_lrc.c +1 -0
@@ -3231,6 +3231,7 @@ static int gen12_emit_flush_render(struct i915_request *request, flags |=PIPE_CONTROL_VF_CACHE_INVALIDATE ; flags |=PIPE_CONTROL_CONST_CACHE_INVALIDATE ; flags |=PIPE_CONTROL_STATE_CACHE_INVALIDATE ; + flags |=PIPE_CONTROL_L3_RO_CACHE_INVALIDATE ; flags |=PIPE_CONTROL_STORE_DATA_INDEX ; flags |=PIPE_CONTROL_QW_WRITE ;
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/11 drm/i915/tgl: Add HDC Pipeline Flush
In reply to Mika KuoppalaAdd hdc pipeline flush to ensure memory state is coherent in L3 when we are done.
v2: Flush also in breadcrumbs (Chris)
--- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 + drivers/gpu/drm/i915/gt/intel_lrc.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +1 -0
@@ -235,6 +235,7 @@#define PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE (1<<10)/* GM45+ only */ #define PIPE_CONTROL_L3_RO_CACHE_INVALIDATE (1<<10)/* gen12 */ #define PIPE_CONTROL_INDIRECT_STATE_DISABLE (1<<9) +#define PIPE_CONTROL_HDC_PIPELINE_FLUSH (1<<9)/* gen 12 */ #define PIPE_CONTROL_NOTIFY (1<<8)#define PIPE_CONTROL_FLUSH_ENABLE (1<<7)/* gen7+ */ #define PIPE_CONTROL_DC_FLUSH_ENABLE (1<<5)
drivers/gpu/drm/i915/gt/intel_lrc.c +4 -1
@@ -3206,6 +3206,7 @@ static int gen12_emit_flush_render(struct i915_request *request, flags |=PIPE_CONTROL_DEPTH_CACHE_FLUSH ; flags |=PIPE_CONTROL_DC_FLUSH_ENABLE ; flags |=PIPE_CONTROL_FLUSH_ENABLE ; + flags |=PIPE_CONTROL_HDC_PIPELINE_FLUSH ; flags |=PIPE_CONTROL_STORE_DATA_INDEX ; flags |=PIPE_CONTROL_QW_WRITE ;
@@ -3416,7 +3417,9 @@ gen12_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs)PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH |PIPE_CONTROL_DEPTH_CACHE_FLUSH |PIPE_CONTROL_DC_FLUSH_ENABLE | - PIPE_CONTROL_FLUSH_ENABLE); +PIPE_CONTROL_FLUSH_ENABLE | + PIPE_CONTROL_HDC_PIPELINE_FLUSH); +return gen12_emit_fini_breadcrumb_footer (request, cs); }
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 03/11] drm/i915/tgl: Add HDC Pipeline Flush
Quoting Mika Kuoppala (2019-10-15 16:44:41)
Quoted 7 lines
Add hdc pipeline flush to ensure memory state is coherent in L3 when we are done.
v2: Flush also in breadcrumbs (Chris)
Cc Chris Wilson <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>
drivers/gpu/drm/i915/gt/intel_lrc.c gen12_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs) · line 3422
Quoted 9 lines
---
drivers/gpu/drm/i915/gt/intel_lrc.c +3
-1@@ -3416,7 +3417,9 @@ gen12_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs)PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH |PIPE_CONTROL_DEPTH_CACHE_FLUSH |PIPE_CONTROL_DC_FLUSH_ENABLE | - PIPE_CONTROL_FLUSH_ENABLE); +PIPE_CONTROL_FLUSH_ENABLE | + PIPE_CONTROL_HDC_PIPELINE_FLUSH); +
Bonus!
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/11 drm/i915/tgl: Add extra hdc flush workaround
In reply to Mika KuoppalaIn order to ensure constant caches are invalidated properly with a0, we need extra hdc flush after invalidation.
v2: use IS_TGL_REVID (Chris)
References: HSDES#1604544889
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
drivers/gpu/drm/i915/gt/intel_lrc.c +20 -0
@@ -3254,6 +3254,26 @@ static int gen12_emit_flush_render(struct i915_request *request, *cs++ =preparser_disable (false);intel_ring_advance (request, cs); + +/* +* Wa_1604544889:tgl +*/ +if (IS_TGL_REVID (request->i915,TGL_REVID_A0 ,TGL_REVID_A0 )) { + flags =0 ; + flags |=PIPE_CONTROL_CS_STALL ; + flags |=PIPE_CONTROL_HDC_PIPELINE_FLUSH ; + + flags |=PIPE_CONTROL_STORE_DATA_INDEX ; + flags |=PIPE_CONTROL_QW_WRITE ; + + cs =intel_ring_begin (request,6 ); +if (IS_ERR (cs)) +return PTR_ERR (cs); + + cs =gen8_emit_pipe_control (cs, flags, +LRC_PPHWSP_SCRATCH_ADDR ); +intel_ring_advance (request, cs); + } }return 0 ;
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 04/11] drm/i915/tgl: Add extra hdc flush workaround
Quoting Mika Kuoppala (2019-10-15 16:44:42)
Quoted 7 lines
In order to ensure constant caches are invalidated properly with a0, we need extra hdc flush after invalidation.
v2: use
IS_TGL_REVID(Chris)References: HSDES#1604544889
Signed-off-by Mika Kuoppala <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/11 drm/i915/tgl: Keep FF dop clock enabled for A0
In reply to Mika KuoppalaTo ensure correct state data for compute workloads, we need to keep the ff dop clock enabled.
References: HSDES#1606700617
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 9 ++++++++- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_workarounds.c +8 -1
@@ -567,7 +567,7 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,static void tgl_ctx_workarounds_init (struct intel_engine_cs *engine,struct i915_wa_list *wal) { -/* Wa_1409142259 */ +/* Wa_1409142259:tgl */ WA_SET_BIT_MASKED (GEN11_COMMON_SLICE_CHICKEN3 ,GEN12_DISABLE_CPS_AWARE_COLOR_PIPE ); }
@@ -1260,6 +1260,13 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) {struct drm_i915_private *i915 = engine->i915; +if (IS_TGL_REVID (i915,TGL_REVID_A0 ,TGL_REVID_A0 )) { +/* Wa_1606700617:tgl */ +wa_masked_en (wal, +GEN9_CS_DEBUG_MODE1 , +FF_DOP_CLOCK_GATE_DISABLE ); + } +if (IS_GEN (i915,11 )) {/* This is not an Wa. Enable for better image quality */ wa_masked_en(wal,
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -7671,6 +7671,7 @@ enum {#define GEN9_POOLED_EU_LOAD_BALANCING_FIX_DISABLE (1 << 10)#define GEN9_CS_DEBUG_MODE1 _MMIO(0x20ec) +#define FF_DOP_CLOCK_GATE_DISABLE BIT(1)#define GEN9_CTX_PREEMPT_REG _MMIO(0x2248)#define GEN8_CS_CHICKEN1 _MMIO(0x2580)#define GEN9_PREEMPT_3D_OBJECT_LEVEL (1 << 0)
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 05/11] drm/i915/tgl: Keep FF dop clock enabled for A0
Quoting Mika Kuoppala (2019-10-15 16:44:43)
Quoted 24 lines
To ensure correct state data for compute workloads, we need to keep the ff dop clock enabled.
References: HSDES#1606700617
Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 9 ++++++++- drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 9 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/gt/intel_workarounds.c +1
-1@@ -567,7 +567,7 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,static void tgl_ctx_workarounds_init (struct intel_engine_cs *engine,struct i915_wa_list *wal) { -/* Wa_1409142259 */ +/* Wa_1409142259:tgl */ WA_SET_BIT_MASKED (GEN11_COMMON_SLICE_CHICKEN3 ,GEN12_DISABLE_CPS_AWARE_COLOR_PIPE ); }
drivers/gpu/drm/i915/gt/intel_workarounds.c rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) · line 1268
Quoted 9 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +6
-0@@ -1260,6 +1260,13 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) {struct drm_i915_private *i915 = engine->i915; +if (IS_TGL_REVID (i915,TGL_REVID_A0 ,TGL_REVID_A0 )) { +/* Wa_1606700617:tgl */ +wa_masked_en (wal, +GEN9_CS_DEBUG_MODE1 , +FF_DOP_CLOCK_GATE_DISABLE ); + }
Bah, and they wanted it dynamic!
drivers/gpu/drm/i915/i915_reg.h enum { · line 7674
Quoted 13 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +1
-0+if (IS_GEN (i915,11 )) {/* This is not an Wa. Enable for better image quality */ wa_masked_en(wal,drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -7671,6 +7671,7 @@ enum {#define GEN9_POOLED_EU_LOAD_BALANCING_FIX_DISABLE (1 << 10)#define GEN9_CS_DEBUG_MODE1 _MMIO(0x20ec) +#define FF_DOP_CLOCK_GATE_DISABLE BIT(1)
REG_BIT(1)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 6/11 drm/i915/tgl: Wa_1409420604
In reply to Mika KuoppalaAvoid possible hang in CPSS unit.
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +++++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 8 insertions(+)
drivers/gpu/drm/i915/gt/intel_workarounds.c +5 -0
@@ -897,6 +897,11 @@ icl_gt_workarounds_init(struct drm_i915_private *i915, struct i915_wa_list *wal)static void tgl_gt_workarounds_init (struct drm_i915_private *i915,struct i915_wa_list *wal) { +/* Wa_1409420604:tgl */ +if (IS_TGL_REVID (i915,TGL_REVID_A0 ,TGL_REVID_A0 )) +wa_write_or (wal, +SUBSLICE_UNIT_LEVEL_CLKGATE2 , +CPSSUNIT_CLKGATE_DIS ); } static void
drivers/gpu/drm/i915/i915_reg.h +3 -0
@@ -4054,6 +4054,9 @@ enum {#define SUBSLICE_UNIT_LEVEL_CLKGATE _MMIO(0x9524)#define GWUNIT_CLKGATE_DIS (1 << 16) +#define SUBSLICE_UNIT_LEVEL_CLKGATE2 _MMIO(0x9528) +#define CPSSUNIT_CLKGATE_DIS (1 << 9) +#define UNSLICE_UNIT_LEVEL_CLKGATE _MMIO(0x9434)#define VFUNIT_CLKGATE_DIS (1 << 20)
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 06/11] drm/i915/tgl: Wa_1409420604
Quoting Mika Kuoppala (2019-10-15 16:44:44)
Quoted 29 lines
Avoid possible hang in CPSS unit.
Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +++++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 8 insertions(+)drivers/gpu/drm/i915/gt/intel_workarounds.c +5
-0@@ -897,6 +897,11 @@ icl_gt_workarounds_init(struct drm_i915_private *i915, struct i915_wa_list *wal)static void tgl_gt_workarounds_init (struct drm_i915_private *i915,struct i915_wa_list *wal) { +/* Wa_1409420604:tgl */ +if (IS_TGL_REVID (i915,TGL_REVID_A0 ,TGL_REVID_A0 )) +wa_write_or (wal, +SUBSLICE_UNIT_LEVEL_CLKGATE2 , +CPSSUNIT_CLKGATE_DIS ); } static voiddrivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum { · line 4058
Quoted 5 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -4054,6 +4054,9 @@ enum {#define SUBSLICE_UNIT_LEVEL_CLKGATE _MMIO(0x9524)#define GWUNIT_CLKGATE_DIS (1 << 16) +#define SUBSLICE_UNIT_LEVEL_CLKGATE2 _MMIO(0x9528) +#define CPSSUNIT_CLKGATE_DIS (1 << 9)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 7/11 drm/i915/tgl: Wa_1409170338
In reply to Mika KuoppalaAvoid possible hang in tsg,vfe units by keeping
l3 clocks runnings.
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/gt/intel_workarounds.c +6 -0
@@ -902,6 +902,12 @@ tgl_gt_workarounds_init(struct drm_i915_private *i915, struct i915_wa_list *wal)wa_write_or (wal,SUBSLICE_UNIT_LEVEL_CLKGATE2 ,CPSSUNIT_CLKGATE_DIS ); + +/* Wa_1409180338:tgl */ +if (IS_TGL_REVID (i915,TGL_REVID_A0 ,TGL_REVID_A0 )) +wa_write_or (wal, +SLICE_UNIT_LEVEL_CLKGATE , +L3_CLKGATE_DIS |L3_CR2X_CLKGATE_DIS ); } static void
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 07/11] drm/i915/tgl: Wa_1409170338
Quoting Mika Kuoppala (2019-10-15 16:44:45)
Quoted 13 lines
Avoid possible hang in tsg,vfe units by keeping
l3 clocks runnings.Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/i915/gt/intel_workarounds.c +0
-0
drivers/gpu/drm/i915/gt/intel_workarounds.c tgl_gt_workarounds_init(struct drm_i915_private *i915, struct i915_wa_list *wal) · line 911
Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +6
-0@@ -902,6 +902,12 @@ tgl_gt_workarounds_init(struct drm_i915_private *i915, struct i915_wa_list *wal)wa_write_or (wal,SUBSLICE_UNIT_LEVEL_CLKGATE2 ,CPSSUNIT_CLKGATE_DIS ); + +/* Wa_1409180338:tgl */ +if (IS_TGL_REVID (i915,TGL_REVID_A0 ,TGL_REVID_A0 )) +wa_write_or (wal, +SLICE_UNIT_LEVEL_CLKGATE , +L3_CLKGATE_DIS |L3_CR2X_CLKGATE_DIS ); }
I've seen this somewhere before... ;)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 8/11 drm/i915/tgl: Wa_1409600907
In reply to Mika KuoppalaTo avoid possible hang, we need to add depth stall if we flush the depth cache.
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/gt/intel_lrc.c +4 -0
@@ -3204,6 +3204,8 @@ static int gen12_emit_flush_render(struct i915_request *request, flags |=PIPE_CONTROL_TILE_CACHE_FLUSH ; flags |=PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH ; flags |=PIPE_CONTROL_DEPTH_CACHE_FLUSH ; +/* Wa_1409600907:tgl */ + flags |=PIPE_CONTROL_DEPTH_STALL ; flags |=PIPE_CONTROL_DC_FLUSH_ENABLE ; flags |=PIPE_CONTROL_FLUSH_ENABLE ; flags |=PIPE_CONTROL_HDC_PIPELINE_FLUSH ;
@@ -3436,6 +3438,8 @@ gen12_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs)PIPE_CONTROL_TILE_CACHE_FLUSH |PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH |PIPE_CONTROL_DEPTH_CACHE_FLUSH | +/* Wa_1409600907:tgl */ +PIPE_CONTROL_DEPTH_STALL |PIPE_CONTROL_DC_FLUSH_ENABLE |PIPE_CONTROL_FLUSH_ENABLE | PIPE_CONTROL_HDC_PIPELINE_FLUSH);
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 08/11] drm/i915/tgl: Wa_1409600907
Quoting Mika Kuoppala (2019-10-15 16:44:46)
Quoted 22 lines
To avoid possible hang, we need to add depth stall if we flush the depth cache.
Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/gt/intel_lrc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/i915/gt/intel_lrc.c +2
-0@@ -3204,6 +3204,8 @@ static int gen12_emit_flush_render(struct i915_request *request, flags |=PIPE_CONTROL_TILE_CACHE_FLUSH ; flags |=PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH ; flags |=PIPE_CONTROL_DEPTH_CACHE_FLUSH ; +/* Wa_1409600907:tgl */ + flags |=PIPE_CONTROL_DEPTH_STALL ; flags |=PIPE_CONTROL_DC_FLUSH_ENABLE ; flags |=PIPE_CONTROL_FLUSH_ENABLE ; flags |=PIPE_CONTROL_HDC_PIPELINE_FLUSH ;
drivers/gpu/drm/i915/gt/intel_lrc.c gen12_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs) · line 3442
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +2
-0@@ -3436,6 +3438,8 @@ gen12_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs)PIPE_CONTROL_TILE_CACHE_FLUSH |PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH |PIPE_CONTROL_DEPTH_CACHE_FLUSH | +/* Wa_1409600907:tgl */ + PIPE_CONTROL_DEPTH_STALL |
The advice is indeed to ignore bspec and just set the bit regardless of the programming notes.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 9/11 drm/i915/tgl: Wa_1607138336
In reply to Mika KuoppalaAvoid possible deadlock on context switch.
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +++++ drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 7 insertions(+)
drivers/gpu/drm/i915/gt/intel_workarounds.c +5 -0
@@ -1276,6 +1276,11 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)wa_masked_en (wal,GEN9_CS_DEBUG_MODE1 ,FF_DOP_CLOCK_GATE_DISABLE ); + +/* Wa_1607138336:tgl */ +wa_write_or (wal, +GEN9_CTX_PREEMPT_REG , +GEN12_DISABLE_POSH_BUSY_FF_DOP_CG ); }if (IS_GEN (i915,11 )) {
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -7676,6 +7676,8 @@ enum {#define GEN9_CS_DEBUG_MODE1 _MMIO(0x20ec)#define FF_DOP_CLOCK_GATE_DISABLE BIT(1)#define GEN9_CTX_PREEMPT_REG _MMIO(0x2248) +#define GEN12_DISABLE_POSH_BUSY_FF_DOP_CG (1 << 11) +#define GEN8_CS_CHICKEN1 _MMIO(0x2580)#define GEN9_PREEMPT_3D_OBJECT_LEVEL (1 << 0)#define GEN9_PREEMPT_GPGPU_LEVEL (hi, lo) (((hi) << 2) | ((lo) << 1))
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 09/11] drm/i915/tgl: Wa_1607138336
Quoting Mika Kuoppala (2019-10-15 16:44:47)
Quoted 29 lines
Avoid possible deadlock on context switch.
Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 +++++ drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 7 insertions(+)drivers/gpu/drm/i915/gt/intel_workarounds.c +5
-0@@ -1276,6 +1276,11 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)wa_masked_en (wal,GEN9_CS_DEBUG_MODE1 ,FF_DOP_CLOCK_GATE_DISABLE ); + +/* Wa_1607138336:tgl */ +wa_write_or (wal, +GEN9_CTX_PREEMPT_REG , +GEN12_DISABLE_POSH_BUSY_FF_DOP_CG ); }if (IS_GEN (i915,11 )) {drivers/gpu/drm/i915/i915_reg.h +0
-0
drivers/gpu/drm/i915/i915_reg.h enum { · line 7679
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -7676,6 +7676,8 @@ enum {#define GEN9_CS_DEBUG_MODE1 _MMIO(0x20ec)#define FF_DOP_CLOCK_GATE_DISABLE BIT(1)#define GEN9_CTX_PREEMPT_REG _MMIO(0x2248) +#define GEN12_DISABLE_POSH_BUSY_FF_DOP_CG (1 << 11)
REG_BIT(11)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 10/11 drm/i915/tgl: Wa_1607030317, Wa_1607186500, Wa_1607297627
In reply to Mika KuoppalaDisable semaphore idle messages and wait for event power downs.
--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 ++++++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 9 insertions(+)
drivers/gpu/drm/i915/gt/intel_workarounds.c +8 -0
@@ -1281,6 +1281,14 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)wa_write_or (wal,GEN9_CTX_PREEMPT_REG ,GEN12_DISABLE_POSH_BUSY_FF_DOP_CG ); + +/* Wa_1607030317:tgl */ +/* Wa_1607186500:tgl */ +/* Wa_1607297627:tgl */ +wa_masked_en (wal, +GEN6_RC_SLEEP_PSMI_CONTROL , +GEN12_WAIT_FOR_EVENT_POWER_DOWN_DISABLE | +GEN8_RC_SEMA_IDLE_MSG_DISABLE ); }if (IS_GEN (i915,11 )) {
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -2885,6 +2885,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define GEN6_RC_SLEEP_PSMI_CONTROL _MMIO(0x2050)#define GEN6_PSMI_SLEEP_MSG_DISABLE (1 << 0) +#define GEN12_WAIT_FOR_EVENT_POWER_DOWN_DISABLE (1 << 7)#define GEN8_RC_SEMA_IDLE_MSG_DISABLE (1 << 12)#define GEN8_FF_DOP_CLOCK_GATE_DISABLE (1 << 10)
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 10/11] drm/i915/tgl: Wa_1607030317, Wa_1607186500, Wa_1607297627
Quoting Mika Kuoppala (2019-10-15 16:44:48)
Quoted 15 lines
Disable semaphore idle messages and wait for event power downs.
Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 ++++++++ drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 9 insertions(+)drivers/gpu/drm/i915/gt/intel_workarounds.c +0
-0@@ -1281,6 +1281,14 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) wa_write_or(wal,
drivers/gpu/drm/i915/gt/intel_workarounds.c rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) · line 1291
Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +8
-0GEN9_CTX_PREEMPT_REG , GEN12_DISABLE_POSH_BUSY_FF_DOP_CG); + +/* Wa_1607030317:tgl */ +/* Wa_1607186500:tgl */ +/* Wa_1607297627:tgl */ +wa_masked_en (wal, +GEN6_RC_SLEEP_PSMI_CONTROL , +GEN12_WAIT_FOR_EVENT_POWER_DOWN_DISABLE | +GEN8_RC_SEMA_IDLE_MSG_DISABLE );
rcs only, ack.
drivers/gpu/drm/i915/i915_reg.h static inline bool i915_mmio_reg_valid(i915_reg_t reg) · line 2888
Quoted 12 lines
drivers/gpu/drm/i915/gt/intel_workarounds.c +0
-0}if (IS_GEN (i915,11 )) {drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -2885,6 +2885,7 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define GEN6_RC_SLEEP_PSMI_CONTROL _MMIO(0x2050)#define GEN6_PSMI_SLEEP_MSG_DISABLE (1 << 0) +#define GEN12_WAIT_FOR_EVENT_POWER_DOWN_DISABLE (1 << 7)
REG_BIT(7)
drivers/gpu/drm/i915/i915_reg.h static inline bool i915_mmio_reg_valid(i915_reg_t reg) · line 2890
Quoted 2 lines
drivers/gpu/drm/i915/i915_reg.h +0
-0#define GEN8_RC_SEMA_IDLE_MSG_DISABLE (1 << 12)#define GEN8_FF_DOP_CLOCK_GATE_DISABLE (1 << 10)
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 11/11 drm/i915/tgl: Wa_1607138340
In reply to Mika KuoppalaAvoid possible cs hang with semaphores by disabling lite restore.
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/i915/gt/intel_lrc.c +4 -0
@@ -1048,6 +1048,10 @@ static u64 execlists_update_context(const struct i915_request *rq) desc = ce->lrc_desc; ce->lrc_desc &= ~CTX_DESC_FORCE_RESTORE ; +/* Wa_1607138340:tgl */ +if (IS_TGL_REVID (rq->i915,TGL_REVID_A0 ,TGL_REVID_A0 )) + desc |=CTX_DESC_FORCE_RESTORE ; +return desc; }
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 11/11] drm/i915/tgl: Wa_1607138340
Quoting Mika Kuoppala (2019-10-15 16:44:49)
Quoted 13 lines
Avoid possible cs hang with semaphores by disabling lite restore.
Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/gt/intel_lrc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/i915/gt/intel_lrc.c +0
-0
drivers/gpu/drm/i915/gt/intel_lrc.c static u64 execlists_update_context(const struct i915_request *rq) · line 1053
Quoted 6 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +3
-0@@ -1048,6 +1048,10 @@ static u64 execlists_update_context(const struct i915_request *rq) desc = ce->lrc_desc; ce->lrc_desc &= ~CTX_DESC_FORCE_RESTORE ; +/* Wa_1607138340:tgl */ +if (IS_TGL_REVID (rq->i915,TGL_REVID_A0 ,TGL_REVID_A0 )) + desc |=CTX_DESC_FORCE_RESTORE ;
This looks much more heavy handed than suggested, but for a0, I'm not fused.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Mika Kuoppala (2019-10-15 16:44:39)
Quoted 13 lines
We are going to need this macro on limiting
the workaround scope.Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 5 +++++ 1 file changed, 5 insertions(+)drivers/gpu/drm/i915/i915_drv.h +0
-0
drivers/gpu/drm/i915/i915_drv.h IS_SUBPLATFORM(const struct drm_i915_private *i915, · line 1692
Quoted 7 lines
drivers/gpu/drm/i915/i915_drv.h +4
-0@@ -1686,6 +1686,11 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,#define IS_ICL_REVID (p, since, until) \ (IS_ICELAKE(p) && IS_REVID(p, since, until)) +#define TGL_REVID_A0 0x0 + +#define IS_TGL_REVID (p, since, until) \ + (IS_TIGERLAKE(p) && IS_REVID(p, since, until))
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BUILD: failure for series starting with [01/11] drm/i915/tgl: Add IS_TGL_REVID
In reply to Mika Kuoppala== Series Details ==
== Series Details ==
Series: series starting with [01/11] drm/i915/tgl: Add IS_TGL_REVID
URL : https://patchwork.freedesktop.org/series/68037/
State : failure
== Summary ==
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
CHK include/generated/compile.h
AR drivers/gpu/drm/i915/built-in.a
CC [M] drivers/gpu/drm/i915/gt/intel_workarounds.o
drivers/gpu/drm/i915/gt/intel_workarounds.c: In function ‘tgl_gt_workarounds_init’:
drivers/gpu/drm/i915/gt/intel_workarounds.c:910:8: error: ‘L3_CLKGATE_DIS’ undeclared (first use in this function); did you mean ‘CGPSF_CLKGATE_DIS’?
L3_CLKGATE_DIS | L3_CR2X_CLKGATE_DIS);
^~~~~~~~~~~~~~
CGPSF_CLKGATE_DIS
drivers/gpu/drm/i915/gt/intel_workarounds.c:910:8: note: each undeclared identifier is reported only once for each function it appears in
drivers/gpu/drm/i915/gt/intel_workarounds.c:910:25: error: ‘L3_CR2X_CLKGATE_DIS’ undeclared (first use in this function); did you mean ‘L3_CLKGATE_DIS’?
L3_CLKGATE_DIS | L3_CR2X_CLKGATE_DIS);
^~~~~~~~~~~~~~~~~~~
L3_CLKGATE_DISscripts/Makefile.build:265: recipe for target 'drivers/gpu/drm/i915/gt/intel_workarounds.o' failed make[4]: *** [drivers/gpu/drm/i915/gt/intel_workarounds.o] Error 1 scripts/Makefile.build:509: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:509: recipe for target 'drivers/gpu/drm' failed
make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:509: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1650: recipe for target 'drivers' failed
make: *** [drivers] Error 2
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx