backend-drm: Construct a zpos candidate list of planes
authorMarius Vlad <marius.vlad@collabora.com>
Mon, 14 Oct 2019 08:05:30 +0000 (11:05 +0300)
committerDaniel Stone <daniels@collabora.com>
Mon, 11 Nov 2019 16:51:48 +0000 (16:51 +0000)
commit2538aaccc7bef6d6f790731aa4697071eb00e23a
treefcd4221f245be9ee8e068b0debd3845854c1d102
parent47e3d1e4812b383908128e7dab08bff7f80328d5
backend-drm: Construct a zpos candidate list of planes

In order to better optimize view assignment to HW planes, we construct
an intermediary zpos candidate list which is used aggregate all suitable
planes for handling scan-out capable client buffers.

We go over it twice: once to construct it and once to pick-and-choose a
suitable plane based its highest zpos position.

In order to maintain the view order correctly we track current zpos
value being applied to the plane state and use it when trying to place
a view into a plane.

Pass the computed zpos value to be applied to the plane state.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Suggested-by: Daniel Stone <daniel.stone@collabora.com>
libweston/backend-drm/drm-internal.h
libweston/backend-drm/state-helpers.c
libweston/backend-drm/state-propose.c