Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes: > Pull the repeated check for the last active request being completed to a > single spot, when deciding whether or not execlist preemption is > required. > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/gt/intel_lrc.c | 14 ++++---------- > 1 file changed, 4 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c > index 4eb397b0e14d..7bdbfac26d7b 100644 > --- a/drivers/gpu/drm/i915/gt/intel_lrc.c > +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c > @@ -2137,12 +2137,11 @@ static void execlists_dequeue(struct intel_engine_cs *engine) > */ > > if ((last = *active)) { > - if (need_preempt(engine, last, rb)) { > - if (i915_request_completed(last)) { > - tasklet_hi_schedule(&execlists->tasklet); > - return; > - } > + if (i915_request_completed(last) && > + !list_is_last(&last->sched.link, &engine->active.requests)) You return if it is not last? Also the hi schedule is gone. -Mika > + return; > > + if (need_preempt(engine, last, rb)) { > ENGINE_TRACE(engine, > "preempting last=%llx:%lld, prio=%d, hint=%d\n", > last->fence.context, > @@ -2170,11 +2169,6 @@ static void execlists_dequeue(struct intel_engine_cs *engine) > last = NULL; > } else if (need_timeslice(engine, last, rb) && > timeslice_expired(execlists, last)) { > - if (i915_request_completed(last)) { > - tasklet_hi_schedule(&execlists->tasklet); > - return; > - } > - > ENGINE_TRACE(engine, > "expired last=%llx:%lld, prio=%d, hint=%d, yield?=%s\n", > last->fence.context, > -- > 2.20.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx