diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vbltest/vbltest.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/vbltest/vbltest.c b/tests/vbltest/vbltest.c index 2fe56b2e..903ca0f4 100644 --- a/tests/vbltest/vbltest.c +++ b/tests/vbltest/vbltest.c @@ -102,7 +102,7 @@ static void usage(char *name) int main(int argc, char **argv) { - int i, c, fd; + int i, c, fd, ret; char *modules[] = { "i915", "radeon", "nouveau", "vmwgfx" }; drmVBlank vbl; drmEventContext evctx; @@ -141,7 +141,11 @@ int main(int argc, char **argv) if (secondary) vbl.request.type |= DRM_VBLANK_SECONDARY; vbl.request.sequence = 0; - drmWaitVBlank(fd, &vbl); + ret = drmWaitVBlank(fd, &vbl); + if (ret != 0) { + printf("drmWaitVBlank (relative) failed ret: %i\n", ret); + return -1; + } printf("starting count: %d\n", vbl.request.sequence); @@ -154,7 +158,11 @@ int main(int argc, char **argv) vbl.request.type |= DRM_VBLANK_SECONDARY; vbl.request.sequence = 1; vbl.request.signal = (unsigned long)&handler_info; - drmWaitVBlank(fd, &vbl); + ret = drmWaitVBlank(fd, &vbl); + if (ret != 0) { + printf("drmWaitVBlank (relative, event) failed ret: %i\n", ret); + return -1; + } /* Set up our event handler */ memset(&evctx, 0, sizeof evctx); @@ -181,7 +189,11 @@ int main(int argc, char **argv) break; } - drmHandleEvent(fd, &evctx); + ret = drmHandleEvent(fd, &evctx); + if (ret != 0) { + printf("drmHandleEvent failed: %i\n", ret); + return -1; + } } return 0; |