diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2019-06-14 10:47:15 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2019-06-14 10:48:41 +0200 |
commit | f3d1f2a5ae4c59d606de17d28391a2f96b00f9e9 (patch) | |
tree | e729549aca9ed57e5678c7840e3f260b3249281c | |
parent | 1d2c935a4f8160aa00d5a26deb073ce2c87aeb48 (diff) | |
download | drminfo-f3d1f2a5ae4c59d606de17d28391a2f96b00f9e9.tar.gz |
drm lease support for egltest
-rw-r--r-- | drmtools-egl.c | 2 | ||||
-rw-r--r-- | egltest.c | 20 | ||||
-rw-r--r-- | meson.build | 5 |
3 files changed, 18 insertions, 9 deletions
diff --git a/drmtools-egl.c b/drmtools-egl.c index 10cc715..3441c57 100644 --- a/drmtools-egl.c +++ b/drmtools-egl.c @@ -150,7 +150,7 @@ void drm_egl_flush_display(void) &drm_conn->modes[0]); if (rc < 0) { fprintf(stderr, "egl: drmModeSetCrtc() failed\n"); - return; + exit(1); } if (fbid) { @@ -19,6 +19,7 @@ #include <pixman.h> #include "drmtools.h" +#include "drm-lease.h" #include "logind.h" #include "ttytools.h" @@ -73,12 +74,13 @@ static void usage(FILE *fp) "usage: egltest [ options ]\n" "\n" "options:\n" - " -h print this\n" - " -a autotest mode\n" - " -c <nr> pick card\n" - " -s <secs> set sleep time (default: 60)\n" - " -i print device info\n" - " -x print extensions\n" + " -h print this\n" + " -a autotest mode\n" + " -c <nr> pick card\n" + " -s <secs> set sleep time (default: 60)\n" + " -i print device info\n" + " -x print extensions\n" + " -L <output> get a drm lease for output\n" "\n"); } @@ -86,6 +88,7 @@ int main(int argc, char **argv) { int card = 0; int secs = 60; + int lease_fd = -1; char *output = NULL; char *modename = NULL; bool printinfo = false; @@ -114,6 +117,9 @@ int main(int argc, char **argv) case 'a': autotest = true; break; + case 'L': + lease_fd = drm_lease(optarg); + break; case 'h': usage(stdout); exit(0); @@ -124,7 +130,7 @@ int main(int argc, char **argv) } logind_init(); - drm_init_dev(card, output, modename, false, -1); + drm_init_dev(card, output, modename, false, lease_fd); drm_setup_egl(); if (printinfo) diff --git a/meson.build b/meson.build index 37b4764..29e6e6a 100644 --- a/meson.build +++ b/meson.build @@ -37,7 +37,9 @@ fbtest_srcs = [ 'fbtest.c', 'fbtools.c', 'logind.c', 'ttytools.c', 'render.c', 'image.c' ] prime_srcs = [ 'prime.c', 'logind.c' ] viotest_srcs = [ 'virtiotest.c', 'drmtools.c', 'logind.c', 'ttytools.c', 'render.c' ] -egltest_srcs = [ 'egltest.c', 'drmtools.c', 'drmtools-egl.c', 'logind.c', 'ttytools.c' ] +egltest_srcs = [ 'egltest.c', 'drmtools.c', 'drmtools-egl.c', + 'drm-lease.c', 'drm-lease-x11.c', + 'logind.c', 'ttytools.c' ] gtktest_srcs = [ 'gtktest.c', 'render.c', 'image.c' ] drminfo_deps = [ libdrm_dep, cairo_dep, pixman_dep, systemd_dep, @@ -51,6 +53,7 @@ prime_deps = [ libdrm_dep, gbm_dep, systemd_dep ] viotest_deps = [ libdrm_dep, gbm_dep, epoxy_dep, cairo_dep, pixman_dep, jpeg_dep, systemd_dep ] egltest_deps = [ libdrm_dep, gbm_dep, epoxy_dep, + xcb_dep, randr_dep, cairo_dep, pixman_dep, systemd_dep ] gtktest_deps = [ gtk3_dep, cairo_dep, pixman_dep, jpeg_dep ] |