STRUCT DRM_MODE_OBJECT(9)
β¨ struct drm_mode_object(9) β¨
okay so this is from the Kernel API Manual and it's literally the blueprint for modeset objects β like the main-character base struct everyone else inherits the vibe from π
π NAME π
struct drm_mode_object β the base structure for modeset objects, no cap π«Ά
πΈ SYNOPSIS πΈ
struct drm_mode_object {
uint32_t id;
uint32_t type;
struct drm_object_properties *properties;
struct kref refcount;
void (*free_cb)(struct kref *kref);
};
π¦ Members π¦
idβ the userspace visible identifier, aka the name tag everyone in userspace gets to see πtypeβ what kind of object this is, and it's gotta be one of theDRM_MODE_OBJECT_values βpropertiesβ the properties attached to this object, including their values. the whole package, bestie πrefcountβ the reference count, for objects that have a dynamic lifetime π₯free_cbβ the free function callback, and heads up: this one's only set for objects with a dynamic lifetime π
π Description π
So this is the base structure for modeset objects that are visible to userspace. You can look objects up using drm_mode_object_find. Besides the basic uapi interface properties like id and type, it provides two services:
- It tracks attached properties and their values. This is what
drm_crtc,drm_planeanddrm_connectoruse. Properties get attached by callingdrm_object_attach_propertybefore the object is visible to userspace β timing matters, periodt β°β¨ - For objects with dynamic lifetimes (as indicated by a non-
NULLfree_cb) it provides reference counting throughdrm_mode_object_getanddrm_mode_object_put. This is used bydrm_framebuffer,drm_connectoranddrm_property_blob. Those objects go ahead and provide specialized reference counting wrappers, because of course they do π
π SEE ALSO π
- Kernel file
./include/drm/drm_mode_object.hstructdrm_object_properties(9)
and that's the whole page, bestie π tysm for reading β it lives in ./include/drm and the version stamp says October 2026, so mark your calendar π§π
π¦ 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