STRUCT DRM_COLOROP(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct drm_colorop(9) β€” the Kernel API Manual glow-up

okay bestie, welcome to the struct drm_colorop page from the Kernel API Manual ✨ this is the DRM color operation control structure, and honestly? she's iconic. let's get into it πŸŽ€


✨ NAME ✨

struct drm_colorop β€” the DRM color operation control structure πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_colorop {
    struct drm_device *dev;
    struct list_head head;
    unsigned int index;
    struct drm_mode_object base;
    struct drm_plane *plane;
    struct drm_colorop_state *state;
    struct drm_object_properties properties;
    enum drm_colorop_type type;
    struct drm_colorop *next;
    struct drm_property *type_property;
    struct drm_property *bypass_property;
    uint32_t size;
    struct drm_property *lut1d_interpolation_property;
    struct drm_property *curve_1d_type_property;
    struct drm_property *multiplier_property;
    struct drm_property *size_property;
    struct drm_property *lut3d_interpolation_property;
    struct drm_property *data_property;
    struct drm_property *next_property;
    const struct drm_colorop_funcs *funcs;
 };

like, look at all those fields. main character struct energy fr fr πŸ‘‘


🌸 MEMBERS 🌸

  • dev β€” the parent DRM device. her origin story πŸ’«
  • head β€” the list of all colorops on dev, linked from drm_mode_config.colorop_list. this one is invariant over the lifetime of dev, so it does not need locking. no cap, she's stable 🫢
  • index β€” position inside the mode_config.list, and you can literally use it as an array index. also invariant over the lifetime of the colorop. lowkey convenient πŸ’…
  • base β€” the base mode object. foundational.
  • plane β€” the plane on which the colorop sits. a drm_colorop is always unique to a plane β€” no sharing, she's committed πŸ’œ
  • state β€” current atomic state for this colorop.
⚠️ careful bestie: this is protected by mutex. also note that nonblocking atomic commits access the current colorop state without taking locks 😭 so yeah, know that going in.
  • properties β€” property tracking for this colorop. bookkeeping queen πŸŽ€
  • type β€” read-only. the Type of color operation.
  • next β€” read-only. pointer to the next drm_colorop in the pipeline. the chain continues πŸ”₯
  • type_property β€” read-only "TYPE" property for specifying the type of this color operation. the type is enum drm_colorop_type.
  • bypass_property β€” boolean property to control enablement of the color operation. only present if the DRM_COLOROP_FLAG_ALLOW_BYPASS flag is set. when it is present, setting bypass to "true" shall always be supported, so compositors can quickly fall back to alternate methods of color processing. why does this matter? because setting color operations can fail due to unique HW constraints πŸ™ˆ it's giving safety net.
  • size β€” number of entries of the custom LUT. this should be read-only.
  • lut1d_interpolation_property β€” property for DRM_COLOROP_1D_LUT interpolation ✨
  • curve_1d_type_property β€” sub-type for the DRM_COLOROP_1D_CURVE type.
  • multiplier_property β€” multiplier property for plane gain.
  • size_property β€” size property for custom LUT from userspace.
  • lut3d_interpolation_property β€” property for DRM_COLOROP_3D_LUT interpolation 🌈
  • data_property β€” blob property for any TYPE that requires a blob of data, such as 1DLUT, CTM, 3DLUT, etc.

The way this blob is interpreted depends on the TYPE of this

  • next_property β€” read-only property to next colorop in the pipeline.
  • funcs β€” colorop control functions. the mechanics behind the magic 🧚

πŸ‘‘ DESCRIPTION πŸ‘‘

A colorop represents one color operation. they can be chained together via the 'next' pointer to build a color pipeline ⭐

and since colorops cannot stand-alone and are used to describe colorop operations on a plane, they don't have their own locking mechanism β€” instead they're locked and programmed along with their associated drm_plane. periodt. πŸ’€


πŸ’– SEE ALSO πŸ’–

go read those next, iykyk πŸ¦‹


and that's the whole page bestie!! this one lives over in ./include/drm, from the Kernel API Manual, dated October 2026 β€” mwah, sending you the biggest kudos, slay your color pipeline journey πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from