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: [Intel-gfx] [PATCH 1/3] drm/i915: Assert requests within a context are submitted in order
Date: Fri, 06 Mar 2020 11:40:46 +0200	[thread overview]
Message-ID: <87ftel4y8x.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200306071614.2846708-1-chris@chris-wilson.co.uk>

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

> Check the flow of requests into the hardware to verify that are
> submitted in order along their timeline.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

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

> ---
>  drivers/gpu/drm/i915/gt/intel_lrc.c | 4 ++++
>  drivers/gpu/drm/i915/i915_request.c | 4 ++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 16a023ac4604..13941d1c0a4a 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1622,6 +1622,7 @@ static bool can_merge_rq(const struct i915_request *prev,
>  	if (!can_merge_ctx(prev->context, next->context))
>  		return false;
>  
> +	GEM_BUG_ON(i915_seqno_passed(prev->fence.seqno, next->fence.seqno));
>  	return true;
>  }
>  
> @@ -2142,6 +2143,9 @@ static void execlists_dequeue(struct intel_engine_cs *engine)
>  				GEM_BUG_ON(last &&
>  					   !can_merge_ctx(last->context,
>  							  rq->context));
> +				GEM_BUG_ON(last &&
> +					   i915_seqno_passed(last->fence.seqno,
> +							     rq->fence.seqno));
>  
>  				submit = true;
>  				last = rq;
> diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> index ca5361eb1f0b..35147df79655 100644
> --- a/drivers/gpu/drm/i915/i915_request.c
> +++ b/drivers/gpu/drm/i915/i915_request.c
> @@ -737,6 +737,7 @@ __i915_request_create(struct intel_context *ce, gfp_t gfp)
>  	RCU_INIT_POINTER(rq->timeline, tl);
>  	RCU_INIT_POINTER(rq->hwsp_cacheline, tl->hwsp_cacheline);
>  	rq->hwsp_seqno = tl->hwsp_seqno;
> +	GEM_BUG_ON(i915_request_completed(rq));
>  
>  	rq->rcustate = get_state_synchronize_rcu(); /* acts as smp_mb() */
>  
> @@ -1284,6 +1285,9 @@ __i915_request_add_to_timeline(struct i915_request *rq)
>  	prev = to_request(__i915_active_fence_set(&timeline->last_request,
>  						  &rq->fence));
>  	if (prev && !i915_request_completed(prev)) {
> +		GEM_BUG_ON(i915_seqno_passed(prev->fence.seqno,
> +					     rq->fence.seqno));
> +
>  		if (is_power_of_2(prev->engine->mask | rq->engine->mask))
>  			i915_sw_fence_await_sw_fence(&rq->submit,
>  						     &prev->submit,
> -- 
> 2.25.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-03-06  9:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06  7:16 [Intel-gfx] [PATCH 1/3] drm/i915: Assert requests within a context are submitted in order Chris Wilson
2020-03-06  7:16 ` [Intel-gfx] [PATCH 2/3] drm/i915: Always propagate the invocation to i915_schedule Chris Wilson
2020-03-06 10:05   ` Mika Kuoppala
2020-03-06  7:16 ` [Intel-gfx] [PATCH 3/3] drm/i915/gem: Limit struct_mutex to eb_reserve Chris Wilson
2020-03-06  9:41   ` Mika Kuoppala
2020-03-06  9:40 ` Mika Kuoppala [this message]
2020-03-06 10:32 ` [Intel-gfx] ✗ Fi.CI.DOCS: warning for series starting with [1/3] drm/i915: Assert requests within a context are submitted in order Patchwork
2020-03-06 10:41 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " 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=87ftel4y8x.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