From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Subject: Re: [PATCH v4] drm/i915: Advance ring->head fully when idle
Date: Fri, 07 Apr 2017 10:25:13 +0300 [thread overview]
Message-ID: <1491549913.3493.9.camel@linux.intel.com> (raw)
In-Reply-To: <20170406170028.26871-1-chris@chris-wilson.co.uk>
On to, 2017-04-06 at 18:00 +0100, Chris Wilson wrote:
> When we retire the last request on the ring, before we ever access that
> ring again we know it will be completely idle and so we can advance the
> ring->head fully to the end (i.e. ring->tail) and not just to the start
> of the breadcrumb. This allows us to skip re-emitting the breadcrumb
> after resetting the GPU if the ring was entirely idle. This prevents us
> from overwriting a seqno wraparound by re-executing a stale breadcrumb,
> i.e.
> submit_request(1)
> intel_engine_init_global_seqno(0)
> i915_reset()
> would then leave 1 in the HWS, but the next request to execute would
> also be with seqno 1. The sanity checks upon submission detect this as a
> timewarp and explode. By setting the ring as empty, upon reset the HWS
> is left as 0, leaving it consistent with the timeline.
>
> v2: Fix check for deleting last element of list. We know that this
> request is always the first element of the ring, so only if next
> points back to the start will this be the only request in flight.
> v3: Remove opencoding of list_is_last()
> v4: Move the block to its own function for some clarity.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100144
> Testcase: igt/gem_exec_whisper/hang-*
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-04-07 7:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 15:30 [PATCH 1/2] drm/i915: Assert the engine is idle before overwiting the HWS Chris Wilson
2017-04-05 15:30 ` [PATCH 2/2] drm/i915: Advance ring->head fully when idle Chris Wilson
2017-04-05 16:06 ` [PATCH v2] " Chris Wilson
2017-04-06 15:52 ` [PATCH v3] " Chris Wilson
2017-04-06 17:00 ` [PATCH v4] " Chris Wilson
2017-04-07 7:25 ` Joonas Lahtinen [this message]
2017-04-07 9:15 ` Chris Wilson
2017-04-05 15:53 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Assert the engine is idle before overwiting the HWS Patchwork
2017-04-05 16:26 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Assert the engine is idle before overwiting the HWS (rev2) Patchwork
2017-04-06 16:40 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Assert the engine is idle before overwiting the HWS (rev3) Patchwork
2017-04-06 17:30 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Assert the engine is idle before overwiting the HWS (rev4) Patchwork
2017-04-07 7:22 ` [PATCH 1/2] drm/i915: Assert the engine is idle before overwiting the HWS Joonas Lahtinen
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=1491549913.3493.9.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mika.kuoppala@intel.com \
/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