Virtualized (unified) planes handling
Inspired by:
- https://resources.linaro.org/ru/resource/KdJRxQgh8NG3J4ssja9qHe
- https://patchwork.kernel.org/project/dri-devel/patch/20210705012115.4179824-20-dmitry.baryshkov@linaro.org/7
Problem I would like to solve:
SUN4I/DRM DE2.0 and DE3.0 can support up to 16 planes, but expose only 4 as universal planes.
Supporting more than 4 require some constraints to be considered, e.g.:
- No blend support withing group of 4 , therefore can only fit opaque buffers or transparent buffers must not overlap.
- Scaling can be applied to the whole group of 4, but not to the individual layers within group.
By modifying driver to use virtualized planes we can benefit using these planes.
drm_hwcomposer support:
Universal planes exposes their capabilities, allowing userspace to plan the composition with big chance to successfully pass commit test ioctl.
In case using virtualized planes, chance to succeed commit test ioctl depends on ability of the driver to cover all the cases compositor is hoping to present. For the userspace there is much less room for planning.
How can we improve that?
One of the option is to run background daemon and probe different composition combination for those which failed before in a hope to find a best DE/GPU energy ratio.
Commit test ioctl takes some time. Is there any way to pass multiple composition for testing in a single commit call?
During last few years I heard various proposals to solve the probing problem:
- Dummy (bufferless) framebuffers used only for KMS testing.
- eBPF for drm/kms capabilities probing. (https://static.lwn.net/kerneldoc/gpu/vkms.html#atomic-check-using-ebpf)
- Anything else?