drm_mode_object_unregister(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_mode_object_unregister (9) β€” Kernel API Manual, bestie edition πŸŽ€

okay so this is a page from the Kernel API Manual, section 9, all about drm_mode_object_unregister πŸ’–


✨ NAME ✨

drm_mode_object_unregister β€” free a modeset identifier πŸ¦‹


🌸 SYNOPSIS 🌸

void drm_mode_object_unregister (struct drm_device *dev , struct
       drm_mode_object *object );

like, that's the whole signature. two args, no return, very demure ✨


🧚 ARGUMENTS 🧚

  • dev β€” the DRM device πŸ‘‘
  • object β€” the object to free 🫢

πŸ’€ DESCRIPTION πŸ’€

so what it does is it frees the id from dev's unique identifier pool πŸŽ€ literally just yeets that id back out of the pool, iconic behavior.

and here's the slay part: this function can be called multiple times, and it guards against multiple removals πŸ™ˆ so you can't double-nuke it, she protects herself.

⚠️ but okay listen, important: these modeset identifiers are _not_ reference counted. like, at all. so don't use this for reference counted modeset objects like framebuffers 😭 that's a whole different vibe, iykyk.

πŸ”₯ SEE ALSO πŸ”₯

kernel file ./drivers/gpu/drm/drm_mode_object.c plus the whole friend group πŸ’…:


and that's the page!! πŸ“ this one lives in ./drivers/gpu/drm, it's dated October 2026, and it's from the Kernel API Manual, section 9. mwah, go free those identifiers responsibly bestie πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from