drm_atomic_h...ge_iter_next(9)
π 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 π
- Kernel file
./drivers/gpu/drm/drm_damage_helper.cβ the source, the main character β drm_atomic_helper_check_plane_damage(9)drm_atomic_helper_dirtyfb(9)drm_atomic_helper_damage_iter_init(9)drm_atomic_helper_damage_merged(9)
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
- 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