drm/i915/selftests: Check the context size
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 17 Aug 2019 07:37:11 +0000 (08:37 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 17 Aug 2019 08:27:58 +0000 (09:27 +0100)
commit9559c8751385ba2d9ff7fc1150694b4130f8a6d9
tree1d7113b27fd7764f99b28f44f2e1dd33e27adb07
parenteb7c022ddc0c26c2969d04d2dd4dcc799dbe159c
drm/i915/selftests: Check the context size

Add a redzone to our context image and check the HW does not write into
after a context save, to verify that we have the correct context size.
(This does vary with feature bits, so test with a live setup that should
match how we run userspace.)

v2: Check the redzone on every context unpin
v3: Use a kernel context to prevent loading garbage for ringbuffer
submission

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190817073711.5897-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/selftest_context.c