summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-11-27 17:09:41 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-12-13 12:01:30 +0000
commit3777fb5efa7f69431f28e10cf74a1e97c26d2548 (patch)
tree26edcb5d3bbd63c9cc5b9ab893a5185eea598d0d
parent1e96ca072c66a1bea5936186cfd0db7201c71c4a (diff)
tests/kms_cursor_legacy: Check for update overruns
Check around each pipe test whether an update overran its alloted time. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--tests/kms_cursor_legacy.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 9959fe32..5be67a31 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -88,6 +88,7 @@ static void stress(igt_display_t *display,
arg.crtc_id = crtc_id[0] = display->pipes[pipe].crtc_id;
do_ioctl(display->drm_fd, DRM_IOCTL_MODE_CURSOR, &arg);
}
+ kmstest_pipe_begin(display->drm_fd, pipe);
}
arg.flags = mode;
@@ -151,6 +152,9 @@ static void stress(igt_display_t *display,
igt_info("Total updates %llu\n", (long long)results[0]);
}
+ if (pipe >= 0)
+ kmstest_pipe_end(display->drm_fd, pipe);
+
gem_close(display->drm_fd, arg.handle);
munmap(results, PAGE_SIZE);
}
@@ -418,6 +422,8 @@ static void flip(igt_display_t *display,
prepare_flip_test(display, mode, flip_pipe, cursor_pipe, arg, &fb_info, &argb_fb, &cursor_fb2);
+ kmstest_pipe_begin(display->drm_fd, flip_pipe);
+
igt_display_commit2(display, display->is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
igt_fork(child, 1) {
@@ -458,6 +464,8 @@ static void flip(igt_display_t *display,
}
igt_waitchildren();
+ kmstest_pipe_end(display->drm_fd, flip_pipe);
+
munmap(results, PAGE_SIZE);
igt_remove_fb(display->drm_fd, &fb_info);