A DRM plane is a hardware memory object that holds a framebuffer and feeds pixel data to a CRTC for display. Every CRTC has at least one primary plane representing the main display surface. Additional overlay and cursor planes may be available for hardware compositing and pointer rendering, respectively. Planes carry the list of pixel formats they can accept (as DRM FourCC codes) and a bitmask indicating which CRTCs they can be attached to. In the atomic modesetting model, almost all configuration — framebuffer, position, scaling, format — is expressed as property values on the plane object. Planes are enumerated withDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Smithay/drm-rs/llms.txt
Use this file to discover all available pages before exploring further.
Device::plane_handles() and inspected with Device::get_plane().
By default, DRM only exposes primary planes. To see overlay and cursor planes you must enable
ClientCapability::UniversalPlanes before enumerating planes.plane::Handle
An opaque, copy-cheap handle to a plane resource. Internally a NonZeroU32 wrapped with repr(transparent). Implements ResourceHandle with FFI_TYPE = DRM_MODE_OBJECT_PLANE.
plane::Info
Returned by Device::get_plane(). Describes the current state and capabilities of a plane.
| Method | Return type | Description |
|---|---|---|
handle() | Handle | The plane’s own handle |
crtc() | Option<crtc::Handle> | The CRTC this plane is currently attached to, or None if unused |
framebuffer() | Option<framebuffer::Handle> | The framebuffer currently set on this plane, or None |
possible_crtcs() | CrtcListFilter | Bitmask of compatible CRTCs; use with ResourceHandles::filter_crtcs |
formats() | &[u32] | Raw FourCC codes for pixel formats this plane accepts |
Info also implements Display, formatting as "Plane <id>".
formats() returns raw u32 values. Convert them with drm_fourcc::DrmFourcc::try_from(code) to obtain typed format identifiers.PlaneType
The functional role of a plane. Determined at runtime by reading the "type" KMS property on the plane object, not from plane::Info directly.
| Variant | Value | Description |
|---|---|---|
Primary | DRM_PLANE_TYPE_PRIMARY | The main content plane; every CRTC has exactly one. Attaching a framebuffer to a CRTC in the legacy API implicitly uses this plane. |
Overlay | DRM_PLANE_TYPE_OVERLAY | Additional compositing layers above the primary plane, composited in hardware. Useful for video overlays and layered UI. |
Cursor | DRM_PLANE_TYPE_CURSOR | Hardware cursor plane with a hotspot. Typically limited to small sizes (64×64 pixels) and specific formats. |
Listing All Planes
Plane Properties (Atomic Modesetting)
When using atomic modesetting, planes are configured entirely through properties. The most important standard plane properties are:| Property name | Type | Description |
|---|---|---|
FB_ID | Object (Framebuffer) | The framebuffer to display |
CRTC_ID | Object (CRTC) | The CRTC to attach to |
SRC_X, SRC_Y, SRC_W, SRC_H | UnsignedRange | Source crop in Q16.16 fixed-point (pixels × 65536) |
CRTC_X, CRTC_Y, CRTC_W, CRTC_H | SignedRange / UnsignedRange | Destination rectangle on the CRTC in pixels |
type | Enum | Primary, Overlay, or Cursor (read-only) |
rotation | Bitmask | Hardware rotation/reflection flags |
zpos | UnsignedRange | Z-order within the CRTC’s plane stack |
IN_FORMATS | Blob | Supported format/modifier combinations |