Skip to content

Cursor plane binding

Andrew Wolfers requested to merge cursor-plane-5 into main

Cursor plane binding

This change adds logic to bind planes with DRM_PLANE_TYPE_CURSOR to the DrmPipeline when they are present on the device. Prior to this change, cursor planes were always ignored. After this change, cursor planes are available to be matched with compatible layers and then used for presentation.

Cursor planes are more restrictive compared to primary and overlay planes, and layer matching behavior is updated accordingly. In order to be considered valid for presentation on a cursor plane, a candidate layer must have the HWC2::Composition::Cursor type, and its buffer must be a square of size 64, 128, or 256 only, due to requirements of the i915 driver. Failing to match with a cursor plane, a Cursor-typed layer may fallback to other planes, which is consistent with prior behavior.

This change implements cursor plane presentation via atomic commits. The legacy cursor drm API remains unimplemented. During an atomic commit, the frame size and clip rect need to be updated to match that of the buffer, due to requirements of the i915 driver.

Bug: b/352069234, b/378461707

Edited by Andrew Wolfers

Merge request reports

Loading