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 1/2] drm/i915: Tidy reporting busy status during i915_gem_retire_requests()
Date: Wed, 17 Aug 2016 13:10:00 +0300 [thread overview]
Message-ID: <1471428600.3613.26.camel@linux.intel.com> (raw)
In-Reply-To: <1471362315-505-1-git-send-email-chris@chris-wilson.co.uk>
On ti, 2016-08-16 at 16:45 +0100, Chris Wilson wrote:
> As we know by inspection whether any engine is still busy as we retire
> all the requests, we can pass that information back via return value
> rather than check again afterwards.
>
> v2: A little more polish missed in patch splitting
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_request.c | 11 ++++++-----
> 1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
> index bf62427a35b7..02242736e492 100644
> --- a/drivers/gpu/drm/i915/i915_gem_request.c
> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -727,16 +727,18 @@ complete:
> return ret;
> }
>
> -static void engine_retire_requests(struct intel_engine_cs *engine)
> +static bool engine_retire_requests(struct intel_engine_cs *engine)
> {
> struct drm_i915_gem_request *request, *next;
>
> list_for_each_entry_safe(request, next, &engine->request_list, link) {
> if (!i915_gem_request_completed(request))
> - break;
> + return false;
>
> i915_gem_request_retire(request);
> }
> +
> + return true;
> }
>
> void i915_gem_retire_requests(struct drm_i915_private *dev_priv)
> @@ -750,9 +752,8 @@ void i915_gem_retire_requests(struct drm_i915_private *dev_priv)
>
> GEM_BUG_ON(!dev_priv->gt.awake);
>
> - for_each_engine(engine, dev_priv) {
> - engine_retire_requests(engine);
> - if (!intel_engine_is_active(engine))
> + for_each_engine_masked(engine, dev_priv, dev_priv->gt.active_engines) {
> + if (engine_retire_requests(engine))
> dev_priv->gt.active_engines &= ~intel_engine_flag(engine);
> }
Drop the braces.
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:[~2016-08-17 10:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 15:20 [PATCH] drm/i915: Tidy reporting busy status during i915_gem_retire_requests() Chris Wilson
2016-08-16 15:45 ` [PATCH 1/2] " Chris Wilson
2016-08-16 15:45 ` [PATCH 2/2] drm/i915: Make for_each_engine_masked() more compact and quicker Chris Wilson
2016-08-17 15:12 ` Mika Kuoppala
2016-08-17 10:10 ` Joonas Lahtinen [this message]
2016-08-17 15:04 ` [PATCH 1/2] drm/i915: Tidy reporting busy status during i915_gem_retire_requests() Mika Kuoppala
2016-08-16 15:54 ` ✗ Ro.CI.BAT: failure for " 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=1471428600.3613.26.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 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.