From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [CI 2/2] drm/i915: Assert that the context-switch completion matches our context
Date: Mon, 23 Jan 2017 11:59:08 +0000 [thread overview]
Message-ID: <da479a0e-8276-a419-c19f-b9fb30224594@linux.intel.com> (raw)
In-Reply-To: <20170123113132.18665-2-chris@chris-wilson.co.uk>
On 23/01/2017 11:31, Chris Wilson wrote:
> When execlists signals the context completion, it also provides the
> context id for the status event. Assert that id matches the one we expect.
>
> v2: The upper dword of the context status is a duplicate of the upper
> dword from elsp submission (i.e. includes the group id as well as the
> context id). Include this check as well.
> v3: Only check against lrc_desc (as this contains the hw_id check)
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/intel_lrc.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 432ee495dec2..eceffe25c022 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -595,6 +595,11 @@ static void intel_lrc_irq_handler(unsigned long data)
> if (!(status & GEN8_CTX_STATUS_COMPLETED_MASK))
> continue;
>
> + /* Check the context/desc id for this event matches */
> + GEM_BUG_ON(readl(buf + 2 * idx + 1) !=
> + upper_32_bits(intel_lr_context_descriptor(port[0].request->ctx,
> + engine)));
> +
> GEM_BUG_ON(port[0].count == 0);
> if (--port[0].count == 0) {
> GEM_BUG_ON(status & GEN8_CTX_STATUS_PREEMPTED);
>
I'm happy with this one as well.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-01-23 11:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-23 11:31 [CI 1/2] drm/i915: Assert that the kernel_context is hw-id 0 Chris Wilson
2017-01-23 11:31 ` [CI 2/2] drm/i915: Assert that the context-switch completion matches our context Chris Wilson
2017-01-23 11:49 ` Joonas Lahtinen
2017-01-23 11:59 ` Tvrtko Ursulin [this message]
2017-01-23 12:22 ` ✗ Fi.CI.BAT: warning for series starting with [CI,1/2] drm/i915: Assert that the kernel_context is hw-id 0 Patchwork
2017-01-23 12:28 ` 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=da479a0e-8276-a419-c19f-b9fb30224594@linux.intel.com \
--to=tvrtko.ursulin@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.