summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-05-27 23:46:51 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-05-27 23:50:11 +0100
commit2991a5d60b1bbf2b2b6004669cd0f9471bd687a2 (patch)
treed1eb5a6cd3949408edab8c2ebdc4e4464a6ad070 /tests
parentf7e3772175c53f0c910f4513831791cb5bdcab04 (diff)
kms_busy: Fix unpluging and remember to unplug!
Actually remember to unplug to the busy buffer after waiting for the flip to complete early. Otherwise we wait for the hangcheck to kick in, which while effective at testing the flip recovery for hanging buffers is not the intent of the test and wastes 40s in BAT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/kms_busy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/kms_busy.c b/tests/kms_busy.c
index 222612e7..b1b2ea77 100644
--- a/tests/kms_busy.c
+++ b/tests/kms_busy.c
@@ -85,7 +85,8 @@ static void flip_to_fb(igt_display_t *dpy, int pipe,
.engine = ring,
.fence = fence,
.dependency = fb->gem_handle,
- .flags = IGT_SPIN_FENCE_IN | IGT_SPIN_NO_PREEMPTION);
+ .flags = IGT_SPIN_FENCE_IN);
+ close(fence);
igt_fork(child, 1) {
igt_assert(gem_bo_busy(dpy->drm_fd, fb->gem_handle));
@@ -106,12 +107,14 @@ static void flip_to_fb(igt_display_t *dpy, int pipe,
"flip completed whilst %s was busy [%d]\n",
name, gem_bo_busy(dpy->drm_fd, fb->gem_handle));
igt_assert(gem_bo_busy(dpy->drm_fd, fb->gem_handle));
+
+ igt_cork_unplug(&cork);
}
igt_waitchildren_timeout(5 * timeout,
"flip blocked waiting for busy bo\n");
igt_spin_end(t);
- close(fence);
+ igt_cork_unplug(&cork);
igt_assert(read(dpy->drm_fd, &ev, sizeof(ev)) == sizeof(ev));
igt_assert(poll(&pfd, 1, 0) == 0);