drm/i915/selftests: Exercise reset to break stuck GTT eviction
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 16 Jul 2018 13:40:09 +0000 (14:40 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 16 Jul 2018 19:02:06 +0000 (20:02 +0100)
commiteb5f43d45b3b3c239b9ca0fde6eee11244a57346
treec78cf3a1cafc38a4d46208a65d69dcb97b6329dd
parent0f6b79fa138d781b978bcff22680662fd351cd2d
drm/i915/selftests: Exercise reset to break stuck GTT eviction

We must be able to reset the GPU while we are waiting on it to perform
an eviction (unbinding an active vma). So attach a spinning request to a
target vma and try and it evict it from a thread to see if that blocks
indefinitely.

v2: Add a wait for the thread to start just in case that takes more than
10ms...
v3: complete() not completion_done() to signal the completion.

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