[PATCH v18 2/4] compositor-drm: Use sprites_are_broken for scanout plane

Daniel Stone daniels at collabora.com
Tue Jul 10 13:56:16 UTC 2018

When the sprites_are_broken variable is set, do not attempt to promote
client surfaces to the scanout plane.

We are currently assuming that every client buffer will be compatible
with the scanout plane, but that is not the case, particularly with more
exotic tiled/compressed buffers. Once we promote the client buffer to
scanout, there is no going back: if the repaint fails, we do not mark
this as failed and go back to repaint through composition.

This removes the ability for scanout bypass when using the non-atomic
path, however future patches lift the restriction when using atomic
modesetting, as we can actually test and ensure that the view is
compatible with scanout.

Signed-off-by: Daniel Stone <daniels at collabora.com>
Reported-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
 libweston/compositor-drm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
index 2305f708f..4a48e2d02 100644
--- a/libweston/compositor-drm.c
+++ b/libweston/compositor-drm.c
@@ -3342,6 +3342,9 @@ drm_output_propose_state(struct weston_output *output_base,
 		if (next_plane == NULL && !drm_view_is_opaque(ev))
 			next_plane = primary;
+		if (next_plane == NULL && !planes_ok)
+			next_plane = primary;
 		if (next_plane == NULL)
 			next_plane = drm_output_prepare_scanout_view(state, ev);

More information about the wayland-devel mailing list