diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-07-27 17:34:15 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-09-19 15:38:02 +0100 |
commit | 1dfa8bdb65aa406665244f0650212f723a4e879b (patch) | |
tree | bd56cf57b4f6435369bf37fcf6fda54fd17efedb | |
parent | 378f84f9cd2a76b8bfbf27c64533a7c8d8522644 (diff) |
Force spin-batch to cause a hang as required
When using a spinner to trigger a hang, make it unpreemptable so that it
appears like a true hang.
References: https://bugs.freedesktop.org/show_bug.cgi?id=109661
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
-rw-r--r-- | tests/i915/gem_eio.c | 4 | ||||
-rw-r--r-- | tests/i915/gem_exec_fence.c | 3 | ||||
-rw-r--r-- | tests/kms_busy.c | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c index e0213c76..e7f5d4dd 100644 --- a/tests/i915/gem_eio.c +++ b/tests/i915/gem_eio.c @@ -178,7 +178,9 @@ static igt_spin_t * __spin_poll(int fd, uint32_t ctx, unsigned long flags) struct igt_spin_factory opts = { .ctx = ctx, .engine = flags, - .flags = IGT_SPIN_FAST | IGT_SPIN_FENCE_OUT, + .flags = (IGT_SPIN_FAST | + IGT_SPIN_NO_PREEMPTION | + IGT_SPIN_FENCE_OUT), }; if (gem_can_store_dword(fd, opts.engine)) diff --git a/tests/i915/gem_exec_fence.c b/tests/i915/gem_exec_fence.c index 20718292..2f04d7af 100644 --- a/tests/i915/gem_exec_fence.c +++ b/tests/i915/gem_exec_fence.c @@ -331,7 +331,8 @@ static void test_fence_await(int fd, unsigned ring, unsigned flags) spin = igt_spin_new(fd, .engine = ring, - .flags = IGT_SPIN_FENCE_OUT); + .flags = (IGT_SPIN_FENCE_OUT | + IGT_SPIN_NO_PREEMPTION)); igt_assert(spin->out_fence != -1); i = 0; diff --git a/tests/kms_busy.c b/tests/kms_busy.c index 66f26cd0..7e5ab3d1 100644 --- a/tests/kms_busy.c +++ b/tests/kms_busy.c @@ -271,7 +271,8 @@ static void test_pageflip_modeset_hang(igt_display_t *dpy, t = igt_spin_new(dpy->drm_fd, .engine = ring, - .dependency = fb.gem_handle); + .dependency = fb.gem_handle, + .flags = IGT_SPIN_NO_PREEMPTION); do_or_die(drmModePageFlip(dpy->drm_fd, dpy->pipes[pipe].crtc_id, fb.fb_id, DRM_MODE_PAGE_FLIP_EVENT, &fb)); |