backend-drm: Fix ignoring config 'require-input' option

Without this patch, the DRM-backend would rewrite the 'require-input',
core section option given by the user.

This removes 'continue_without_input' DRM-backend option and takes into
consideration the cmd line option only if that was passed (Pekka Paalanen).

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
dev
Marius Vlad 4 years ago
parent e630d2d0d0
commit a86b590fea
  1. 5
      compositor/main.c
  2. 5
      include/libweston/backend-drm.h
  3. 1
      libweston/backend-drm/drm.c

@ -2514,6 +2514,7 @@ load_drm_backend(struct weston_compositor *c,
struct weston_drm_backend_config config = {{ 0, }};
struct weston_config_section *section;
struct wet_compositor *wet = to_wet_compositor(c);
bool without_input = false;
int ret = 0;
wet->drm_use_current_mode = false;
@ -2528,7 +2529,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 },
{ WESTON_OPTION_BOOLEAN, "continue-without-input", false, &without_input }
};
parse_options(options, ARRAY_LENGTH(options), argc, argv);
@ -2541,6 +2542,8 @@ load_drm_backend(struct weston_compositor *c,
&config.pageflip_timeout, 0);
weston_config_section_get_bool(section, "pixman-shadow",
&config.use_pixman_shadow, true);
if (without_input)
c->require_input = !without_input;
config.base.struct_version = WESTON_DRM_BACKEND_CONFIG_VERSION;
config.base.struct_size = sizeof(struct weston_drm_backend_config);

@ -35,7 +35,7 @@
extern "C" {
#endif
#define WESTON_DRM_BACKEND_CONFIG_VERSION 3
#define WESTON_DRM_BACKEND_CONFIG_VERSION 4
struct libinput_device;
@ -223,9 +223,6 @@ 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

@ -3025,7 +3025,6 @@ 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;

Loading…
Cancel
Save