From d5ec9a1a1d1e295803cb45135c8f3a5adbe278cc Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 7 Dec 2021 16:20:29 +0000 Subject: [PATCH] backend-drm: Don't try to steal other-output special planes Each output is hardcoded to the use of a single 'special' (primary or cursor) plane; make sure we don't try to steal them from other outputs which might not be happy to discover that we've taken it off them. Signed-off-by: Daniel Stone --- libweston/backend-drm/state-propose.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index df495020e..65b230f0d 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -697,6 +697,16 @@ drm_output_prepare_plane_view(struct drm_output_state *state, /* assemble a list with possible candidates */ wl_list_for_each(plane, &b->plane_list, link) { + if (plane->type == WDRM_PLANE_TYPE_CURSOR && + plane != output->cursor_plane) { + continue; + } + + if (plane->type == WDRM_PLANE_TYPE_PRIMARY && + plane != output->scanout_plane) { + continue; + } + if (!drm_plane_is_available(plane, output)) continue;