e2e80136334f fixed the same issue as df573031d0ba in a different way. The latter commit (applied earlier in the upstream tree) adds a variable to assign_planes to keep track of when we successfully assign a view to the scanout plane, and doesn't call prepare_scanout_view if we have.
The former commit adds this checking inside prepare_scanout_view: if the pending output state already has a framebuffer assigned to the scanout plane, we drop out of prepare_scanout_view early. The picked_scanout variable inside assign_planes can thus be removed. Signed-off-by: Daniel Stone <dani...@collabora.com> Tested-by: Emre Ucan <eu...@de.adit-jv.com> --- libweston/compositor-drm.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c index c6b82ac44..cfd7d268f 100644 --- a/libweston/compositor-drm.c +++ b/libweston/compositor-drm.c @@ -3053,7 +3053,6 @@ drm_assign_planes(struct weston_output *output_base, void *repaint_data) struct weston_view *ev; pixman_region32_t surface_overlap, renderer_region; struct weston_plane *primary, *next_plane; - bool picked_scanout = false; assert(!output->state_last); state = drm_output_state_duplicate(output->state_cur, @@ -3101,19 +3100,13 @@ drm_assign_planes(struct weston_output *output_base, void *repaint_data) &ev->transform.boundingbox); next_plane = NULL; - if (pixman_region32_not_empty(&surface_overlap) || picked_scanout) + if (pixman_region32_not_empty(&surface_overlap)) next_plane = primary; if (next_plane == NULL) next_plane = drm_output_prepare_cursor_view(state, ev); - /* If a higher-stacked view already got assigned to scanout, it's incorrect to - * assign a subsequent (lower-stacked) view to scanout. - */ - if (next_plane == NULL) { + if (next_plane == NULL) next_plane = drm_output_prepare_scanout_view(state, ev); - if (next_plane) - picked_scanout = true; - } if (next_plane == NULL) next_plane = drm_output_prepare_overlay_view(state, ev); -- 2.17.1 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel