summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarius vlad <marius.vlad@collabora.com>2023-04-03 19:44:56 +0300
committerPekka Paalanen <pq@iki.fi>2023-04-04 08:13:58 +0000
commit70004a7edc0cdd7b7dd7e16d71fcf72f72bc751c (patch)
tree5bb0c3f5a9fa57211ae5291d426567df195b404b
parent9b1b95ca76686309a1ef6e3626185296e9e9ea10 (diff)
downloadweston-70004a7edc0cdd7b7dd7e16d71fcf72f72bc751c.tar.gz
libweston: Set default power state at output initialization
Rather than setting the initial power state when adding it (using weston_compositor_add_output), do that at the initilization stage. Reason being that the compositor can set up the output from the start as FORCED_OFF, before enabling the output, rather than enabling the output and then turning off the power of the output. Signed-off-by: marius vlad <marius.vlad@collabora.com>
-rw-r--r--libweston/compositor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libweston/compositor.c b/libweston/compositor.c
index f3ab043c..39d829dd 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -6559,7 +6559,6 @@ weston_compositor_add_output(struct weston_compositor *compositor,
wl_list_remove(&output->link);
wl_list_insert(compositor->output_list.prev, &output->link);
output->enabled = true;
- output->power_state = WESTON_OUTPUT_POWER_NORMAL;
wl_list_for_each(head, &output->head_list, output_link)
weston_head_add_global(head);
@@ -7076,6 +7075,7 @@ weston_output_init(struct weston_output *output,
output->eotf_mode = WESTON_EOTF_MODE_SDR;
output->desired_protection = WESTON_HDCP_DISABLE;
output->allow_protection = true;
+ output->power_state = WESTON_OUTPUT_POWER_NORMAL;
wl_list_init(&output->head_list);