public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Michel Thierry <michel.thierry@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/execlists: Add a comment for the extra MI_ARB_ENABLE
Date: Thu, 5 Oct 2017 12:41:40 -0700	[thread overview]
Message-ID: <288253b3-27d0-a2db-0538-e05c5b991246@intel.com> (raw)
In-Reply-To: <20171005191005.13462-1-chris@chris-wilson.co.uk>

On 10/5/2017 12:10 PM, Chris Wilson wrote:
> Michel Thierry noticed that we were applying WaDisableCtxRestoreArbitration
> even to gen9, which does not require the w/a. The rationale is that we
> need to enable MI arbitration for execlists to work, and to be safe we
> do that before every batch (in addition to every context switch into the
> batch). Since this is not clear from the single line comment suggesting
> the MI_ARB_ENABLE is solely for the w/a, add a little more detail.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Michel Thierry <michel.thierry@intel.com>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Michał Winiarski <michal.winiarski@intel.com>

It can't be clearer. Thanks!

Reviewed-by: Michel Thierry <michel.thierry@intel.com>

> ---
>   drivers/gpu/drm/i915/intel_lrc.c | 18 +++++++++++++++++-
>   1 file changed, 17 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 476881f63505..fa66e4f58642 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1608,7 +1608,23 @@ static int gen8_emit_bb_start(struct drm_i915_gem_request *req,
>   	if (IS_ERR(cs))
>   		return PTR_ERR(cs);
>   
> -	/* WaDisableCtxRestoreArbitration:bdw,chv */
> +	/*
> +	 * WaDisableCtxRestoreArbitration:bdw,chv
> +	 *
> +	 * We don't need to perform MI_ARB_ENABLE as often as we do (in
> +	 * particular all the gen that do not need the w/a at all!), if we
> +	 * took care to make sure that on every switch into this context
> +	 * (both ordinary and for preemption) that arbitrartion was enabled
> +	 * we would be fine. However, there doesn't seem to be a downside to
> +	 * being paranoid and making sure it is set before each batch and
> +	 * every context-switch.
> +	 *
> +	 * Note that if we fail to enable arbitration before the request
> +	 * is complete, then we do not see the context-switch interrupt and
> +	 * the engine hangs (with RING_HEAD == RING_TAIL).
> +	 *
> +	 * That satisfies both the GPGPU w/a and our heavy-handed paranoia.
> +	 */
>   	*cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
>   
>   	/* FIXME(BDW): Address space and security selectors. */
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-10-05 19:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 18:19 [PATCH] drm/i915/execlists: WaDisableCtxRestoreArbitration is only needed in gen8 Michel Thierry
2017-10-05 18:28 ` Chris Wilson
2017-10-05 18:54   ` Michel Thierry
2017-10-06  7:33     ` Joonas Lahtinen
2017-10-05 19:10 ` [PATCH] drm/i915/execlists: Add a comment for the extra MI_ARB_ENABLE Chris Wilson
2017-10-05 19:41   ` Michel Thierry [this message]
2017-10-06 22:20     ` Chris Wilson
2017-10-06 10:21 ` ✗ Fi.CI.BAT: warning for drm/i915/execlists: WaDisableCtxRestoreArbitration is only needed in gen8 (rev2) 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=288253b3-27d0-a2db-0538-e05c5b991246@intel.com \
    --to=michel.thierry@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