From ae60745b6102c9c877feb06074e3c5c9c7a90f5f Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 7 Dec 2021 17:37:45 +0000 Subject: [PATCH] backend-drm: Move cursors_are_broken test earlier No point trying to place a cursor buffer on a plane when we can't do cursor planes. Signed-off-by: Daniel Stone --- libweston/backend-drm/state-propose.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index e816b5c2..39aa9fbc 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -406,11 +406,6 @@ drm_output_try_view_on_plane(struct drm_plane *plane, switch (plane->type) { case WDRM_PLANE_TYPE_CURSOR: - if (b->cursors_are_broken) { - availability = NO_PLANES_ACCEPTED; - goto out; - } - ps = drm_output_prepare_cursor_view(state, ev, zpos); if (ps) availability = PLACED_ON_PLANE; @@ -646,7 +641,7 @@ drm_output_prepare_plane_view(struct drm_output_state *state, buffer = ev->surface->buffer_ref.buffer; shmbuf = wl_shm_buffer_get(buffer->resource); if (shmbuf) { - if (!output->cursor_plane) + if (!output->cursor_plane || b->cursors_are_broken) return NULL; if (wl_shm_buffer_get_format(shmbuf) != WL_SHM_FORMAT_ARGB8888) {