[PATCH weston 2/2] compositor-drm: remove connector option
Ucan, Emre (ADITG/SW1)
eucan at de.adit-jv.com
Wed Mar 8 15:43:18 UTC 2017
Remove the option, because it is hard to use.
Drm connector ids are hard to reach for users,
and they can change when kernel or device tree
is modified.
If someone wants to enable just one output and
disable all others, he can set "require-output-config".
Then, all unconfigured outputs will be disabled
automatically.
Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
---
compositor/main.c | 2 --
libweston/compositor-drm.c | 12 +-----------
libweston/compositor-drm.h | 6 ------
man/weston-drm.man | 5 -----
4 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/compositor/main.c b/compositor/main.c
index 92f8741..e41e3b2 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -562,7 +562,6 @@ usage(int error_code)
#if defined(BUILD_DRM_COMPOSITOR)
fprintf(stderr,
"Options for drm-backend.so:\n\n"
- " --connector=ID\tBring up only this connector\n"
" --seat=SEAT\t\tThe seat that weston should run on\n"
" --tty=TTY\t\tThe tty to use\n"
" --use-pixman\t\tUse the pixman (CPU) renderer\n"
@@ -1223,7 +1222,6 @@ load_drm_backend(struct weston_compositor *c,
wet->drm_use_current_mode = false;
const struct weston_option options[] = {
- { WESTON_OPTION_INTEGER, "connector", 0, &config.connector },
{ WESTON_OPTION_STRING, "seat", 0, &config.seat_id },
{ WESTON_OPTION_INTEGER, "tty", 0, &config.tty },
{ WESTON_OPTION_BOOLEAN, "current-mode", 0, &wet->drm_use_current_mode },
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 0062307..5be7007 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -118,7 +118,6 @@ struct drm_backend {
int32_t cursor_width;
int32_t cursor_height;
- uint32_t connector;
uint32_t pageflip_timeout;
};
@@ -2795,9 +2794,7 @@ create_outputs(struct drm_backend *b, struct udev_device *drm_device)
if (connector == NULL)
continue;
- if (connector->connection == DRM_MODE_CONNECTED &&
- (b->connector == 0 ||
- connector->connector_id == b->connector)) {
+ if (connector->connection == DRM_MODE_CONNECTED) {
if (create_output_for_connector(b, resources,
connector, drm_device) < 0)
continue;
@@ -2849,11 +2846,6 @@ update_outputs(struct drm_backend *b, struct udev_device *drm_device)
continue;
}
- if (b->connector && (b->connector != connector_id)) {
- drmModeFreeConnector(connector);
- continue;
- }
-
connected[i] = connector_id;
if (drm_output_find_by_connector(b, connector_id)) {
@@ -3437,8 +3429,6 @@ drm_backend_create(struct weston_compositor *compositor,
goto err_sprite;
}
- b->connector = config->connector;
-
if (create_outputs(b, drm_device) < 0) {
weston_log("failed to create output for %s\n", b->drm.filename);
goto err_udev_input;
diff --git a/libweston/compositor-drm.h b/libweston/compositor-drm.h
index 0870719..6f37735 100644
--- a/libweston/compositor-drm.h
+++ b/libweston/compositor-drm.h
@@ -98,12 +98,6 @@ weston_drm_output_get_api(struct weston_compositor *compositor)
struct weston_drm_backend_config {
struct weston_backend_config base;
- /** The connector id of the output to be initialized.
- *
- * A value of 0 will enable all available outputs.
- */
- int connector;
-
/** The tty to be used. Set to 0 to use the current tty. */
int tty;
diff --git a/man/weston-drm.man b/man/weston-drm.man
index 35d62ae..d7fd561 100644
--- a/man/weston-drm.man
+++ b/man/weston-drm.man
@@ -87,11 +87,6 @@ When the DRM backend is loaded,
.B weston
will understand the following additional command line options.
.TP
-\fB\-\-connector\fR=\fIconnectorid\fR
-Use the connector with id number
-.I connectorid
-as the only initial output.
-.TP
.B \-\-current\-mode
By default, use the current video mode of all outputs, instead of
switching to the monitor preferred mode.
--
1.7.9.5
More information about the wayland-devel
mailing list