STRUCT DRM_COLOROP(9)
π 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 ondev, linked fromdrm_mode_config.colorop_list. this one is invariant over the lifetime ofdev, so it does not need locking. no cap, she's stable π«Άindexβ position inside themode_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. adrm_coloropis 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 nextdrm_coloropin the pipeline. the chain continues π₯type_propertyβ read-only"TYPE"property for specifying the type of this color operation. the type isenum drm_colorop_type.bypass_propertyβ boolean property to control enablement of the color operation. only present if theDRM_COLOROP_FLAG_ALLOW_BYPASSflag 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 forDRM_COLOROP_1D_LUTinterpolation β¨curve_1d_type_propertyβ sub-type for theDRM_COLOROP_1D_CURVEtype.multiplier_propertyβ multiplier property for plane gain.size_propertyβ size property for custom LUT from userspace.lut3d_interpolation_propertyβ property forDRM_COLOROP_3D_LUTinterpolation π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 π
- Kernel file
./include/drm/drm_colorop.henum drm_colorop_curve_1d_type(9),struct drm_colorop_state(9),struct drm_colorop_funcs(9),drm_colorop_find(9),drm_colorop_reset(9),drm_colorop_index(9),drm_get_colorop_type_name(9),drm_get_colorop_curve_1d_type_name(9)
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
- 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