]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Prevent timeslicing into unpreemptable requests
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 27 May 2020 16:24:18 +0000 (17:24 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 28 May 2020 08:59:27 +0000 (09:59 +0100)
commitb72f02d78e4f257761ed003444ae52083f962076
tree107781ac864d21a1169d36e2de107f789bb1328a
parentcc649a9eafc1ef5c40db023084cb94422d08aa84
drm/i915/gt: Prevent timeslicing into unpreemptable requests

We have a I915_REQUEST_NOPREEMPT flag that we set when we must prevent
the HW from preempting during the course of this request. We need to
honour this flag and protect the HW even if we have a heartbeat request,
or other maximum priority barrier, pending. As such, restrict the
timeslicing check to avoid preempting into the topmost priority band,
leaving the unpreemptable requests in blissful peace running
uninterrupted on the HW.

v2: Set the I915_PRIORITY_BARRIER to be less than
I915_PRIORITY_UNPREEMPTABLE so that we never submit a request
(heartbeat or barrier) that can legitimately preempt the current
non-premptable request.

Fixes: 2a98f4e65bba ("drm/i915: add infrastructure to hold off preemption on a request")
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/20200527162418.24755-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_priolist_types.h