plane_test: Add support for specifying plane type

Currently, the* tests fail on most
devices. This is because plane_test tries to assign every plane as
type OVERLAY [1]. The code here compares each plane's type property
with desired_value which is always set to the enum value of OVERLAY.
In PlatformOverlays.24bpp_nv12_overlay, for example, the test runs
plane_test with a fullscreen XR24 buffer and a smaller NV12 one and
tries to assign both to OVERLAY planes. However, most devices only
support a single overlay plane (in addition to primary and cursor
planes). Thus, plane_test is unable to assign both planes and fails
the test.

This CL fixes this behavior by adding support for specifying plane
type in plane_test. If the type is unspecified, however, we default
to setting the first sequential plane to PRIMARY, and the rest to
OVERLAY. Thus, the tests are fixed because we now try to assign a
fullscreen XR24 PRIMARY plane and a smaller NV12 OVERLAY plane
instead of 2 OVERLAYS- just like in Chrome.


Bug: b:217970618
Change-Id: I0d8a0046d1dd064ad26a0d580562bc2254fc05f7
Reviewed-by: Andrew Wolfers <>
Reviewed-by: Miguel Casas <>
Tested-by: Brian Ho <>
Reviewed-by: Miguel Casas-Sanchez <>
Commit-Queue: Brian Ho <>
1 file changed