drm_mode_object_find(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 🌈

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