From: Chris Wilson Date: Fri, 5 Jun 2020 12:23:26 +0000 (+0100) Subject: drm/i915/gt: Always check to enable timeslicing if not submitting X-Git-Tag: x86-urgent-2020-08-15~22^2~18^2~86 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=12b67c2e9c58f6c716efcd5cfc9411d7e5f45930;p=users%2Fdwmw2%2Flinux.git drm/i915/gt: Always check to enable timeslicing if not submitting We may choose not to submit for a number of reasons, yet not fill both ELSP. In which case we must start timeslicing (there will be no ACK event on which to hook the start) if the queue would benefit from the currently active context being evicted. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala Link: https://patchwork.freedesktop.org/patch/msgid/20200605122334.2798-2-chris@chris-wilson.co.uk --- diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c index 92c3368ffcbd8..d55a5e0466e5f 100644 --- a/drivers/gpu/drm/i915/gt/intel_lrc.c +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c @@ -2362,10 +2362,8 @@ static void execlists_dequeue(struct intel_engine_cs *engine) if (last->context == rq->context) goto done; - if (i915_request_has_sentinel(last)) { - start_timeslice(engine, rq_prio(rq)); + if (i915_request_has_sentinel(last)) goto done; - } /* * If GVT overrides us we only ever submit @@ -2446,6 +2444,7 @@ done: set_preempt_timeout(engine, *active); execlists_submit_ports(engine); } else { + start_timeslice(engine, execlists->queue_priority_hint); skip_submit: ring_set_paused(engine, 0); }