drm_mode_object_add(9)
π drm_mode_object_add(9) π
okay so you're in the Kernel API Manual bestie, and this is the page for drm_mode_object_add β¨ it's giving "let's hand out some IDs" energy and honestly? iconic.
β¨ NAME β¨
drm_mode_object_add β allocate a new modeset identifier π
πΈ SYNOPSIS πΈ
int drm_mode_object_add (struct drm_device *dev , struct drm_mode_object
*obj , uint32_t obj_type );
like literally copy that exactly, don't @ me π
π¦ ARGUMENTS π¦
devβ the DRM device, your main character π«Άobjβ the object pointer, and here's the thing: it's the one used to generate the unique ID πobj_typeβ the object type, iykyk π·οΈ
π DESCRIPTION π
so what it does: it creates a unique identifier based on ptr in dev's identifier space π― no cap. And what's that for? Tracking modes, CRTCs and connectors β the whole little friend group π
β RETURN β
Zero on success π₯³ error code on failure π (that's it, that's the whole vibe check)
π SEE ALSO π
- the kernel file is
./drivers/gpu/drm/drm_mode_object.cπ drm_mode_object_unregister(9)drm_mode_object_lease_required(9)drm_mode_object_find(9)drm_mode_object_put(9)drm_mode_object_get(9)drm_object_attach_property(9)drm_object_property_set_value(9)drm_object_property_get_value(9)drm_object_property_get_default_value(9)drm_object_immutable_property_get_value(9)drm_mode_obj_get_properties_ioctl(9)
like go read all of them, they're lowkey obsessed with each other π§
no warnings on this one bestie, it's a chill page β just remember every one of those references is fr fr real and you should actually look them up π
okay and finally the little sign-off: this page comes to you from ./drivers/gpu/drm and it's dated October 2026 ποΈ slay, go add some mode objects π
β¨
π¦ 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