[Intel-gfx] [PATCH 17/57] drm/i915: Extract request suspension from the execlists

Chris Wilson chris at chris-wilson.co.uk
Tue Feb 2 13:27:44 UTC 2021


Quoting Tvrtko Ursulin (2021-02-02 13:15:52)
> 
> On 01/02/2021 08:56, Chris Wilson wrote:
> > Make the ability to suspend and resume a request and its dependents
> > generic.

> > +bool __i915_sched_suspend_request(struct intel_engine_cs *engine,
> > +                               struct i915_request *rq)
> > +{
> > +     LIST_HEAD(list);
> > +
> > +     lockdep_assert_held(&engine->active.lock);
> > +     GEM_BUG_ON(rq->engine != engine);
> > +
> > +     if (__i915_request_is_complete(rq)) /* too late! */
> > +             return false;
> > +
> > +     if (i915_request_on_hold(rq))
> > +             return false;
> 
> This was a GEM_BUG_ON before so not pure extraction / code movement.

It was part of making it generic to allow other callers.
-Chris


More information about the Intel-gfx mailing list