From 0ecd6c3d3312d9e56122ef02e29a06acb1172fa4 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 7 Dec 2021 17:39:19 +0000 Subject: [PATCH] backend-drm: Move renderer-only vs. scanout_plane test earlier No point trying to put something on the scanout plane in mixed mode. Signed-off-by: Daniel Stone --- libweston/backend-drm/state-propose.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index 39aa9fbc..39220fbd 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -431,11 +431,6 @@ drm_output_try_view_on_plane(struct drm_plane *plane, availability = PLACED_ON_PLANE; break; case WDRM_PLANE_TYPE_PRIMARY: - if (mode != DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY) { - availability = NO_PLANES_ACCEPTED; - goto out; - } - ps = drm_output_prepare_scanout_view(state, ev, mode, fb, zpos); if (ps) @@ -693,7 +688,8 @@ drm_output_prepare_plane_view(struct drm_output_state *state, } if (plane->type == WDRM_PLANE_TYPE_PRIMARY && - plane != output->scanout_plane) { + (plane != output->scanout_plane || + mode != DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY)) { continue; }