drm_atomic_h...ge_iter_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_atomic_h...ge_iter_init(9) β€” Kernel API Manual ✨

okay so this is a page from the Kernel API Manual, bestie, and it's all about drm_atomic_h...ge_iter_init(9) β€” yes the name is a whole mouthful, we're coping 🫢


🌸 NAME 🌸

drm_atomic_helper_damage_iter_init β€” literally just initializes the damage iterator, that's the whole gig πŸ’«


✨ SYNOPSIS ✨

void drm_atomic_helper_damage_iter_init (struct
       drm_atomic_helper_damage_iter *iter , const struct drm_plane_state
       *old_state , const struct drm_plane_state *state );

πŸŽ€ ARGUMENTS πŸŽ€

  • iter β€” the iterator you're initializing, hand it over and let it cook 🍳
  • old_state β€” the old plane state, used for validation. it's giving "receipts from last time" energy 🧾
  • state β€” the plane state you're iterating the damage clips from, main character of the operation πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

So you initialize an iterator, and what it does is clip plane damage drm_plane_state.fb_damage_clips to plane drm_plane_state.src. periodt, that's the job πŸ’…

Now here's the tea: this iterator returns the full plane src in case damage is not present β€” because either user-space didn't send it, or the driver discarded it (meaning the driver wants to do a full plane update). slay, full refresh it is ✨

Currently this iterator also returns full plane src in case the plane src changed β€” but lowkey that can be changed in future to return damage instead. so don't get too attached to that behavior πŸ‘€

For the case when the plane is not visible, or the plane update should not happen β€” the first call to iter_next will return false. not me, not today, no update for you πŸ™ˆ

⚠️ heads up bestie: this helper uses the clipped drm_plane_state.src, so if your driver is calling this helper, it should have called drm_atomic_helper_check_plane_state earlier. no shortcuts, the order matters fr fr πŸ’€

πŸ’œ SEE ALSO πŸ’œ

go read those too, iykyk πŸ“šπŸ”₯


and that's the page!! πŸŽ‰ from ./drivers/gpu/drm, dated October 2026 β€” mwah, iconic, no cap πŸ’–πŸ§šβ€β™€οΈπŸŒ·

πŸ“¦ where this page comes from