drm_for_each_privobj(9)
π drm_for_each_privobj(9) β the private object iterator, bestie π
Okay so this is a page from the Kernel API Manual, and it's literally about drm_for_each_privobj β the private object iterator. It's short, it's sweet, it's giving "small but mighty," and we're gonna get through it together π«Ά
β¨ NAME β¨
drm_for_each_privobj β the private object iterator, periodt π
πΈ SYNOPSIS πΈ
drm_for_each_privobj (privobj , dev );
Yep, that's the whole vibe. Two things go in, and the magic happens. Note the spacing, bestie β copy it exactly, no cap π₯
π ARGUMENTS π
privobjβ this is a pointer to the current private object. And here's the cute part: it gets updated after each iteration π so it's always pointing at whoever's up next. Main character rotation energy, honestly.devβ the DRM device we want to get private objects from. Like, the source of truth. The mothership. The place all the private objects live π
π¦ DESCRIPTION π¦
So what does it actually do? It lets you iterate over all private objects attached to dev π« That's it. That's the whole thing. You loop, you get every private object, you live your life. Iconic behaviour, honestly, ate and left no crumbs π
π SEE ALSO π
Okay this list is LONG and I am obsessed β every single one of these, in order, because we don't skip entries in this house π
First up, the kernel file:
- Kernel file
./include/drm/drm_atomic.h
Then the structs and functions, all in their (9) glory:
struct drm_crtc_commit(9)struct drm_private_state_funcs(9)struct drm_private_obj(9)struct drm_private_state(9)struct drm_atomic_commit(9)drm_crtc_commit_get(9)drm_crtc_commit_put(9)drm_atomic_commit_get(9)drm_atomic_commit_put(9)drm_atomic_get_old_crtc_state(9)drm_atomic_get_new_crtc_state(9)drm_atomic_get_old_plane_state(9)drm_atomic_get_new_plane_state(9)drm_atomic_get_old_connector_state(9)drm_atomic_get_new_connector_state(9)__drm_atomic_get_current_plane_state(9)for_each_oldnew_connector_in_state(9)for_each_old_connector_in_state(9)for_each_new_connector_in_state(9)for_each_oldnew_crtc_in_state(9)for_each_old_crtc_in_state(9)for_each_new_crtc_in_state(9)for_each_oldnew_colorop_in_state(9)for_each_new_colorop_in_state(9)for_each_oldnew_plane_in_state(9)for_each_oldnew_plane_in_state_reverse(9)for_each_new_plane_in_state_reverse(9)for_each_old_plane_in_state(9)for_each_new_plane_in_state(9)for_each_oldnew_private_obj_in_state(9)for_each_old_private_obj_in_state(9)for_each_new_private_obj_in_state(9)drm_atomic_crtc_needs_modeset(9)drm_atomic_crtc_effectively_active(9)struct drm_bus_cfg(9)struct drm_bridge_state(9)
Like, that's a lot of friends and honestly? Respect the friend group π
π little reminder: all of these are printed literally as (9) β don't go dropping the section numbers, that's how the man page finds them, iykyk.
π§ sign-off, bestie π§
This lil page lives in ./include/drm, and it's dated October 2026 β yes, future vibes, we're ahead of the curve β and it's the drm_for_each_privobj(9) page, obviously. Slay, go iterate some private objects, and drink some water πβ¨
π¦ 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