X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=drm-lease-manager%2Fmain.c;h=d5e87881bf5292c6c5f94245352b5e38c8375c3e;hb=901f400634395f3a73648b1515de7f4f4c5a831f;hp=5ac3600480b6fed1dae401b662918928e5a92d51;hpb=e6c3bf4ff76ae5eeefdb149e4b4167195dfcfb61;p=src%2Fdrm-lease-manager.git diff --git a/drm-lease-manager/main.c b/drm-lease-manager/main.c index 5ac3600..d5e8788 100644 --- a/drm-lease-manager/main.c +++ b/drm-lease-manager/main.c @@ -30,24 +30,27 @@ static void usage(const char *progname) { - printf("Usage: %s [OPTIONS] []\n\n" - "Options:\n" - "-h, --help \tPrint this help\n" - "-c, --config \t path to configuration file (default " - "/etc/drm-lease-manager.toml)\n" - "-v, --verbose \tEnable verbose debug messages\n" - "-t, --lease-transfer \tAllow lease transfter to new clients\n" - "-k, --keep-on-crash \tDon't close lease on client crash\n", - progname); + printf( + "Usage: %s [OPTIONS] []\n\n" + "Options:\n" + "-h, --help \tPrint this help\n" + "-c, --config \t path to configuration file (default " + "/etc/drm-lease-manager.toml)\n" + "-v, --verbose \tEnable verbose debug messages\n" + "-t, --lease-transfer \tAllow lease transfter to new clients\n" + "-k, --keep-on-crash \tDon't close lease on client crash\n", + "-u, --enable-universal-plane \tEnable universal plane support\n", + progname); } -const char *opts = "vtkhc:"; +const char *opts = "vtkhcu:"; const struct option options[] = { {"help", no_argument, NULL, 'h'}, {"verbose", no_argument, NULL, 'v'}, {"lease-transfer", no_argument, NULL, 't'}, {"keep-on-crash", no_argument, NULL, 'k'}, {"config", required_argument, NULL, 'c'}, + {"enable-universal-plane", required_argument, NULL, 'u'}, {NULL, 0, NULL, 0}, }; @@ -59,6 +62,7 @@ int main(int argc, char **argv) bool debug_log = false; bool can_transfer_leases = false; bool keep_on_crash = false; + bool universal_plane = false; int c; while ((c = getopt_long(argc, argv, opts, options, NULL)) != -1) { @@ -76,6 +80,9 @@ int main(int argc, char **argv) case 'c': config_file = optarg; break; + case 'u': + universal_plane = true; + break; case 'h': ret = EXIT_SUCCESS; /* fall through */ @@ -93,8 +100,8 @@ int main(int argc, char **argv) struct lease_config *lease_configs = NULL; int num_configs = parse_config(config_file, &lease_configs); - struct lm *lm = - lm_create_with_config(device, num_configs, lease_configs); + struct lm *lm = lm_create_with_config(device, num_configs, + lease_configs, universal_plane); if (!lm) { ERROR_LOG("DRM Lease initialization failed\n");