drm_mode_object_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 πŸŽ€

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