From 3c8adda6e1e6b0471b3d70a63d795622bbeb1580 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 28 Sep 2011 23:34:09 +0200 Subject: modetest: Check error message from pageflip ioctl Signed-off-by: Jakob Bornecrantz --- tests/modetest/modetest.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index f6fdcf48..35045c87 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -608,8 +608,12 @@ set_mode(struct connector *c, int count, int page_flip) if (c[i].mode == NULL) continue; - drmModePageFlip(fd, c[i].crtc, other_fb_id, - DRM_MODE_PAGE_FLIP_EVENT, &c[i]); + ret = drmModePageFlip(fd, c[i].crtc, other_fb_id, + DRM_MODE_PAGE_FLIP_EVENT, &c[i]); + if (ret) { + fprintf(stderr, "failed to page flip: %s\n", strerror(errno)); + return; + } gettimeofday(&c[i].start, NULL); c[i].swap_count = 0; c[i].fb_id[0] = fb_id; -- cgit v1.2.3