compositor-drm: Add planes-only mode to state proposal
authorDaniel Stone <daniels@collabora.com>
Tue, 10 Jul 2018 17:19:37 +0000 (18:19 +0100)
committerDaniel Stone <daniels@collabora.com>
Wed, 11 Jul 2018 12:08:57 +0000 (13:08 +0100)
commitd12e51646aae32a689af5785d0f81f58c8fa901c
tree9c36139238ce31f299f9c2df0e868b87f597db4c
parentca6fbe3c93ff05bf006e19ac8e60f896a169b5a1
compositor-drm: Add planes-only mode to state proposal

Add a new mode, which attempts to construct a scene exclusively using
planes. This is a building block for incrementally testing and
constructing state: in the plane-only mode, we test the state exactly
once, when we have constructed a full set of planes and want to know if
it works or not.

When using the renderer, we need to incrementally test views one by one
to see if they will work on planes, falling back to the renderer if not.
This test is different, since the scanout plane will be occupied by the
renderer's buffer. Testing using the renderer or client buffers may have
completely different characteristics, so we need two passes: first,
constructing a state with only planes and testing if that succeeds,
falling back later to a mixed renderer/plane mode which tests
incrementally.

This implements the first mode, and preferentially attempts to use it.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
libweston/compositor-drm.c