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 <derek.foreman@collabora.com>
This commit is contained in:
Derek Foreman 2024-11-18 13:03:49 -06:00 committed by Marius Vlad
parent b4386289d6
commit 4f2cc67fde

View file

@ -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);
}