From 26c2f9a65f1fe984ed6d8c187375a6513527caa4 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 7 Dec 2021 17:30:39 +0000 Subject: [PATCH] backend-drm: Don't try cursor buffers for client planes For better or worse, cursor planes can only be used by uploaded SHM buffers right now, so ignore them when we're calculating the acceptable plane mask for client dmabufs. Signed-off-by: Daniel Stone --- libweston/backend-drm/fb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libweston/backend-drm/fb.c b/libweston/backend-drm/fb.c index ffe2cc52..8630ebad 100644 --- a/libweston/backend-drm/fb.c +++ b/libweston/backend-drm/fb.c @@ -581,6 +581,9 @@ drm_fb_get_from_view(struct drm_output_state *state, struct weston_view *ev, /* Check if this buffer can ever go on any planes. If it can't, we have * no reason to ever have a drm_fb, so we fail it here. */ wl_list_for_each(plane, &b->plane_list, link) { + /* only SHM buffers can go into cursor planes */ + if (plane->type == WDRM_PLANE_TYPE_CURSOR) + continue; if (drm_fb_compatible_with_plane(fb, plane)) fb->plane_mask |= (1 << plane->plane_idx); }