On Wed, 2017-08-16 at 09:52 +0100, Chris Wilson wrote:
> In a synchronous setup, we may retire the last request before we
> complete allocating the next request. As the last request is retired, we
> queue a timer to mark the device as idle, and promptly have to execute
> ad cancel that timer once we complete allocating the request and need to
> keep the device awake. If we rearrange the mark_busy() to occur before
> we retire the previous request, we can skip this ping-pong.
> 
> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

<SNIP>

> +++ b/drivers/gpu/drm/i915/i915_gem_request.c
> @@ -265,6 +265,13 @@ static int reserve_seqno(struct intel_engine_cs *engine)
>  
>  static void unreserve_seqno(struct intel_engine_cs *engine)
>  {
> +     if (!--engine->i915->gt.active_requests) {
> +             GEM_BUG_ON(!engine->i915->gt.awake);
> +             mod_delayed_work(engine->i915->wq,
> +                              &engine->i915->gt.idle_work,
> +                              msecs_to_jiffies(100));
> +     }

This function could use a better name, now it seems to tightly tie to
seqno only, and idle work is very unexpected. How about just
unreserve_engine vs. reserve_engine?

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

Reply via email to