summaryrefslogtreecommitdiff
path: root/libweston
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-04-03 14:42:51 +0300
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-10-04 16:18:06 +0300
commita0bfedc1cf01e6ed60e303e33efe977f9a70b4d8 (patch)
treef2641f57c45c639630129ce3f0df772ec71cf817 /libweston
parent6f1866b3fa40e2bce00881e288c884352244d07d (diff)
compositor-drm: set all properties in create_output_for_connector
Move the remaining scattered setup of the fixed properties into create_output_for_connector(). All these are already known and they cannot change. This helps future refactoring. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Ian Ray <ian.ray@ge.com> Acked-by Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'libweston')
-rw-r--r--libweston/compositor-drm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index f8525532..a2e6db49 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -3122,9 +3122,6 @@ drm_output_set_mode(struct weston_output *base,
output->base.native_mode = output->base.current_mode;
output->base.native_scale = output->base.current_scale;
- output->base.mm_width = output->connector->mmWidth;
- output->base.mm_height = output->connector->mmHeight;
-
return 0;
}
@@ -3188,12 +3185,6 @@ drm_output_enable(struct weston_output *base)
output->base.gamma_size = output->original_crtc->gamma_size;
output->base.set_gamma = drm_output_set_gamma;
- output->base.subpixel = drm_subpixel_to_wayland(output->connector->subpixel);
-
- if (output->connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
- output->connector->connector_type == DRM_MODE_CONNECTOR_eDP)
- output->base.connection_internal = true;
-
weston_plane_init(&output->cursor_plane, b->compositor,
INT32_MIN, INT32_MIN);
weston_plane_init(&output->scanout_plane, b->compositor, 0, 0);
@@ -3393,6 +3384,15 @@ create_output_for_connector(struct drm_backend *b,
output->base.make = (char *)make;
output->base.model = (char *)model;
output->base.serial_number = (char *)serial_number;
+ output->base.subpixel = drm_subpixel_to_wayland(output->connector->subpixel);
+
+ if (output->connector->connector_type == DRM_MODE_CONNECTOR_LVDS ||
+ output->connector->connector_type == DRM_MODE_CONNECTOR_eDP)
+ output->base.connection_internal = true;
+
+ output->base.mm_width = output->connector->mmWidth;
+ output->base.mm_height = output->connector->mmHeight;
+
drmModeFreeObjectProperties(props);
for (i = 0; i < output->connector->count_modes; i++) {