drm_atomic_h...ge_iter_init(9)
π 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 clippeddrm_plane_state.src, so if your driver is calling this helper, it should have calleddrm_atomic_helper_check_plane_stateearlier. no shortcuts, the order matters fr fr π
π SEE ALSO π
- Kernel file
./drivers/gpu/drm/drm_damage_helper.c drm_atomic_helper_check_plane_damage(9)drm_atomic_helper_dirtyfb(9)drm_atomic_helper_damage_iter_next(9)drm_atomic_helper_damage_merged(9)
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
- 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