From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/4] drm/i915: Reload PD tables after semaphore wait on gen8
Date: Mon, 11 Apr 2016 10:34:14 +0300 [thread overview]
Message-ID: <20160411073414.GY4329@intel.com> (raw)
In-Reply-To: <1460196886-15760-4-git-send-email-chris@chris-wilson.co.uk>
On Sat, Apr 09, 2016 at 11:14:45AM +0100, Chris Wilson wrote:
> When the engine idles waiting upon a semaphore, it loses its
> pagetables and we must reload them before executing the batch.
RCS shouldn't lose them IIRC, other engines yes. As I recall the
other way to avoid this would be to prevent the engine from
entering some power save mode during the wait, but I suppose
that might come at a power cost.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> drivers/gpu/drm/i915/intel_ringbuffer.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
> index 62d09cf2ea8f..a4bab6466388 100644
> --- a/drivers/gpu/drm/i915/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
> @@ -1446,6 +1446,7 @@ gen8_ring_sync(struct drm_i915_gem_request *waiter_req,
> {
> struct intel_engine_cs *waiter = waiter_req->engine;
> struct drm_i915_private *dev_priv = waiter->dev->dev_private;
> + struct i915_hw_ppgtt *ppgtt;
> int ret;
>
> ret = intel_ring_begin(waiter_req, 4);
> @@ -1461,6 +1462,15 @@ gen8_ring_sync(struct drm_i915_gem_request *waiter_req,
> intel_ring_emit(waiter,
> upper_32_bits(GEN8_WAIT_OFFSET(waiter, signaller->id)));
> intel_ring_advance(waiter);
> +
> + /* When the engine idles waiting upon a semaphore, it loses its
> + * pagetables and we must reload them before executing the batch.
> + * We do this on the i915_switch_context() following the wait and
> + * before the dispatch.
> + */
> + ppgtt = waiter_req->ctx->ppgtt;
> + if (ppgtt)
> + ppgtt->pd_dirty_rings |= intel_engine_flag(waiter_req->engine);
> return 0;
> }
>
> --
> 2.8.0.rc3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-11 7:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-09 10:14 Finish gen8 legacy semaphores Chris Wilson
2016-04-09 10:14 ` [PATCH 1/4] drm/i915: Fix gen8 semaphores id for legacy mode Chris Wilson
2016-04-11 8:26 ` Ville Syrjälä
2016-04-09 10:14 ` [PATCH 2/4] drm/i915: Fix serialisation of pipecontrol write vs semaphore signal Chris Wilson
2016-04-11 8:34 ` Ville Syrjälä
2016-04-11 9:06 ` Chris Wilson
2016-04-14 14:29 ` Ville Syrjälä
2016-04-14 14:33 ` Ville Syrjälä
2016-04-14 16:09 ` Chris Wilson
2016-04-09 10:14 ` [PATCH 3/4] drm/i915: Reload PD tables after semaphore wait on gen8 Chris Wilson
2016-04-11 7:34 ` Ville Syrjälä [this message]
2016-04-11 8:16 ` Chris Wilson
2016-04-11 8:37 ` Ville Syrjälä
2016-04-09 10:14 ` [PATCH 4/4] drm/i915: Enable semaphores for legacy submission " Chris Wilson
2016-04-09 11:02 ` ✗ Fi.CI.BAT: warning for series starting with [1/4] drm/i915: Fix gen8 semaphores id for legacy mode 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=20160411073414.GY4329@intel.com \
--to=ville.syrjala@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