]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/execlists: Don't merely skip submission if maybe timeslicing
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 18 Oct 2019 07:20:27 +0000 (08:20 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 18 Oct 2019 10:23:26 +0000 (11:23 +0100)
commitf99bd9f6af0d4db70c20febdad0d83a3698a0fb1
tree963f11a4dee36332585aee7b70d9c35f72f4ade6
parent23fac36a43a31891ac72bb3d9c6784d39e0dd898
drm/i915/execlists: Don't merely skip submission if maybe timeslicing

Normally, we try and skip submission if ELSP[1] is filled. However, we
may desire to enable timeslicing due to the queue priority, even if
ELSP[1] itself does not require timeslicing. That is the queue is equal
priority to ELSP[0] and higher priority then ELSP[1]. Previously, we
would wait until the context switch to preempt the current ELSP[1], but
with timeslicing, we want to preempt ELSP[0] and replace it with the
queue.

In writing the test case, it become quickly apparent that we were also
suppressing the tasklet during promotion and so failing to notice when
the queue started requiring timeslicing.

Fixes: 6c20570d9e97 ("drm/i915/execlist: Trim immediate timeslice expiry")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191018072027.31948-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/selftest_lrc.c
drivers/gpu/drm/i915/i915_scheduler.c
drivers/gpu/drm/i915/i915_scheduler.h