diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-16 15:21:54 +0200 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-16 18:17:27 +0200 |
commit | 0f6b79fa138d781b978bcff22680662fd351cd2d (patch) | |
tree | b7d22fb8f30ba37d2e84ea99cf23913c8f2d291f /drivers/gpu/drm/i915/intel_lrc.c | |
parent | drm/i915/execlists: Always clear preempt status on cancelling all (diff) | |
download | linux-0f6b79fa138d781b978bcff22680662fd351cd2d.tar.xz linux-0f6b79fa138d781b978bcff22680662fd351cd2d.zip |
drm/i915/selftests: Force a preemption hang
Inject a failure into preemption completion to pretend as if the HW
didn't successfully handle preemption and we are forced to do a reset in
the middle.
v2: Wait for preemption, to force testing with the missed preemption.
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/20180716132154.12539-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index c0ee14f86754..db5351e6a3a5 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -559,6 +559,9 @@ static void complete_preempt_context(struct intel_engine_execlists *execlists) { GEM_BUG_ON(!execlists_is_active(execlists, EXECLISTS_ACTIVE_PREEMPT)); + if (inject_preempt_hang(execlists)) + return; + execlists_cancel_port_requests(execlists); __unwind_incomplete_requests(container_of(execlists, struct intel_engine_cs, |