drm/i915: Exercise request cancellation using a mock selftest
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Feb 2017 07:44:18 +0000 (07:44 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Feb 2017 14:50:42 +0000 (14:50 +0000)
commit591c0fb85d1c351d28334fb249bf1faaafcf326b
tree9a6efa9e1d1726bfe173051706d5daa9c49e5496
parentd6a2289d9d6b3ea47514cf29fed56340fb8fec7e
drm/i915: Exercise request cancellation using a mock selftest

Add a mock selftest to preempt a request and check that we cancel it,
requeue the request and then complete its execution.

v2: Error leaks no more.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20170223074422.4125-13-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/selftests/i915_gem_request.c
drivers/gpu/drm/i915/selftests/mock_request.c
drivers/gpu/drm/i915/selftests/mock_request.h