drm_mode_object_find(9)
π drm_mode_object_find(9) β from the Kernel API Manual, bestie
okay so real talk, this one's a kernel function called drm_mode_object_find and it lives in the Kernel API Manual. it's short, it's sweet, it's giving "small function, big responsibility." let's get into it β¨
πΈ NAME πΈ
drm_mode_object_find β look up a drm object with static lifetime π«Ά
β¨ SYNOPSIS β¨
struct drm_mode_object * drm_mode_object_find (struct drm_device *dev ,
struct drm_file *file_priv , uint32_t id , uint32_t type );
literally the whole signature. four args, one pointer back. no cap π
π― ARGUMENTS π―
devβ the drm device. the main character, honestly πfile_privβ the drm file. yes, that file. the one you're holding ποΈidβ id of the mode object. think of it like the object's little name tag π·οΈtypeβ type of the mode object. gotta know what kind of creature you're looking for π¦
π DESCRIPTION π
so what does this actually do? it looks up a modeset object. that's the vibe check β
but here's the part you cannot skip: for reference counted objects, it will acquire a reference. and that reference? you must drop it again by calling drm_mode_object_put. periodt. π
β οΈ no fr fr, don't just wander off with that reference. if you took it, you put it back. leaking references is not the aesthetic π₯
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_mode_object.c drm_mode_object_add(9)drm_mode_object_unregister(9)drm_mode_object_lease_required(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)
go read the whole friend group, they're all icons honestly πΈπ§
okay and that's the page!! found at ./drivers/gpu/drm, dated October 2026, and it's drm_mode_object_find(9) in case you forgot already π mwah, go drop that reference bestie ππ
π¦ 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