drm_mode_object_put(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_mode_object_put β€” the kernel API manual, bestie edition πŸŽ€

Okay so real talk, we're in the drm_mode_object_put(9) page today β€” it lives in the Kernel API Manual, and honestly? It's a little one-trick pony but it eats every time. ✨


✨ NAME ✨

drm_mode_object_put β€” release a mode object reference 🫢


🌸 SYNOPSIS 🌸

void drm_mode_object_put (struct drm_mode_object *obj );

That's it. That's the whole vibe check. One argument, no return value, no drama. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • obj β€” a DRM mode object. Yeah. That's the whole description. The original said "DRM mode object" and honestly the original said it best, so I'm not gonna fumble it. It's the mode object. It's the mode object. πŸŽ€

πŸ”₯ DESCRIPTION πŸ”₯

So here's the tea, bestie β€” this function decrements the object's refcount, but only if it's a refcounted modeset object. That's the main character condition right there. πŸ‘‘

And if it's not one of those? It's a no-op on any other object. Literally nothing happens. Not me calling a function and it just… does nothing. πŸ’€ But that's fine, that's the design, that's iconic behaviour and we respect it.

The whole point of this little cutie is to drop references acquired with drm_mode_object_get. So get grabs one, put gives it back. Balanced. Symmetrical. A true friendship. 🫢✨


⭐ SEE ALSO ⭐

Y'all, the cross-references on this one are stacked. Go get to know the whole family, fr fr:


okay so go call drm_mode_object_get and drm_mode_object_put in matching pairs, that's the whole assignment, iykyk πŸ’–

And that's the page!! 🌈 Shoutout to the source tree ./drivers/gpu/drm and the version date October 2026 β€” that's where this baby comes from, no cap. Slay, stay refcounted, and don't leak. πŸ’œπŸ§šπŸ“

πŸ“¦ where this page comes from