Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/9] drm/i915/execlists: Pull the render flush into breadcrumb emission
Date: Fri, 28 Dec 2018 13:51:24 +0200	[thread overview]
Message-ID: <87d0pl6f9f.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20181219145747.19835-2-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> In preparation for removing the manual EMIT_FLUSH prior to emitting the
> breadcrumb implement the flush inline with writing the breadcrumb for
> execlists. Using one command to both flush and write the breadcrumb is
> naturally a tiny bit faster than splitting it into two.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_guc_submission.c |  3 ++-
>  drivers/gpu/drm/i915/intel_lrc.c            | 12 ++++++++++--
>  drivers/gpu/drm/i915/intel_ringbuffer.h     |  5 ++---
>  3 files changed, 14 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_submission.c b/drivers/gpu/drm/i915/intel_guc_submission.c
> index 1570dcbe249c..ab1c49b106f2 100644
> --- a/drivers/gpu/drm/i915/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/intel_guc_submission.c
> @@ -572,7 +572,8 @@ static void inject_preempt_context(struct work_struct *work)
>  		if (engine->id == RCS) {
>  			cs = gen8_emit_ggtt_write_rcs(cs,
>  						      GUC_PREEMPT_FINISHED,
> -						      addr);
> +						      addr,
> +						      PIPE_CONTROL_CS_STALL);
>  		} else {
>  			cs = gen8_emit_ggtt_write(cs,
>  						  GUC_PREEMPT_FINISHED,
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index b05d0561f99a..ff08e5d600d4 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -2061,10 +2061,18 @@ static void gen8_emit_breadcrumb_rcs(struct i915_request *request, u32 *cs)
>  	/* We're using qword write, seqno should be aligned to 8 bytes. */
>  	BUILD_BUG_ON(I915_GEM_HWS_INDEX & 1);
>  
> -	cs = gen8_emit_ggtt_write_rcs(cs, request->global_seqno,
> -				      intel_hws_seqno_address(request->engine));
> +	cs = gen8_emit_ggtt_write_rcs(cs,
> +				      request->global_seqno,
> +				      intel_hws_seqno_address(request->engine),
> +				      PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH |
> +				      PIPE_CONTROL_DEPTH_CACHE_FLUSH |
> +				      PIPE_CONTROL_DC_FLUSH_ENABLE |
> +				      PIPE_CONTROL_FLUSH_ENABLE |
> +				      PIPE_CONTROL_CS_STALL);
> +
>  	*cs++ = MI_USER_INTERRUPT;
>  	*cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
> +
>  	request->tail = intel_ring_offset(request, cs);
>  	assert_ring_tail_valid(request->ring, request->tail);
>  
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h
> index c927bdfb1ed0..32606d795af3 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.h
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h
> @@ -1003,7 +1003,7 @@ static inline u32 *gen8_emit_pipe_control(u32 *batch, u32 flags, u32 offset)
>  }
>  
>  static inline u32 *
> -gen8_emit_ggtt_write_rcs(u32 *cs, u32 value, u32 gtt_offset)
> +gen8_emit_ggtt_write_rcs(u32 *cs, u32 value, u32 gtt_offset, u32 flags)
>  {
>  	/* We're using qword write, offset should be aligned to 8 bytes. */
>  	GEM_BUG_ON(!IS_ALIGNED(gtt_offset, 8));
> @@ -1013,8 +1013,7 @@ gen8_emit_ggtt_write_rcs(u32 *cs, u32 value, u32 gtt_offset)
>  	 * following the batch.
>  	 */
>  	*cs++ = GFX_OP_PIPE_CONTROL(6);
> -	*cs++ = PIPE_CONTROL_GLOBAL_GTT_IVB | PIPE_CONTROL_CS_STALL |
> -		PIPE_CONTROL_QW_WRITE;
> +	*cs++ = flags | PIPE_CONTROL_QW_WRITE | PIPE_CONTROL_GLOBAL_GTT_IVB;
>  	*cs++ = gtt_offset;
>  	*cs++ = 0;
>  	*cs++ = value;
> -- 
> 2.20.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-12-28 11:52 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19 14:57 [PATCH 1/9] drm/i915: Remove HW semaphores for gen7 inter-engine synchronisation Chris Wilson
2018-12-19 14:57 ` [PATCH 2/9] drm/i915/execlists: Pull the render flush into breadcrumb emission Chris Wilson
2018-12-28 11:51   ` Mika Kuoppala [this message]
2018-12-19 14:57 ` [PATCH 3/9] drm/i915/ringbuffer: " Chris Wilson
2018-12-28 12:03   ` Mika Kuoppala
2018-12-28 15:11     ` Chris Wilson
2018-12-19 14:57 ` [PATCH 4/9] drm/i915: Remove redundant trailing request flush Chris Wilson
2018-12-19 16:43   ` Chris Wilson
2018-12-19 16:46   ` [PATCH v2] " Chris Wilson
2018-12-19 16:54   ` Chris Wilson
2018-12-19 19:19   ` Chris Wilson
2018-12-19 14:57 ` [PATCH 5/9] drm/i915/ringbuffer: Remove irq-seqno w/a for gen6/7 rcs Chris Wilson
2018-12-19 14:57 ` [PATCH 6/9] drm/i915/ringbuffer: Remove irq-seqno w/a for gen6 xcs Chris Wilson
2018-12-19 14:57 ` [PATCH 7/9] drm/i915/ringbuffer: Move irq seqno barrier to the GPU for gen7 Chris Wilson
2018-12-19 14:57 ` [PATCH 8/9] drm/i915/ringbuffer: Move irq seqno barrier to the GPU for gen5 Chris Wilson
2018-12-19 14:57 ` [PATCH 9/9] drm/i915: Drop unused engine->irq_seqno_barrier w/a Chris Wilson
2018-12-19 15:55 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915: Remove HW semaphores for gen7 inter-engine synchronisation Patchwork
2018-12-19 15:58 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-19 16:19 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-19 17:12 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915: Remove HW semaphores for gen7 inter-engine synchronisation (rev3) Patchwork
2018-12-19 17:16 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-19 17:33 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-19 18:49 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-12-19 19:30 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915: Remove HW semaphores for gen7 inter-engine synchronisation (rev4) Patchwork
2018-12-19 19:33 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-12-19 19:55 ` ✓ Fi.CI.BAT: success " Patchwork
2018-12-19 21:15 ` ✓ Fi.CI.IGT: " Patchwork
2018-12-28 11:37 ` [PATCH 1/9] drm/i915: Remove HW semaphores for gen7 inter-engine synchronisation Mika Kuoppala
2018-12-28 11:47   ` Chris Wilson

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=87d0pl6f9f.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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