Revert "drm/i915/tgl: Include ro parts of l3 to invalidate"
Subsystems (2)
PATCH 1/4 Revert "drm/i915/tgl: Include ro parts of l3 to invalidate"
This reverts commit 62037ffff229b7d94f1db5ef8d2e2ec819832ef3.
L3 ro cache invalidation is part of the dword0 of pipe control. Also it is not relevant to this gen.
--- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 1 - drivers/gpu/drm/i915/gt/intel_lrc.c | 1 - 2 files changed, 2 deletions(-)
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +0 -1
@@ -236,7 +236,6 @@#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 REG_BIT(10)/* gen12 */ #define PIPE_CONTROL_INDIRECT_STATE_DISABLE (1<<9)#define PIPE_CONTROL_HDC_PIPELINE_FLUSH REG_BIT(9)/* gen12 */ #define PIPE_CONTROL_NOTIFY (1<<8)
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -1
@@ -4579,7 +4579,6 @@ 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 2/4 drm/i915/gen12: Fix HDC pipeline flush
HDC pipeline flush is bit on the first dword of
the PIPE_CONTROL, not the second. Make it so.
v2: function naming (Chris)
--- drivers/gpu/drm/i915/gt/intel_engine.h | 34 ++++++++++++++++---- drivers/gpu/drm/i915/gt/intel_gpu_commands.h | 2 +- drivers/gpu/drm/i915/gt/intel_lrc.c | 29 +++++++++-------- 3 files changed, 44 insertions(+), 21 deletions(-)
drivers/gpu/drm/i915/gt/intel_engine.h +28 -6
@@ -241,19 +241,29 @@ void intel_engine_fini_breadcrumbs(struct intel_engine_cs *engine);void intel_engine_print_breadcrumbs (struct intel_engine_cs *engine,struct drm_printer *p); -static inline u32 *gen8_emit_pipe_control (u32 *batch,u32 flags,u32 offset) +static inline u32 *__gen8_emit_pipe_control (u32 *batch,u32 flags0,u32 flags1,u32 offset) {memset (batch,0 ,6 *sizeof (u32)); - batch[0 ] =GFX_OP_PIPE_CONTROL (6 ); - batch[1 ] = flags; + batch[0 ] =GFX_OP_PIPE_CONTROL (6 ) | flags0; + batch[1 ] = flags1; batch[2 ] = offset;return batch +6 ; } +static inline u32 *gen8_emit_pipe_control (u32 *batch,u32 flags,u32 offset) +{ +return __gen8_emit_pipe_control (batch,0 , flags, offset); +} + +static inline u32 *gen12_emit_pipe_control (u32 *batch,u32 flags0,u32 flags1,u32 offset) +{ +return __gen8_emit_pipe_control (batch, flags0, flags1, offset); +} +static inline u32 * -gen8_emit_ggtt_write_rcs (u32 *cs,u32 value,u32 gtt_offset,u32 flags) +__gen8_emit_ggtt_write_rcs (u32 *cs,u32 value,u32 gtt_offset,u32 flags0,u32 flags1) {/* We're using qword write, offset should be aligned to 8 bytes. */ GEM_BUG_ON (!IS_ALIGNED (gtt_offset,8 ));
@@ -262,8 +272,8 @@ gen8_emit_ggtt_write_rcs(u32 *cs, u32 value, u32 gtt_offset, u32 flags)* need a prior CS_STALL, which is emitted by the flush * following the batch. */ - *cs++ =GFX_OP_PIPE_CONTROL (6 ); - *cs++ = flags |PIPE_CONTROL_QW_WRITE |PIPE_CONTROL_GLOBAL_GTT_IVB ; + *cs++ =GFX_OP_PIPE_CONTROL (6 ) | flags0; + *cs++ = flags1 |PIPE_CONTROL_QW_WRITE |PIPE_CONTROL_GLOBAL_GTT_IVB ; *cs++ = gtt_offset; *cs++ =0 ; *cs++ = value;
@@ -273,6 +283,18 @@ gen8_emit_ggtt_write_rcs(u32 *cs, u32 value, u32 gtt_offset, u32 flags)return cs; } +static inline u32 * +gen8_emit_ggtt_write_rcs (u32 *cs,u32 value,u32 gtt_offset,u32 flags) +{ +return __gen8_emit_ggtt_write_rcs (cs, value, gtt_offset,0 , flags); +} + +static inline u32 * +gen12_emit_ggtt_write_rcs (u32 *cs,u32 value,u32 gtt_offset,u32 flags0,u32 flags1) +{ +return __gen8_emit_ggtt_write_rcs (cs, value, gtt_offset, flags0, flags1); +} +static inline u32 *gen8_emit_ggtt_write (u32 *cs,u32 value,u32 gtt_offset,u32 flags) {
drivers/gpu/drm/i915/gt/intel_gpu_commands.h +1 -1
@@ -237,7 +237,7 @@#define PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE (1<<11)/* MBZ on ILK */ #define PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE (1<<10)/* GM45+ only */ #define PIPE_CONTROL_INDIRECT_STATE_DISABLE (1<<9) -#define PIPE_CONTROL_HDC_PIPELINE_FLUSH REG_BIT(9)/* gen12 */ +#define PIPE_CONTROL0_HDC_PIPELINE_FLUSH REG_BIT(9)/* gen12 */ #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 +15 -14
@@ -4553,7 +4553,6 @@ static int gen12_emit_flush_render(struct i915_request *request, flags |=PIPE_CONTROL_DEPTH_STALL ; 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 ;
@@ -4564,7 +4563,9 @@ static int gen12_emit_flush_render(struct i915_request *request,if (IS_ERR (cs))return PTR_ERR (cs); - cs =gen8_emit_pipe_control (cs, flags,LRC_PPHWSP_SCRATCH_ADDR ); + cs =gen12_emit_pipe_control (cs, +PIPE_CONTROL0_HDC_PIPELINE_FLUSH , + flags,LRC_PPHWSP_SCRATCH_ADDR );intel_ring_advance (request, cs); }
@@ -4751,18 +4752,18 @@ static u32 *gen12_emit_fini_breadcrumb(struct i915_request *rq, u32 *cs)static u32 *gen12_emit_fini_breadcrumb_rcs (struct i915_request *request,u32 *cs) { - cs =gen8_emit_ggtt_write_rcs (cs, - request->fence.seqno, -i915_request_active_timeline (request)->hwsp_offset, -PIPE_CONTROL_CS_STALL | -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 ); + cs =gen12_emit_ggtt_write_rcs (cs, + request->fence.seqno, +i915_request_active_timeline (request)->hwsp_offset, +PIPE_CONTROL0_HDC_PIPELINE_FLUSH , +PIPE_CONTROL_CS_STALL | +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 );return gen12_emit_fini_breadcrumb_tail (request, cs); }
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/4 drm/i915/gen12: Flush L3
In reply to Mika KuoppalaFlush TDL,L3 and EUs
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/gt/intel_lrc.c +2 -0
@@ -4547,6 +4547,7 @@ static int gen12_emit_flush_render(struct i915_request *request,u32 *cs; flags |=PIPE_CONTROL_TILE_CACHE_FLUSH ; + flags |=PIPE_CONTROL_FLUSH_L3 ; flags |=PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH ; flags |=PIPE_CONTROL_DEPTH_CACHE_FLUSH ;/* Wa_1409600907:tgl */
@@ -4758,6 +4759,7 @@ gen12_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs)PIPE_CONTROL0_HDC_PIPELINE_FLUSH ,PIPE_CONTROL_CS_STALL |PIPE_CONTROL_TILE_CACHE_FLUSH | +PIPE_CONTROL_FLUSH_L3 |PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH | PIPE_CONTROL_DEPTH_CACHE_FLUSH |/* Wa_1409600907:tgl */
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/4] drm/i915/gen12: Flush L3
Quoting Mika Kuoppala (2020-05-06 15:47:33)
Quoted 3 lines
Flush TDL,L3 and EUs
Signed-off-by Mika Kuoppala <[email protected]>
I bow to your interpretation of the docs,
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/4 drm/i915/gen12: Invalidate aux table entries forcibly
In reply to Mika KuoppalaAux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.
Proposed workaround is to invalidate entries between all batchbuffers.
References bspec#43904, hsdes#1809175790
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 16 +++++++++++++++- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_lrc.c +15 -1
@@ -4539,6 +4539,17 @@ static u32 preparser_disable(bool state)return MI_ARB_CHECK |1 <<8 | state; } +static u32 * +gen12_emit_aux_table_inv (struct i915_request *rq,u32 *cs) +{ + *cs++ =MI_LOAD_REGISTER_IMM (1 ); + *cs++ =i915_mmio_reg_offset (GEN12_GFX_CCS_AUX_NV ); + *cs++ =AUX_INV ; + *cs++ =MI_NOOP ; + +return cs; +} +static int gen12_emit_flush_render (struct i915_request *request,u32 mode) {
@@ -4587,7 +4598,7 @@ static int gen12_emit_flush_render(struct i915_request *request, flags |=PIPE_CONTROL_CS_STALL ; - cs =intel_ring_begin (request,8 ); + cs =intel_ring_begin (request,8 +4 );if (IS_ERR (cs))return PTR_ERR (cs);
@@ -4600,6 +4611,9 @@ static int gen12_emit_flush_render(struct i915_request *request, cs =gen8_emit_pipe_control (cs, flags,LRC_PPHWSP_SCRATCH_ADDR ); +/* hsdes: 1809175790 */ + cs =gen12_emit_aux_table_inv (request, cs); + *cs++ =preparser_disable (false);intel_ring_advance (request, cs); }
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -2526,6 +2526,8 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define HSW_GTT_CACHE_EN _MMIO(0x4024)#define GTT_CACHE_EN_ALL 0xF0007FFF#define GEN7_WR_WATERMARK _MMIO(0x4028) +#define GEN12_GFX_CCS_AUX_NV _MMIO(0x4028) +#define AUX_INV REG_BIT(0)#define GEN7_GFX_PRIO_CTRL _MMIO(0x402C)#define ARB_MODE _MMIO(0x4030)#define ARB_MODE_SWIZZLE_SNB (1 << 4)
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/gen12: Invalidate aux table entries forcibly
Quoting Mika Kuoppala (2020-05-06 15:47:34)
Quoted 5 lines
Aux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.Proposed workaround is to invalidate entries between all batchbuffers.
This sounds like it should have a sunset clause. Do we anticipate being able to drop this w/a in future?
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/gen12: Invalidate aux table entries forcibly
Quoted 9 lines · Chris Wilson
Quoting Mika Kuoppala (2020-05-06 15:47:34)
Quoted 5 lines
Aux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.Proposed workaround is to invalidate entries between all batchbuffers.
This sounds like it should have a sunset clause. Do we anticipate being able to drop this w/a in future?
Rafael kindly pointed out that Mesa already does this:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/gallium/drivers/iris/iris_state.c#L5131
So I would say we can drop this patch.
But it makes me wonder that is that LRI dropped for not being whitelisted.
-Mika
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/gen12: Invalidate aux table entries forcibly
Quoting Mika Kuoppala (2020-05-06 16:20:22)
Quoted 9 lines
Quoted 7 lines · Chris Wilson
Quoting Mika Kuoppala (2020-05-06 15:47:34)
Quoted 5 lines
Aux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.Proposed workaround is to invalidate entries between all batchbuffers.
Quoted 6 lines
Quoted 2 lines
This sounds like it should have a sunset clause. Do we anticipate being able to drop this w/a in future?
Rafael kindly pointed out that Mesa already does this:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/gallium/drivers/iris/iris_state.c#L5131
So I would say we can drop this patch.
Is the false hit self-contained? Is it caused by PTE update of the address or by a 3D state change i.e. is it a potential isolation issue? -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/gen12: Invalidate aux table entries forcibly
Quoted 13 lines · Chris Wilson
Quoting Mika Kuoppala (2020-05-06 16:20:22)
Quoted 12 lines
Quoted 9 lines · Chris Wilson
Quoting Mika Kuoppala (2020-05-06 15:47:34)
Quoted 5 lines
Aux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.Proposed workaround is to invalidate entries between all batchbuffers.
This sounds like it should have a sunset clause. Do we anticipate being able to drop this w/a in future?
Quoted 7 lines
Quoted 3 lines
Rafael kindly pointed out that Mesa already does this:
https://gitlab.freedesktop.org/mesa/mesa/-/blob/master/src/gallium/drivers/iris/iris_state.c#L5131
So I would say we can drop this patch.Is the false hit self-contained? Is it caused by PTE update of the address or by a 3D state change i.e. is it a potential isolation issue? -Chris
There's no 3D state for the aux table. What we do in Iris is:
- allocate buffers and cpu map them
- write the multiple levels of the table (main buffers -> CCS buffers) and keep track of when it changes
- whenever it changes, we emit LRI to 0x4208 to invalidate the cache.
Anv does something similar except it writes to the table from the GPU.
I tried removing the heuristics and invalidating the table on the beginning of every batch, but it doesn't help. We can probably get preempted mid-batch and then another context with a different aux table and the wrong cache is probably causing the hang. The kernel invalidating it seems to fix the problem.
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/4 drm/i915/gen12: Invalidate aux table entries forcibly
In reply to Mika KuoppalaAux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.
Proposed workaround is to invalidate entries between all batchbuffers.
v2: correct register address (Yang)
References bspec#43904, hsdes#1809175790
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 16 +++++++++++++++- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_lrc.c +15 -1
@@ -4539,6 +4539,17 @@ static u32 preparser_disable(bool state)return MI_ARB_CHECK |1 <<8 | state; } +static u32 * +gen12_emit_aux_table_inv (struct i915_request *rq,u32 *cs) +{ + *cs++ =MI_LOAD_REGISTER_IMM (1 ); + *cs++ =i915_mmio_reg_offset (GEN12_GFX_CCS_AUX_NV ); + *cs++ =AUX_INV ; + *cs++ =MI_NOOP ; + +return cs; +} +static int gen12_emit_flush_render (struct i915_request *request,u32 mode) {
@@ -4587,7 +4598,7 @@ static int gen12_emit_flush_render(struct i915_request *request, flags |=PIPE_CONTROL_CS_STALL ; - cs =intel_ring_begin (request,8 ); + cs =intel_ring_begin (request,8 +4 );if (IS_ERR (cs))return PTR_ERR (cs);
@@ -4600,6 +4611,9 @@ static int gen12_emit_flush_render(struct i915_request *request, cs =gen8_emit_pipe_control (cs, flags,LRC_PPHWSP_SCRATCH_ADDR ); +/* hsdes: 1809175790 */ + cs =gen12_emit_aux_table_inv (request, cs); + *cs++ =preparser_disable (false);intel_ring_advance (request, cs); }
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -2526,6 +2526,8 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define HSW_GTT_CACHE_EN _MMIO(0x4024)#define GTT_CACHE_EN_ALL 0xF0007FFF#define GEN7_WR_WATERMARK _MMIO(0x4028) +#define GEN12_GFX_CCS_AUX_NV _MMIO(0x4208) +#define AUX_INV REG_BIT(0)#define GEN7_GFX_PRIO_CTRL _MMIO(0x402C)#define ARB_MODE _MMIO(0x4030)#define ARB_MODE_SWIZZLE_SNB (1 << 4)
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/gen12: Invalidate aux table entries forcibly
Quoting Mika Kuoppala (2020-05-06 16:58:55)
Quoted 6 lines
Aux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.Proposed workaround is to invalidate entries between all batchbuffers.
Quoted 8 lines
v2: correct register address (Yang)
References bspec#43904, hsdes#1809175790
Cc Chris Wilson <[email protected]>Cc Chuansheng Liu <[email protected]>Cc Rafael Antognolli <[email protected]>Cc Yang A Shi <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>
I only hear good things about v3, so
drivers/gpu/drm/i915/i915_reg.h static inline bool i915_mmio_reg_valid(i915_reg_t reg) · line 2533
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -2526,6 +2526,8 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define HSW_GTT_CACHE_EN _MMIO(0x4024)#define GTT_CACHE_EN_ALL 0xF0007FFF#define GEN7_WR_WATERMARK _MMIO(0x4028) +#define GEN12_GFX_CCS_AUX_NV _MMIO(0x4208) +#define AUX_INV REG_BIT(0)#define GEN7_GFX_PRIO_CTRL _MMIO(0x402C)#define ARB_MODE _MMIO(0x4030)#define ARB_MODE_SWIZZLE_SNB (1 << 4)
4024, 4028, 4208, 402C, 4030.
Something seems not quite right.
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 4/4 drm/i915/gen12: Invalidate aux table entries forcibly
Aux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.
Proposed workaround is to invalidate entries between all batchbuffers.
v2: correct register address (Yang)
v3: respect the order (Chris)
References bspec#43904, hsdes#1809175790
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 16 +++++++++++++++- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_lrc.c +15 -1
@@ -4539,6 +4539,17 @@ static u32 preparser_disable(bool state)return MI_ARB_CHECK |1 <<8 | state; } +static u32 * +gen12_emit_aux_table_inv (struct i915_request *rq,u32 *cs) +{ + *cs++ =MI_LOAD_REGISTER_IMM (1 ); + *cs++ =i915_mmio_reg_offset (GEN12_GFX_CCS_AUX_NV ); + *cs++ =AUX_INV ; + *cs++ =MI_NOOP ; + +return cs; +} +static int gen12_emit_flush_render (struct i915_request *request,u32 mode) {
@@ -4587,7 +4598,7 @@ static int gen12_emit_flush_render(struct i915_request *request, flags |=PIPE_CONTROL_CS_STALL ; - cs =intel_ring_begin (request,8 ); + cs =intel_ring_begin (request,8 +4 );if (IS_ERR (cs))return PTR_ERR (cs);
@@ -4600,6 +4611,9 @@ static int gen12_emit_flush_render(struct i915_request *request, cs =gen8_emit_pipe_control (cs, flags,LRC_PPHWSP_SCRATCH_ADDR ); +/* hsdes: 1809175790 */ + cs =gen12_emit_aux_table_inv (request, cs); + *cs++ =preparser_disable (false);intel_ring_advance (request, cs); }
drivers/gpu/drm/i915/i915_reg.h +2 -0
@@ -2557,6 +2557,8 @@ static inline bool i915_mmio_reg_valid(i915_reg_t reg)#define GEN10_PAT_INDEX (index) _MMIO(0x40e0 + (index) * 4)#define GEN12_PAT_INDEX (index) _MMIO(0x4800 + (index) * 4)#define BSD_HWS_PGA_GEN7 _MMIO(0x04180) +#define GEN12_GFX_CCS_AUX_NV _MMIO(0x4208) +#define AUX_INV REG_BIT(0)#define BLT_HWS_PGA_GEN7 _MMIO(0x04280)#define VEBOX_HWS_PGA_GEN7 _MMIO(0x04380)#define RING_ACTHD (base) _MMIO((base) + 0x74)
Signature · 6 lines
2.17.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/gen12: Invalidate aux table entries forcibly
Hi Mika,
Quoted 10 lines
-----Original Message-----
From: Mika Kuoppala <[email protected]>
Sent: Thursday, May 7, 2020 12:53 AM
To: [email protected]
Cc: Mika Kuoppala <[email protected]>; Chris Wilson <[email protected]>; Liu, Chuansheng <[email protected]>; Antognolli, Rafael <[email protected]>; Shi, Yang A <[email protected]>
Subject: [PATCH 4/4] drm/i915/gen12: Invalidate aux table entries forcibly
Quoted 5 lines
Aux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.Proposed workaround is to invalidate entries between all batchbuffers.
Thanks for cooking this patch for RCS engine. Similar way applies to all the engines. Expecting more patches.
VD0_CCS_AUX_NV 04218hVD1_CCS_AUX_NV 04228hVE0_CCS_AUX_NV 04238hVD2_CCS_AUX_NV 04298hVD3_CCS_AUX_NV 042A8hVE1_CCS_AUX_NV 042B8hCOMPCS0_CCS_AUX_NV 042C8hGFX_CCS_AUX_NV 04208h
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/i915/gen12: Invalidate aux table entries forcibly
In reply to Mika KuoppalaQuoting Mika Kuoppala (2020-05-06 17:53:10)
Quoted 53 lines
Aux table invalidation can fail on update. So
next access may cause memory access to be into stale entry.Proposed workaround is to invalidate entries between all batchbuffers.
v2: correct register address (Yang)
v3: respect the order (Chris)References bspec#43904, hsdes#1809175790
Cc Chris Wilson <[email protected]>Cc Chuansheng Liu <[email protected]>Cc Rafael Antognolli <[email protected]>Cc Yang A Shi <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>Acked-by Chris Wilson <[email protected]>--- drivers/gpu/drm/i915/gt/intel_lrc.c | 16 +++++++++++++++- drivers/gpu/drm/i915/i915_reg.h | 2 ++ 2 files changed, 17 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/gt/intel_lrc.c +12
-1@@ -4539,6 +4539,17 @@ static u32 preparser_disable(bool state)return MI_ARB_CHECK |1 <<8 | state; } +static u32 * +gen12_emit_aux_table_inv (struct i915_request *rq,u32 *cs) +{ + *cs++ =MI_LOAD_REGISTER_IMM (1 ); + *cs++ =i915_mmio_reg_offset (GEN12_GFX_CCS_AUX_NV ); + *cs++ =AUX_INV ; + *cs++ =MI_NOOP ; + +return cs; +} +static int gen12_emit_flush_render (struct i915_request *request,u32 mode) {@@ -4587,7 +4598,7 @@ static int gen12_emit_flush_render(struct i915_request *request, flags |=PIPE_CONTROL_CS_STALL ; - cs =intel_ring_begin (request,8 ); + cs =intel_ring_begin (request,8 +4 );if (IS_ERR (cs))return PTR_ERR (cs);
drivers/gpu/drm/i915/gt/intel_lrc.c static int gen12_emit_flush_render(struct i915_request *request, · line 4615
Quoted 5 lines
drivers/gpu/drm/i915/gt/intel_lrc.c +2
-0@@ -4600,6 +4611,9 @@ static int gen12_emit_flush_render(struct i915_request *request, cs =gen8_emit_pipe_control (cs, flags,LRC_PPHWSP_SCRATCH_ADDR ); +/* hsdes: 1809175790 */ + cs =gen12_emit_aux_table_inv (request, cs);
It is worth mentioning that we do not fix up the EMIT_INVALIDATE for the actual physical engine a virtual request may run on. Not a problem until you try to support other engines. Pray for a quick HW fix. -Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/4] Revert "drm/i915/tgl: Include ro parts of l3 to invalidate" (rev3)
In reply to Mika Kuoppala== Series Details ==
== Series Details ==
Series: series starting with [1/4] Revert "drm/i915/tgl: Include ro parts of l3 to invalidate" (rev3)
URL : https://patchwork.freedesktop.org/series/77000/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8437 -> Patchwork_17592
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/index.html
Known issues
------------
Here are the changes found in Patchwork_17592 that come from known issues:
### IGT changes ###
#### Warnings ####
* igt@i915_pm_rpm@basic-rte:
- fi-kbl-guc: [SKIP][1] ([fdo#109271]) -> [FAIL][2] ([i915#579])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/fi-kbl-guc/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/fi-kbl-guc/igt@[email protected]
* igt@i915_pm_rpm@module-reload:
- fi-kbl-x1275: [SKIP][3] ([fdo#109271]) -> [FAIL][4] ([i915#62])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/fi-kbl-x1275/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/fi-kbl-x1275/igt@[email protected]
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[i915#579]: https://gitlab.freedesktop.org/drm/intel/issues/579
[i915#62]: https://gitlab.freedesktop.org/drm/intel/issues/62
Participating hosts (51 -> 44)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8437 -> Patchwork_17592
CI-20190529: 20190529
CI_DRM_8437: f721984e59fc8e56b7811b1c9229e94136742a74 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5635: e83abfca61d407d12eee4d25bb0e8686337a7791 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17592: b823a90e110bdff605705b2046f7c079da6b4c5f @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
b823a90e110b drm/i915/gen12: Invalidate aux table entries forcibly 737484f26b6b drm/i915/gen12: Flush L398fa7c89748d drm/i915/gen12: Fix HDC pipeline flush d39f76775f88 Revert "drm/i915/tgl: Include ro parts of l3 to invalidate"
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/4] Revert "drm/i915/tgl: Include ro parts of l3 to invalidate" (rev3)
In reply to Mika Kuoppala== Series Details ==
== Series Details ==
Series: series starting with [1/4] Revert "drm/i915/tgl: Include ro parts of l3 to invalidate" (rev3)
URL : https://patchwork.freedesktop.org/series/77000/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_8437_full -> Patchwork_17592_full
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Known issues
------------
Here are the changes found in Patchwork_17592_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_persistence@legacy-engines-mixed-process@blt:
- shard-skl: [PASS][1] -> [FAIL][2] ([i915#1528])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-skl7/igt@gem_ctx_persistence@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-skl5/igt@gem_ctx_persistence@[email protected]
* igt@i915_suspend@fence-restore-tiled2untiled:
- shard-kbl: [PASS][3] -> [DMESG-WARN][4] ([i915#180])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-kbl3/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-kbl2/igt@[email protected]
* igt@kms_cursor_edge_walk@pipe-a-256x256-top-edge:
- shard-kbl: [PASS][5] -> [FAIL][6] ([i915#70] / [i915#93] / [i915#95])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-kbl6/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-kbl4/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic:
- shard-hsw: [PASS][7] -> [FAIL][8] ([i915#96])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-hsw7/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-hsw6/igt@[email protected]
* igt@kms_dp_dsc@basic-dsc-enable-edp:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#109349])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-iclb2/igt@[email protected]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-iclb8/igt@[email protected]
* igt@kms_draw_crc@fill-fb:
- shard-apl: [PASS][11] -> [FAIL][12] ([i915#95])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-apl2/igt@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-apl3/igt@[email protected]
* igt@kms_fbcon_fbt@psr-suspend:
- shard-skl: [PASS][13] -> [INCOMPLETE][14] ([i915#69])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-skl3/igt@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-skl9/igt@[email protected]
* igt@kms_hdr@bpc-switch-dpms:
- shard-skl: [PASS][15] -> [FAIL][16] ([i915#1188])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-skl3/igt@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-skl5/igt@[email protected]
* igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes:
- shard-kbl: [PASS][17] -> [DMESG-WARN][18] ([i915#180] / [i915#93] / [i915#95])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-kbl4/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-kbl2/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][19] -> [FAIL][20] ([fdo#108145] / [i915#265]) +1 similar issue
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-skl10/igt@[email protected]
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-skl5/igt@[email protected]
* igt@kms_psr@psr2_cursor_plane_move:
- shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-iclb2/igt@kms_psr@psr2_cursor_plane_move.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-iclb8/igt@kms_psr@psr2_cursor_plane_move.html
* igt@kms_setmode@basic:
- shard-kbl: [PASS][23] -> [FAIL][24] ([i915#31])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-kbl6/igt@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-kbl4/igt@[email protected]
#### Possible fixes ####
* igt@i915_suspend@sysfs-reader:
- shard-apl: [DMESG-WARN][25] ([i915#180]) -> [PASS][26] +3 similar issues
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-apl4/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-apl7/igt@[email protected]
* igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy:
- shard-hsw: [FAIL][27] ([i915#96]) -> [PASS][28]
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-hsw8/igt@[email protected]
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-hsw2/igt@[email protected]
* {igt@kms_flip@flip-vs-suspend-interruptible@a-dp1}:
- shard-kbl: [DMESG-WARN][29] ([i915#180]) -> [PASS][30] +2 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-kbl7/igt@kms_flip@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-kbl1/igt@kms_flip@[email protected]
* igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-pwrite:
- shard-snb: [SKIP][31] ([fdo#109271]) -> [PASS][32] +1 similar issue
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-snb1/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-pwrite.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-snb5/igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-pwrite.html
* igt@kms_hdr@bpc-switch-suspend:
- shard-skl: [FAIL][33] ([i915#1188]) -> [PASS][34] +1 similar issue
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-skl8/igt@[email protected]
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-skl3/igt@[email protected]
* igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min:
- shard-skl: [FAIL][35] ([fdo#108145] / [i915#265]) -> [PASS][36] +1 similar issue
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-skl2/igt@[email protected]
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-skl6/igt@[email protected]
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [SKIP][37] ([fdo#109441]) -> [PASS][38] +2 similar issues
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-iclb7/igt@kms_psr@psr2_sprite_plane_move.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
* igt@kms_setmode@basic:
- shard-hsw: [FAIL][39] ([i915#31]) -> [PASS][40]
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-hsw4/igt@[email protected]
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-hsw4/igt@[email protected]
* {igt@perf@polling-parameterized}:
- shard-kbl: [FAIL][41] ([i915#1542]) -> [PASS][42]
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-kbl1/igt@[email protected]
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-kbl3/igt@[email protected]
#### Warnings ####
* igt@i915_pm_dc@dc6-dpms:
- shard-tglb: [FAIL][43] ([i915#454]) -> [SKIP][44] ([i915#468])
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-tglb5/igt@[email protected]
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-tglb2/igt@[email protected]
* igt@i915_pm_rpm@pm-tiling:
- shard-snb: [SKIP][45] ([fdo#109271]) -> [INCOMPLETE][46] ([i915#82])
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-snb5/igt@[email protected]
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-snb6/igt@[email protected]
* igt@kms_content_protection@atomic-dpms:
- shard-apl: [FAIL][47] ([fdo#110321] / [fdo#110336]) -> [TIMEOUT][48] ([i915#1319]) +1 similar issue
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-apl1/igt@[email protected]
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-apl6/igt@[email protected]
* igt@kms_content_protection@srm:
- shard-apl: [FAIL][49] ([fdo#110321]) -> [TIMEOUT][50] ([i915#1319])
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8437/shard-apl4/igt@[email protected]
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/shard-apl6/igt@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109349]: https://bugs.freedesktop.org/show_bug.cgi?id=109349
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#110321]: https://bugs.freedesktop.org/show_bug.cgi?id=110321
[fdo#110336]: https://bugs.freedesktop.org/show_bug.cgi?id=110336
[i915#1188]: https://gitlab.freedesktop.org/drm/intel/issues/1188
[i915#1319]: https://gitlab.freedesktop.org/drm/intel/issues/1319
[i915#1528]: https://gitlab.freedesktop.org/drm/intel/issues/1528
[i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#198]: https://gitlab.freedesktop.org/drm/intel/issues/198
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#61]: https://gitlab.freedesktop.org/drm/intel/issues/61
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#70]: https://gitlab.freedesktop.org/drm/intel/issues/70
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
[i915#82]: https://gitlab.freedesktop.org/drm/intel/issues/82
[i915#93]: https://gitlab.freedesktop.org/drm/intel/issues/93
[i915#95]: https://gitlab.freedesktop.org/drm/intel/issues/95
[i915#96]: https://gitlab.freedesktop.org/drm/intel/issues/96
Participating hosts (11 -> 11)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_8437 -> Patchwork_17592
CI-20190529: 20190529
CI_DRM_8437: f721984e59fc8e56b7811b1c9229e94136742a74 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5635: e83abfca61d407d12eee4d25bb0e8686337a7791 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_17592: b823a90e110bdff605705b2046f7c079da6b4c5f @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_17592/index.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx