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
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915/execlists: Verify we don't submit two identical CCIDs
Date: Mon, 27 Apr 2020 20:31:37 +0300	[thread overview]
Message-ID: <87368olts6.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20200427170513.24019-2-chris@chris-wilson.co.uk>

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

> Check that we do not submit two contexts into ELSP with the same CCID
> [upper portion of the descriptor].
>
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/1793
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/gt/intel_lrc.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index d68a04f2a9d5..f8a8cd72f227 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1621,6 +1621,7 @@ assert_pending_valid(const struct intel_engine_execlists *execlists,
>  	struct i915_request * const *port, *rq;
>  	struct intel_context *ce = NULL;
>  	bool sentinel = false;
> +	u32 ccid = -1;
>  
>  	trace_ports(execlists, msg, execlists->pending);
>  
> @@ -1654,6 +1655,14 @@ assert_pending_valid(const struct intel_engine_execlists *execlists,
>  		}
>  		ce = rq->context;
>  
> +		if (ccid == upper_32_bits(ce->lrc_desc)) {
> +			GEM_TRACE_ERR("Dup ccid:%x context:%llx in pending[%zd]\n",
> +				      ccid, ce->timeline->fence_context,
> +				      port - execlists->pending);

The trace was lost, atleast from me, on the previous logs I looked
and thus the value. trace buffer overflowed? But if it
was reader error, then perhaps putting this explicitly in dmesg
is not necessary.

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

> +			return false;
> +		}
> +		ccid = upper_32_bits(ce->lrc_desc);
> +
>  		/*
>  		 * Sentinels are supposed to be lonely so they flush the
>  		 * current exection off the HW. Check that they are the
> -- 
> 2.20.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

  reply	other threads:[~2020-04-27 17:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-27 17:05 [Intel-gfx] [PATCH 1/2] drm/i915/execlists: Avoid reusing the same logical CC_ID Chris Wilson
2020-04-27 17:05 ` [Intel-gfx] [PATCH 2/2] drm/i915/execlists: Verify we don't submit two identical CCIDs Chris Wilson
2020-04-27 17:31   ` Mika Kuoppala [this message]
2020-04-27 17:43     ` Chris Wilson
2020-04-27 17:28 ` [Intel-gfx] [PATCH 1/2] drm/i915/execlists: Avoid reusing the same logical CC_ID Mika Kuoppala
2020-04-27 17:36   ` Chris Wilson
2020-04-27 17:41 ` [Intel-gfx] [PATCH] " Chris Wilson
2020-05-01  2:55   ` Sasha Levin
2020-04-27 20:25 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with drm/i915/execlists: Avoid reusing the same logical CC_ID (rev2) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-04-27 21:10 [Intel-gfx] [PATCH 1/2] drm/i915/execlists: Avoid reusing the same logical CCID Chris Wilson
2020-04-27 21:10 ` [Intel-gfx] [PATCH 2/2] drm/i915/execlists: Verify we don't submit two identical CCIDs Chris Wilson
2020-04-28  8:53 [Intel-gfx] [PATCH 1/2] drm/i915/execlists: Avoid reusing the same logical CCID Chris Wilson
2020-04-28  8:53 ` [Intel-gfx] [PATCH 2/2] drm/i915/execlists: Verify we don't submit two identical CCIDs 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=87368olts6.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