All of 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] drm/i915/gt: Try an extra flush on the Haswell blitter
Date: Tue, 12 Nov 2019 15:58:36 +0200	[thread overview]
Message-ID: <87sgmt42nn.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20191111120957.17732-1-chris@chris-wilson.co.uk>

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

> On gen7, including Haswell, the MI_FLUSH_DW command is not synchronous
> with the command streamer nor is there an option to make it so. To hide
> this we add a large delay on the CS so that the breadcrumb should always
> be visible before the interrupt. However, that does not seem to be
> enough to ensure the memory is actually coherent with the read of the
> breadcrumb. The breadcrumb update is a post-sync op... Throw in a
> preliminary MI_FLUSH_DW before the breadcrumb update in the hope that
> helps.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112147

If we are not sure, References

> Testcase: igt/i915_selftest/live_blt
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gt/intel_ring_submission.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> index a47d5a7c32c9..fc29df712810 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> @@ -454,6 +454,10 @@ static u32 *gen7_xcs_emit_breadcrumb(struct i915_request *rq, u32 *cs)
>  	GEM_BUG_ON(i915_request_active_timeline(rq)->hwsp_ggtt != rq->engine->status_page.vma);
>  	GEM_BUG_ON(offset_in_page(i915_request_active_timeline(rq)->hwsp_offset) != I915_GEM_HWS_SEQNO_ADDR);
>  
> +	*cs++ = MI_FLUSH_DW;
> +	*cs++ = 0;
> +	*cs++ = 0;

I see this as wmb wrt seqno write.

Massive hammer would be to include timestamp write in here with tlb
flush?

But one can always hope.

> +
>  	*cs++ = MI_FLUSH_DW | MI_FLUSH_DW_OP_STOREDW | MI_FLUSH_DW_STORE_INDEX;
>  	*cs++ = I915_GEM_HWS_SEQNO_ADDR | MI_FLUSH_DW_USE_GTT;
>  	*cs++ = rq->fence.seqno;
> @@ -469,7 +473,6 @@ static u32 *gen7_xcs_emit_breadcrumb(struct i915_request *rq, u32 *cs)
>  	*cs++ = 0;
>  
>  	*cs++ = MI_USER_INTERRUPT;
> -	*cs++ = MI_NOOP;

Evens,
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

>  
>  	rq->tail = intel_ring_offset(rq, cs);
>  	assert_ring_tail_valid(rq->ring, rq->tail);
> -- 
> 2.24.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gt: Try an extra flush on the Haswell blitter
Date: Tue, 12 Nov 2019 15:58:36 +0200	[thread overview]
Message-ID: <87sgmt42nn.fsf@gaia.fi.intel.com> (raw)
Message-ID: <20191112135836.nsB5ZTfgDveilRMLAL5gavYzdETNxDU4_SDykLtpnp8@z> (raw)
In-Reply-To: <20191111120957.17732-1-chris@chris-wilson.co.uk>

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

> On gen7, including Haswell, the MI_FLUSH_DW command is not synchronous
> with the command streamer nor is there an option to make it so. To hide
> this we add a large delay on the CS so that the breadcrumb should always
> be visible before the interrupt. However, that does not seem to be
> enough to ensure the memory is actually coherent with the read of the
> breadcrumb. The breadcrumb update is a post-sync op... Throw in a
> preliminary MI_FLUSH_DW before the breadcrumb update in the hope that
> helps.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112147

If we are not sure, References

> Testcase: igt/i915_selftest/live_blt
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gt/intel_ring_submission.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> index a47d5a7c32c9..fc29df712810 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c
> @@ -454,6 +454,10 @@ static u32 *gen7_xcs_emit_breadcrumb(struct i915_request *rq, u32 *cs)
>  	GEM_BUG_ON(i915_request_active_timeline(rq)->hwsp_ggtt != rq->engine->status_page.vma);
>  	GEM_BUG_ON(offset_in_page(i915_request_active_timeline(rq)->hwsp_offset) != I915_GEM_HWS_SEQNO_ADDR);
>  
> +	*cs++ = MI_FLUSH_DW;
> +	*cs++ = 0;
> +	*cs++ = 0;

I see this as wmb wrt seqno write.

Massive hammer would be to include timestamp write in here with tlb
flush?

But one can always hope.

> +
>  	*cs++ = MI_FLUSH_DW | MI_FLUSH_DW_OP_STOREDW | MI_FLUSH_DW_STORE_INDEX;
>  	*cs++ = I915_GEM_HWS_SEQNO_ADDR | MI_FLUSH_DW_USE_GTT;
>  	*cs++ = rq->fence.seqno;
> @@ -469,7 +473,6 @@ static u32 *gen7_xcs_emit_breadcrumb(struct i915_request *rq, u32 *cs)
>  	*cs++ = 0;
>  
>  	*cs++ = MI_USER_INTERRUPT;
> -	*cs++ = MI_NOOP;

Evens,
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

>  
>  	rq->tail = intel_ring_offset(rq, cs);
>  	assert_ring_tail_valid(rq->ring, rq->tail);
> -- 
> 2.24.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-11-12 13:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-11 12:09 [PATCH] drm/i915/gt: Try an extra flush on the Haswell blitter Chris Wilson
2019-11-11 12:09 ` [Intel-gfx] " Chris Wilson
2019-11-11 18:45 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-11-11 18:45   ` [Intel-gfx] " Patchwork
2019-11-12  6:33 ` ✓ Fi.CI.IGT: " Patchwork
2019-11-12  6:33   ` [Intel-gfx] " Patchwork
2019-11-12 13:58 ` Mika Kuoppala [this message]
2019-11-12 13:58   ` [Intel-gfx] [PATCH] " Mika Kuoppala
2019-11-12 14:06   ` Chris Wilson
2019-11-12 14:06     ` [Intel-gfx] " 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=87sgmt42nn.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.