diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-12-06 12:26:01 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-12-06 12:34:45 +0000 |
commit | 570d161b01801759255a857845f6360daf23c930 (patch) | |
tree | 38d36d01027c1ba194460645839766cc027f164b /tests/kms_flip.c | |
parent | 32eed6906ed17e79bf39e4b956400d1b68dd274a (diff) |
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/kms_flip.c')
-rw-r--r-- | tests/kms_flip.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); |