public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/4] drm/i915: Fix serialisation of pipecontrol write vs semaphore signal
Date: Mon, 11 Apr 2016 11:34:54 +0300	[thread overview]
Message-ID: <20160411083454.GB4329@intel.com> (raw)
In-Reply-To: <1460196886-15760-3-git-send-email-chris@chris-wilson.co.uk>

On Sat, Apr 09, 2016 at 11:14:44AM +0100, Chris Wilson wrote:
> In order for the MI_SEMAPHORE_SIGNAL command to wait until after the
> pipecontrol writing the signal value is complete, we have to pause the
> CS inside the PIPE_CONTROL with the CS_STALL bit.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 556924ee47f9..62d09cf2ea8f 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1301,7 +1301,7 @@ static int gen8_rcs_signal(struct drm_i915_gem_request *signaller_req,
>  		intel_ring_emit(signaller, GFX_OP_PIPE_CONTROL(6));
>  		intel_ring_emit(signaller, PIPE_CONTROL_GLOBAL_GTT_IVB |
>  					   PIPE_CONTROL_QW_WRITE |
> -					   PIPE_CONTROL_FLUSH_ENABLE);
> +					   PIPE_CONTROL_CS_STALL);

Doesn't this just stall when parsing the pipe control? Shouldn't
we intead make sure the post-sync write is issued before the semaphore
is signalled? (pipe_control /w post-sync write + second pipe control w/
flush enable?)

Unfortunately it looks like the hardware wouldn't like it if we used
the option to signal the semaphore as a post-sync operation.

>  		intel_ring_emit(signaller, lower_32_bits(gtt_offset));
>  		intel_ring_emit(signaller, upper_32_bits(gtt_offset));
>  		intel_ring_emit(signaller, seqno);
> @@ -1454,7 +1454,6 @@ gen8_ring_sync(struct drm_i915_gem_request *waiter_req,
>  
>  	intel_ring_emit(waiter, MI_SEMAPHORE_WAIT |
>  				MI_SEMAPHORE_GLOBAL_GTT |
> -				MI_SEMAPHORE_POLL |
>  				MI_SEMAPHORE_SAD_GTE_SDD);
>  	intel_ring_emit(waiter, seqno);
>  	intel_ring_emit(waiter,
> -- 
> 2.8.0.rc3
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-04-11  8:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-09 10:14 Finish gen8 legacy semaphores Chris Wilson
2016-04-09 10:14 ` [PATCH 1/4] drm/i915: Fix gen8 semaphores id for legacy mode Chris Wilson
2016-04-11  8:26   ` Ville Syrjälä
2016-04-09 10:14 ` [PATCH 2/4] drm/i915: Fix serialisation of pipecontrol write vs semaphore signal Chris Wilson
2016-04-11  8:34   ` Ville Syrjälä [this message]
2016-04-11  9:06     ` Chris Wilson
2016-04-14 14:29       ` Ville Syrjälä
2016-04-14 14:33         ` Ville Syrjälä
2016-04-14 16:09         ` Chris Wilson
2016-04-09 10:14 ` [PATCH 3/4] drm/i915: Reload PD tables after semaphore wait on gen8 Chris Wilson
2016-04-11  7:34   ` Ville Syrjälä
2016-04-11  8:16     ` Chris Wilson
2016-04-11  8:37       ` Ville Syrjälä
2016-04-09 10:14 ` [PATCH 4/4] drm/i915: Enable semaphores for legacy submission " Chris Wilson
2016-04-09 11:02 ` ✗ Fi.CI.BAT: warning for series starting with [1/4] drm/i915: Fix gen8 semaphores id for legacy mode 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=20160411083454.GB4329@intel.com \
    --to=ville.syrjala@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