From 4f2cc67fde713d7363ebc30192c8cd4ac0bc34c4 Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Mon, 18 Nov 2024 13:03:49 -0600 Subject: [PATCH] compositor: Prevent startup crash when hdcp mode is set on display We can startup with the display already in type1 content protection mode. When this happens, we call weston_output_dirty_paint_nodes() on a display that hasn't yet been enabled. The paint node list isn't initialized yet, so we crash. We don't actually need to touch the paint nodes here anyway, as weston_output_damage() ensures a repaint if the ourput is enabled, and weston_output_dirty_paint_nodes() just forces calculation of things unrelated to protection, and we'll override most of that in maybe_replace_paint_node() if necessary when we get there. Just drop the weston_output_dirty_paint_nodes() call to stop the crash. Signed-off-by: Derek Foreman --- libweston/compositor.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libweston/compositor.c b/libweston/compositor.c index 3d0d06a1a..8c63f0a2a 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -6649,7 +6649,6 @@ weston_output_compute_protection(struct weston_output *output) if (output->current_protection != op_protection) { output->current_protection = op_protection; - weston_output_dirty_paint_nodes(output); weston_output_damage(output); weston_schedule_surface_protection_update(wc); }