diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c index baea3858..84cce0d7 100644 --- a/tests/modetest/modetest.c +++ b/tests/modetest/modetest.c @@ -2013,6 +2013,11 @@ int main(int argc, char **argv) if (!args) encoders = connectors = crtcs = planes = framebuffers = 1; + if (test_vsync && !count) { + fprintf(stderr, "page flipping requires at least one -s option.\n"); + return -1; + } + dev.fd = util_open(device, module); if (dev.fd < 0) return -1; @@ -2026,11 +2031,6 @@ int main(int argc, char **argv) dev.use_atomic = use_atomic; - if (test_vsync && !count) { - fprintf(stderr, "page flipping requires at least one -s option.\n"); - return -1; - } - dev.resources = get_resources(&dev); if (!dev.resources) { drmClose(dev.fd);