STRUCT DRM_PLANE(9)
π struct drm_plane(9) β the manual, bestie edition π
okay so real talk: this is struct drm_plane(9) from the Kernel API Manual, and it's literally the central DRM plane control structure. it's giving main character energy for your whole display pipeline. let's get into it π«Ά
β¨ NAME β¨
struct drm_plane β the central DRM plane control structure. like, the whole vibe holder for a plane. no cap.
π SYNOPSIS π
struct drm_plane {
struct drm_device *dev;
struct list_head head;
char *name;
struct drm_modeset_lock mutex;
struct drm_mode_object base;
uint32_t possible_crtcs;
uint32_t *format_types;
unsigned int format_count;
bool format_default;
uint64_t *modifiers;
unsigned int modifier_count;
struct drm_crtc *crtc;
struct drm_framebuffer *fb;
struct drm_framebuffer *old_fb;
const struct drm_plane_funcs *funcs;
struct drm_object_properties properties;
enum drm_plane_type type;
unsigned index;
const struct drm_plane_helper_funcs *helper_private;
struct drm_plane_state *state;
struct drm_property *alpha_property;
struct drm_property *zpos_property;
struct drm_property *rotation_property;
struct drm_property *blend_mode_property;
struct drm_property *color_encoding_property;
struct drm_property *color_range_property;
struct drm_property *color_pipeline_property;
struct drm_property *scaling_filter_property;
struct drm_property *hotspot_x_property;
struct drm_property *hotspot_y_property;
struct kmsg_dumper kmsg_panic;
};
look at her. every field a little icon π
πΈ Members πΈ
devβ the DRM device this plane belongs to. her home. πheadβ list of all planes ondev, linked fromdrm_mode_config.plane_list. bestie this one is invariant over the lifetime ofdevso it does not need locking. we love a low-maintenance field fr.nameβ human readable name, and yes the driver can overwrite it. name her whatever, she'll answer to it β¨mutexβ protects modeset plane state, together with thedrm_crtc.mutexof the CRTC this plane is linked to (when active, getting activated or getting disabled).
For atomic drivers specifically this protects state.
baseβ base mode object. the foundation, the blueprint, the structure πpossible_crtcsβ pipes this plane can be bound to, constructed fromdrm_crtc_mask. think of it as her approved list of crushes.format_typesβ array of formats supported by this plane. all her fave formats πformat_countβ size of the array pointed at byformat_types.format_defaultβ the driver hasn't supplied supported formats for the plane. used by the non-atomic driver compatibility wrapper only. classic legacy behavior ngl.modifiersβ array of modifiers supported by this plane.modifier_countβ size of the array pointed at bymodifier_count. (yes, it saysmodifier_countpointing atmodifier_count. not me questioning the manpage, i'm just the messenger π)crtcβ currently bound CRTC, only meaningful for non-atomic drivers. for atomic drivers this is forced to beNULL, and atomic drivers should instead checkdrm_plane_state.crtc. two different apps, pick the right one πfbβ currently bound framebuffer, only meaningful for non-atomic drivers. for atomic drivers this is forced to beNULL, and atomic drivers should instead checkdrm_plane_state.fb.old_fbβ temporary tracking of the old fb while a modeset is ongoing. only used by non-atomic drivers, forced to beNULLfor atomic drivers. he's just visiting, he doesn't live here.funcsβ plane control functions. the whole toolbox π₯propertiesβ property tracking for this plane.typeβ type of plane, seeenum drm_plane_typefor details.indexβ position inside themode_config.list, and you can use it as an array index. it is invariant over the lifetime of the plane. she's literally never moving. iconic behavior πhelper_privateβ mid-layer private data. her business. mind yours π«Άstateβ current atomic state for this plane.
This is protected by mutex. note that nonblocking atomic commits access the current plane state without taking locks. either by going through the struct drm_atomic_commit pointers, see for_each_oldnew_plane_in_state, for_each_old_plane_in_state and for_each_new_plane_in_state. or through careful ordering of atomic commit operations as implemented in the atomic helpers, see struct drm_crtc_commit. careful ordering is the whole assignment, no pressure or anything π
alpha_propertyβ optional alpha property for this plane. seedrm_plane_create_alpha_property. β¨zpos_propertyβ optional zpos property for this plane. seedrm_plane_create_zpos_property.rotation_propertyβ optional rotation property for this plane. seedrm_plane_create_rotation_property.blend_mode_propertyβ optional"pixel blend mode"enum property for this plane. blend mode property represents the alpha blending equation selection, describing how the pixels from the current plane are composited with the background. mixing pixels together is her artistic era π¨color_encoding_propertyβ optional"COLOR_ENCODING"enum property for specifying color encoding for non RGB formats. seedrm_plane_create_color_properties.color_range_propertyβ optional"COLOR_RANGE"enum property for specifying color range for non RGB formats. seedrm_plane_create_color_properties.color_pipeline_propertyβ optional"COLOR_PIPELINE"enum property for specifying a color pipeline to use on the plane. so many color fields, she contains multitudes πscaling_filter_propertyβ property to apply a particular filter while scaling.hotspot_x_propertyβ property to set mouse hotspot x offset. mouse girlie era πhotspot_y_propertyβ property to set mouse hotspot y offset.kmsg_panicβ used to register a panic notifier for this plane. for when things go extremely not okay π
π¦ Description π¦
okay so planes represent the scanout hardware of a display block. they receive their input data from a drm_framebuffer and feed it to a drm_crtc. so like, framebuffer in, crtc out. the middle woman. the connector of worlds π
planes control the color conversion, see Plane Composition Properties for more details, and they're also involved in the color conversion of input pixels β see Color Management Properties for details on that. she does colors on both sides, she's booked and busy.
β SEE ALSO β
kernel file ./include/drm/drm_plane.h, struct drm_plane_state(9), struct drm_plane_funcs(9), enum drm_plane_type(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)
read them all. you'll be so educated. iykyk πβ¨
no technical claims were invented in the making of this page β every flag, field and caveat is straight from the source, only cuter π«Ά
and that's the page bestie! brought to you from ./include/drm, dated October 2026 β go forth and configure your planes, you absolute icon πππ¦
π¦ 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