All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Skip idling an idle engine
Date: Wed, 25 May 2016 11:50:22 +0300	[thread overview]
Message-ID: <1464166222.4875.1.camel@linux.intel.com> (raw)
In-Reply-To: <1464087377-19114-1-git-send-email-chris@chris-wilson.co.uk>

On ti, 2016-05-24 at 11:56 +0100, Chris Wilson wrote:
> During suspend (or module unload), if we have never accessed the engine
> (i.e. userspace never submitted a batch to it), the engine is idle. Then
> we attempt to idle the engine by forcing it to the default context,
> which actually means we submit a render batch to setup the golden
> context state and then wait for it to complete. We can skip this
> entirely as we know the engine is idle.
> 

Seems reasonable.

By quick look we do not have an inactive engine list, though? So the
comment above could be nuked.

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

> Testcase: igt/drm_module_reload_basic #byt
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95634
> ---
>  drivers/gpu/drm/i915/i915_gem.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index b3c15698d611..8fb4fe6ae98c 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -3428,6 +3428,9 @@ int i915_gpu_idle(struct drm_device *dev)
>  
>  	/* Flush everything onto the inactive list. */
>  	for_each_engine(engine, dev_priv) {
> +		if (engine->last_context == NULL)
> +			continue;
> +
>  		if (!i915.enable_execlists) {
>  			struct drm_i915_gem_request *req;
>  
-- 
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

  parent reply	other threads:[~2016-05-25  8:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 10:56 [PATCH] drm/i915: Skip idling an idle engine Chris Wilson
2016-05-24 11:22 ` ✗ Ro.CI.BAT: failure for " Patchwork
2016-05-25  8:50 ` Joonas Lahtinen [this message]
2016-05-25  9:00   ` [PATCH] " 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=1464166222.4875.1.camel@linux.intel.com \
    --to=joonas.lahtinen@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.