From 570d161b01801759255a857845f6360daf23c930 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 6 Dec 2016 12:26:01 +0000 Subject: igt/kms_flip: Poll before reading from nonblocking drm_fd If we run the full testsuite, the drm_fd is set to nonblocking - so we have to explicitly wait using poll rather than rely on a blocking read for the vblank event. Signed-off-by: Chris Wilson --- tests/kms_flip.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/kms_flip.c') diff --git a/tests/kms_flip.c b/tests/kms_flip.c index 76b1cc2b..fc946d36 100644 --- a/tests/kms_flip.c +++ b/tests/kms_flip.c @@ -1187,6 +1187,7 @@ static void calibrate_ts(struct test_output *o, int crtc_idx) struct drm_event_vblank ev; uint64_t now; + igt_assert(poll(&(struct pollfd){drm_fd, POLLIN}, 1, -1) == 1); igt_assert(read(drm_fd, &ev, sizeof(ev)) == sizeof(ev)); igt_assert_eq(ev.sequence, last_seq + 1); -- cgit v1.2.3