STRUCT DRM_OBJECT_PROPERTIES(9)
π struct drm_object_properties(9) π
okay so bestie, welcome to the Kernel API Manual β this one's all about struct drm_object_properties, and it's genuinely not as scary as it looks, i promise π«Ά
β¨ NAME β¨
struct drm_object_properties β property tracking for &drm_mode_object π
πΈ SYNOPSIS πΈ
struct drm_object_properties {
int count;
struct drm_property *properties[DRM_OBJECT_MAX_PROPERTY];
uint64_t values[DRM_OBJECT_MAX_PROPERTY];
};
like, that's the whole vibe. three members. iconique. β¨
π¦ Members π¦
countβ the number of valid properties you've got going on. it must be less than or equal toDRM_OBJECT_MAX_PROPERTY. no cap, that's a hard limit πpropertiesβ an array of pointers todrm_property.
β οΈ NOTE: if we ever start dynamically destroying properties (ie. not at drm_mode_config_cleanup time), then we'd have to do a better job of detaching property from mode objects to avoid dangling property pointers. like, dangling pointers are not the move, bestie π
valuesβ the array that stores the property values, matchingproperties. and listen β do not read/writevaluesdirectly, okay? usedrm_object_property_get_valueanddrm_object_property_set_valueinstead. that's the whole point π
so here's the tea on atomic drivers ββ¨
atomic drivers do not store mutable properties in this array β they only keep the decoded values in the corresponding state structure. the decoding happens via these hooks:
drm_crtc.atomic_get_propertyanddrm_crtc.atomic_set_propertyβ the hooks forstruct drm_crtcdrm_plane_funcs.atomic_get_propertyanddrm_plane_funcs.atomic_set_propertyβ the hooks forstruct drm_planedrm_connector_funcs.atomic_get_propertyanddrm_connector_funcs.atomic_set_propertyβ the hooks forstruct drm_connector
which means (and this is the important part, so pay attention π₯): atomic drivers should not use drm_object_property_set_value and drm_object_property_get_value on mutable objects β i.e. those without the DRM_MODE_PROP_IMMUTABLE flag set. lowkey a big deal, don't skip it π
and one more thing bestie π β for atomic drivers, the default value of properties is stored in this array, so you can use drm_object_property_get_default_value to retrieve it. slay.
π SEE ALSO π
- Kernel file
./include/drm/drm_mode_object.h struct drm_mode_object(9)
mwah, that's the whole page π this came from ./include/drm, October 2026 edition β go forth and track those properties, bestie, you got this π§ββοΈβ
π¦ 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