-
- Downloads
backend-drm: Use plane's zpos_min to check for underlay ability
Previously, whether a KMS plane is underlay-able is determined by
whether it's zpos_max is < the primary plane's zpos_min. In other words,
a plane will only be considered underlay-able if its entire valid zpos
range is under the primary plane's lowest zpos.
This is too restrictive - it's possible for planes to have a valid zpos
range that spans below and above the primary's zpos range.
Therefore, allow planes to be used as underlays if their zpos_min is <
the primary plane's zpos_min.
In addition, force rendering on a view if it contains alpha, and is
occluded by a rendered view. If such a view is overlaid, it would render
with incorrect zorder. If it's underlaid, it would render with incorrect
alpha-blending due to hole-punching. Therefore, it must be rendered.
Force rendering prevents the view from going into
`drm_output_find_plane_for_view()`, which serves as an optimization, but
is also observed to prevent dmabuf feedback (derived from
`try_view_on_plane_failure_reasons`) from ping-ponging between two
values, causing some apps (like weston-simple-egl) to constantly
reallocate its buffers.
Because a plane can now - if supported - be used as an underlay, an
overlay, or both, add a `enum drm_plane_subtype` to differentiate
between them. Then, print it's subtype and underlay/overlay assignment
once a decision is made.
v2:
* Squash w/ patch to force rendering on alpha view occluded by rendered
view
* Bring back plane subtype enum to be more expressive about plane
capabilities
* Correct need_hole != false when a view's assignment changes from
underlay to overlay
Signed-off-by:
Leo Li <sunpeng.li@amd.com>
Loading
Please register or sign in to comment