]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Add live selftests for indirect ctx batchbuffers
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Fri, 24 Apr 2020 21:48:40 +0000 (00:48 +0300)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 25 Apr 2020 18:08:18 +0000 (19:08 +0100)
commit70a94d36fea6914322c4cad9058e9b19109aa102
tree6c28e50211361236ac03e9f6f8346028bd1031c8
parent65deffff15d77375a121d0777f93d2a1b21a0dff
drm/i915: Add live selftests for indirect ctx batchbuffers

Indirect ctx batchbuffers are a hw feature of which
batch can be run, by hardware, during context restoration stage.
Driver can setup a batchbuffer and also an offset into the
context image. When context image is marshalled from
memory to registers, and when the offset from the start of
context register state is equal of what driver pre-determined,
batch will run. So one can manipulate context restoration
process at cacheline granularity, given some limitations,
as you need to have rudimentaries in place before you can
run a batch.

Add selftest which will write the ring start register
to a canary spot. This will test that hardware will run a
batchbuffer for the context in question.

v2: request wait fix, naming (Chris)
v3: test order (Chris)
v4: rebase

Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20200424214841.28076-3-mika.kuoppala@linux.intel.com
drivers/gpu/drm/i915/gt/selftest_lrc.c