From 2f460b513f0f0a7592edfce07e2034fe61d9f1bc Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Wed, 25 Mar 2026 09:52:25 -0500 Subject: [PATCH] drm: Change the renderer skip logic There's only one mode where we can skip the renderer, let's base the check on that instead of checking for an existing scanout fb. Signed-off-by: Derek Foreman --- libweston/backend-drm/drm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c index fbe894056..b9a73a1a2 100644 --- a/libweston/backend-drm/drm.c +++ b/libweston/backend-drm/drm.c @@ -559,11 +559,8 @@ drm_output_render(struct drm_output_state *state) pixman_box32_t *rects; int n_rects; - /* If we already have a client buffer promoted to scanout, then we don't - * want to render. */ scanout_state = drm_output_state_get_plane(state, scanout_plane); - if (scanout_state->fb) - return; + weston_assert_ptr_null(c, scanout_state->fb); pixman_region32_init(&damage); @@ -985,6 +982,10 @@ drm_output_repaint(struct weston_output *output_base) if (device->atomic_modeset) drm_output_pick_writeback_capture_task(output); + /* Skip the renderer if our mode allows it */ + if (state->mode == DRM_OUTPUT_PROPOSE_STATE_PLANES_ONLY) + return 0; + drm_output_render(state); scanout_state = drm_output_state_get_plane(state, output->scanout_handle->plane);