ENUM DRM_PLANE_TYPE(9)
π¦ enum drm_plane_type(9) β the plane type glow-up guide β¨
okay bestie, so this is a page from the Kernel API Manual and honestly? it's giving "DRM internals but make it understandable." it's all about enum drm_plane_type, which is literally the uapi plane type enumeration. let's get into it π
πΈ NAME πΈ
enum drm_plane_type β the uapi plane type enumeration, no cap π«Ά
β SYNOPSIS β
enum drm_plane_type {
DRM_PLANE_TYPE_OVERLAY ,
DRM_PLANE_TYPE_PRIMARY ,
DRM_PLANE_TYPE_CURSOR
};
like, that's the whole enum. three constants, zero drama. slay.
π Constants π
DRM_PLANE_TYPE_OVERLAYβ these are literally every plane that isn't a primary and isn't a cursor. that's it, that's the vibe. some drivers call these "sprites" internally, iykyk.DRM_PLANE_TYPE_PRIMARYβ a primary plane attached to a CRTC. this one is the most likely to be able to light up the CRTC when there's no scaling or cropping happening and the plane covers the whole CRTC. main character energy fr π₯°DRM_PLANE_TYPE_CURSORβ a cursor plane attached to a CRTC, and it's more likely to be able to be enabled when there's no scaling/cropping and the framebuffer has the size thatdrm_mode_config.cursor_widthanddrm_mode_config.cursor_heightsay. also, ngl, if the driver doesn't support modifiers, the framebuffer should have a linear layout. periodt.
π Description π
so for historical reasons (π) not all planes are made the same. this enumeration exists so you can tell the different plane types apart and implement the different uapi semantics for each one. but like β for userspace that's universal-plane aware and is using that atomic IOCTL, there's literally no difference between these planes, beyond what the driver and the hardware can support, of course. πββοΈ
for compatibility with legacy userspace, only overlay planes are made available to userspace by default. userspace clients may set the DRM_CLIENT_CAP_UNIVERSAL_PLANES client capability bit to indicate that they wish to receive a universal plane list containing all plane types. see also drm_for_each_legacy_plane. π¦
on top of setting each plane's type, drivers need to set up the drm_crtc.primary and, optionally, drm_crtc.cursor pointers for legacy IOCTLs. see drm_crtc_init_with_planes. β¨
β οΈ WARNING: the values of this enum are UABI since they're exposed in the "type" property. so likeβ¦ don't go changing them, bestie. fr fr. π₯
π SEE ALSO π
- Kernel file
./include/drm/drm_plane.h struct drm_plane_state(9)struct drm_plane_funcs(9)struct drm_plane(9)drmm_universal_plane_alloc(9)drm_universal_plane_alloc(9)drm_plane_index(9)drm_plane_mask(9)drm_plane_find(9)drm_for_each_plane_mask(9)drm_for_each_legacy_plane(9)drm_for_each_plane(9)
and that's the whole page, bestie!! π«Ά source lives at ./include/drm, and this iconic lil entry is dated October 2026 β enum drm_plane_type(9), Kernel API Manual. go forth and plane responsibly πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms