STRUCT DRM_PLANE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’œ 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 on dev, linked from drm_mode_config.plane_list. bestie this one is invariant over the lifetime of dev so 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 the drm_crtc.mutex of 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 from drm_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 by format_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 by modifier_count. (yes, it says modifier_count pointing at modifier_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 be NULL, and atomic drivers should instead check drm_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 be NULL, and atomic drivers should instead check drm_plane_state.fb.
  • old_fb β€” temporary tracking of the old fb while a modeset is ongoing. only used by non-atomic drivers, forced to be NULL for 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, see enum drm_plane_type for details.
  • index β€” position inside the mode_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. see drm_plane_create_alpha_property. ✨
  • zpos_property β€” optional zpos property for this plane. see drm_plane_create_zpos_property.
  • rotation_property β€” optional rotation property for this plane. see drm_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. see drm_plane_create_color_properties.
  • color_range_property β€” optional "COLOR_RANGE" enum property for specifying color range for non RGB formats. see drm_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