From: Andi Shyti <andi.shyti@linux.intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Flush to global observation point before breadcrumb write
Date: Wed, 28 Sep 2022 15:25:27 +0200 [thread overview]
Message-ID: <YzRLRxRbveo3m7Qn@ashyti-mobl2.lan> (raw)
In-Reply-To: <20220927171313.6553-1-nirmoy.das@intel.com>
Hi Nirmoy and Prathap,
On Tue, Sep 27, 2022 at 07:13:13PM +0200, Nirmoy Das wrote:
> From: Prathap Kumar Valsan <prathap.kumar.valsan@intel.com>
>
> Add flag to pipecontrol instruction to ensure in-flight writes are
> flushed to global observation point. Also split the pipecontrol
> instruction like we have in gen8.
>
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/5886
> Signed-off-by: Prathap Kumar Valsan <prathap.kumar.valsan@intel.com>
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Thanks,
Andi
> ---
> drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 29 +++++++++++++++++-------
> 1 file changed, 21 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> index e49fa6fa6aee..31a2fbd8c4a8 100644
> --- a/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/gen8_engine_cs.c
> @@ -583,6 +583,8 @@ u32 *gen8_emit_fini_breadcrumb_xcs(struct i915_request *rq, u32 *cs)
> u32 *gen8_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs)
> {
> cs = gen8_emit_pipe_control(cs,
> + PIPE_CONTROL_CS_STALL |
> + PIPE_CONTROL_TLB_INVALIDATE |
> PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH |
> PIPE_CONTROL_DEPTH_CACHE_FLUSH |
> PIPE_CONTROL_DC_FLUSH_ENABLE,
> @@ -600,15 +602,21 @@ u32 *gen8_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs)
>
> u32 *gen11_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs)
> {
> + cs = gen8_emit_pipe_control(cs,
> + PIPE_CONTROL_CS_STALL |
> + PIPE_CONTROL_TLB_INVALIDATE |
> + PIPE_CONTROL_TILE_CACHE_FLUSH |
> + PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH |
> + PIPE_CONTROL_DEPTH_CACHE_FLUSH |
> + PIPE_CONTROL_DC_FLUSH_ENABLE,
> + 0);
> +
> + /*XXX: Look at gen8_emit_fini_breadcrumb_rcs */
> cs = gen8_emit_ggtt_write_rcs(cs,
> rq->fence.seqno,
> hwsp_offset(rq),
> - PIPE_CONTROL_CS_STALL |
> - PIPE_CONTROL_TILE_CACHE_FLUSH |
> - 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_CS_STALL);
>
> return gen8_emit_fini_breadcrumb_tail(rq, cs);
> }
> @@ -715,6 +723,7 @@ u32 *gen12_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs)
> {
> struct drm_i915_private *i915 = rq->engine->i915;
> u32 flags = (PIPE_CONTROL_CS_STALL |
> + PIPE_CONTROL_TLB_INVALIDATE |
> PIPE_CONTROL_TILE_CACHE_FLUSH |
> PIPE_CONTROL_FLUSH_L3 |
> PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH |
> @@ -731,11 +740,15 @@ u32 *gen12_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs)
> else if (rq->engine->class == COMPUTE_CLASS)
> flags &= ~PIPE_CONTROL_3D_ENGINE_FLAGS;
>
> + cs = gen12_emit_pipe_control(cs, PIPE_CONTROL0_HDC_PIPELINE_FLUSH, flags, 0);
> +
> + /*XXX: Look at gen8_emit_fini_breadcrumb_rcs */
> cs = gen12_emit_ggtt_write_rcs(cs,
> rq->fence.seqno,
> hwsp_offset(rq),
> - PIPE_CONTROL0_HDC_PIPELINE_FLUSH,
> - flags);
> + 0,
> + PIPE_CONTROL_FLUSH_ENABLE |
> + PIPE_CONTROL_CS_STALL);
>
> return gen12_emit_fini_breadcrumb_tail(rq, cs);
> }
> --
> 2.37.3
next prev parent reply other threads:[~2022-09-28 13:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 17:13 [Intel-gfx] [PATCH] drm/i915/gt: Flush to global observation point before breadcrumb write Nirmoy Das
2022-09-27 17:17 ` Das, Nirmoy
2022-09-28 2:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-09-28 13:25 ` Andi Shyti [this message]
2022-09-28 18:50 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-29 10:57 ` Andi Shyti
2022-09-29 14:10 ` [Intel-gfx] [PATCH] " Andi Shyti
2022-09-29 16:40 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/gt: Flush to global observation point before breadcrumb write (rev2) Patchwork
2022-09-29 17:03 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-09-30 16:15 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YzRLRxRbveo3m7Qn@ashyti-mobl2.lan \
--to=andi.shyti@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=nirmoy.das@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox