drm_atomic_h...ge_iter_next(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_atomic_h...ge_iter_next(9)

okay so this page is from the Kernel API Manual bestie, and it's literally all about drm_atomic_helper_damage_iter_next β€” yeah the name is a whole mouthful, i know, the header truncates it too (drm_atomic_h...ge_iter_next(9)), iconic behavior honestly πŸŽ€


✨ NAME ✨

drm_atomic_helper_damage_iter_next β€” advance the damage iterator. that's it, that's the whole job πŸ¦‹


🌸 SYNOPSIS 🌸

bool drm_atomic_helper_damage_iter_next (struct
       drm_atomic_helper_damage_iter *iter , struct drm_rect *rect );

πŸŽ€ ARGUMENTS πŸŽ€

  • iter β€” the iterator you wanna advance. yes, the one you already made. go girl, move it forward πŸ’…
  • rect β€” returns a rectangle in fb coordinate, clipped to plane src. so like, a rect comes back out of this, and it's clipped to plane src, no cap ✨

🧚 DESCRIPTION 🧚

okay so here's the lore πŸ‘‘ β€” plane src is in 16.16 fixed point, but damage clips are whole numbers, right? so this iterator has to round off the clips that intersect with plane src. the rounding rules are:

  • round down for x1/y1
  • round up for x2/y2

…and that's for the intersected coordinate, iykyk. similar rounding off happens for the full plane src too, just in case it's returned as damage. and it will skip damage clips that are outside of plane src entirely β€” not invited to the party, bye πŸ’€

🚨 important vibes check: if the first call to iterator next returns false, that literally means there's no need to update the plane. so don't go updating it. periodt.

πŸ”₯ RETURN πŸ”₯

  • true β€” the output is valid, slay πŸ’–
  • false β€” you reached the end, that's a wrap bestie 😭

🌈 SEE ALSO 🌈


and that's the page!! 🫢 brought to you by ./drivers/gpu/drm, dated October 2026 β€” mwah, go read the other helpers, ily, bye πŸ“πŸ’œ

πŸ“¦ where this page comes from