aboutsummaryrefslogtreecommitdiffstats
path: root/egltest.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2019-06-14 10:47:15 +0200
committerGerd Hoffmann <kraxel@redhat.com>2019-06-14 10:48:41 +0200
commitf3d1f2a5ae4c59d606de17d28391a2f96b00f9e9 (patch)
treee729549aca9ed57e5678c7840e3f260b3249281c /egltest.c
parent1d2c935a4f8160aa00d5a26deb073ce2c87aeb48 (diff)
downloaddrminfo-f3d1f2a5ae4c59d606de17d28391a2f96b00f9e9.tar.gz
drm lease support for egltest
Diffstat (limited to 'egltest.c')
-rw-r--r--egltest.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/egltest.c b/egltest.c
index 08c43f4..ad5cbb2 100644
--- a/egltest.c
+++ b/egltest.c
@@ -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)