diff --git a/compositor/main.c b/compositor/main.c index 1a8bf115..65da9dbc 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -676,7 +676,8 @@ usage(int error_code) " --tty=TTY\t\tThe tty to use\n" " --drm-device=CARD\tThe DRM device to use, e.g. \"card0\".\n" " --use-pixman\t\tUse the pixman (CPU) renderer\n" - " --current-mode\tPrefer current KMS mode over EDID preferred mode\n\n"); + " --current-mode\tPrefer current KMS mode over EDID preferred mode\n" + " --continue-without-input\tAllow the compositor to start without input devices\n\n"); #endif #if defined(BUILD_FBDEV_COMPOSITOR) @@ -2523,6 +2524,7 @@ load_drm_backend(struct weston_compositor *c, { WESTON_OPTION_STRING, "drm-device", 0, &config.specific_device }, { WESTON_OPTION_BOOLEAN, "current-mode", 0, &wet->drm_use_current_mode }, { WESTON_OPTION_BOOLEAN, "use-pixman", 0, &config.use_pixman }, + { WESTON_OPTION_BOOLEAN, "continue-without-input", 0, &config.continue_without_input }, }; parse_options(options, ARRAY_LENGTH(options), argc, argv); diff --git a/include/libweston/backend-drm.h b/include/libweston/backend-drm.h index f6647e28..350eeb0d 100644 --- a/include/libweston/backend-drm.h +++ b/include/libweston/backend-drm.h @@ -223,6 +223,9 @@ struct weston_drm_backend_config { /** Use shadow buffer if using Pixman-renderer. */ bool use_pixman_shadow; + + /** Allow compositor to start without input devices. */ + bool continue_without_input; }; #ifdef __cplusplus diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c index 2aea82f5..ca0f3a86 100644 --- a/libweston/backend-drm/drm.c +++ b/libweston/backend-drm/drm.c @@ -2831,6 +2831,7 @@ drm_backend_create(struct weston_compositor *compositor, NULL, NULL, NULL); compositor->backend = &b->base; + compositor->require_input = !config->continue_without_input; if (parse_gbm_format(config->gbm_format, DRM_FORMAT_XRGB8888, &b->gbm_format) < 0) goto err_compositor; diff --git a/man/weston-drm.man b/man/weston-drm.man index 28cdf3d1..01a336e1 100644 --- a/man/weston-drm.man +++ b/man/weston-drm.man @@ -205,6 +205,9 @@ instead of the seat defined in the environment variable Launch Weston on tty .I x instead of using the current tty. +.TP +.B \-\-continue\-without\-input +Allow Weston to start without input devices. Used for testing purposes. . .\" *************************************************************** .SH ENVIRONMENT