drm/i915/selftests: Verify whitelist of context registers
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 24 Apr 2019 11:09:41 +0000 (12:09 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 24 Apr 2019 17:37:36 +0000 (18:37 +0100)
commit86554f48e511faa58f729cc077b1733179882804
tree43698d8eab6d013d45af53bf2ae496e3970070c5
parent09407579abf55a8f472c221325dda81cca324326
drm/i915/selftests: Verify whitelist of context registers

The RING_NONPRIV allows us to add registers to a whitelist that allows
userspace to modify them. Ideally such registers should be safe and
saved within the context such that they do not impact system behaviour
for other users. This selftest verifies that those registers we do add
are (a) then writable by userspace and (b) only affect a single client.

Opens:
- Is GEN9_SLICE_COMMON_ECO_CHICKEN1 really write-only?

v2: Remove the blatant copy-paste.
v3: Emulate userspace register writes via the batch again.

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/20190424110941.9869-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/selftests/intel_workarounds.c