[Intel-gfx] [PATCH] drm/i915/execlists: Simply walk back along request timeline on reset

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Mon Oct 28 12:39:13 UTC 2019


Quoting Chris Wilson (2019-10-27 13:13:09)
> The request's timeline will only contain requests from this context, in
> order of execution. Therefore, we can simply look back along this
> timeline to find the currently executing request.
> 
> If we do find that the current context has completed its last request,
> that does not imply that all requests are completed in the context, so
> only advance the ring->head up to the end of the known completions!
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

<SNIP>

> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -252,22 +252,15 @@ static void mark_eio(struct i915_request *rq)
>  
>  static struct i915_request *active_request(struct i915_request *rq)
>  {
> -       const struct intel_context * const ce = rq->hw_context;
> -       struct i915_request *active = NULL;
> +       struct i915_request *active = rq;
>         struct list_head *list;
>  
> -       if (!i915_request_is_active(rq)) /* unwound, but incomplete! */
> -               return rq;
> -

Especially now with the above removed, the fact that we're only
really interested in the timeline becomes bit obscure. Passing in
a timeline would be more logical.

Either way:

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

Regards, Joonas


More information about the Intel-gfx mailing list