]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Exercise potential false lite-restore
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 2 Oct 2019 18:34:59 +0000 (19:34 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 2 Oct 2019 23:26:02 +0000 (00:26 +0100)
commit2761add05c35878703a3d31720cbd707a7a6082b
tree19ecc9d3e8e6ccbfe28ea63a395b509a55988d5f
parent86ee54e8846db02c4080ec42a72a662651b1d4dc
drm/i915/selftests: Exercise potential false lite-restore

If execlists's lite-restore is based on the common GEM context tag
rather than the per-intel_context LRCA, then a context switch between
two intel_contexts on the same engine derived from the same GEM context
will perform a lite-restore instead of a full context switch. We can
exploit this by poisoning the ringbuffer of the first context and trying
to trick a simple RING_TAIL update (i.e. lite-restore)

v2: Also check what happens if preempt ce[0] with ce[1] (both instances
on the same engine from the same parent context) [Tvrtko]

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/20191002183459.26614-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/selftest_lrc.c