drm_for_each_plane_mask(9)
β¨ drm_for_each_plane_mask β¨
okay so this is drm_for_each_plane_mask(9) from the Kernel API Manual, and bestie, it's literally the macro that loops over planes for you π
πΈ NAME πΈ
drm_for_each_plane_mask β iterate over planes specified by bitmask
Like, it walks the planes for you. That's the whole vibe. π¦
π SYNOPSIS π
drm_for_each_plane_mask (plane , dev , plane_mask );
π ARGUMENTS π
planeβ the loop cursor π this is the variable that's gonna hold each plane as you go around the loop, so it's very much the main character here.devβ the DRM device π₯οΈ your whole graphics device situation.plane_maskβ bitmask of plane indices ποΈ which planes you actually wanna visit, encoded as a mask.
π DESCRIPTION π
Iterate over all planes specified by bitmask. That's it, that's the whole thing β the mask tells it which planes, and it goes over them one by one. no cap, simple and iconic β¨
π«Ά SEE ALSO π«Ά
Kernel file ./include/drm/drm_plane.h β and also these absolute legends:
struct drm_plane_state(9)struct drm_plane_funcs(9)enum drm_plane_type(9)struct drm_plane(9)drmm_universal_plane_alloc(9)drm_universal_plane_alloc(9)drm_plane_index(9)drm_plane_mask(9)drm_plane_find(9)drm_for_each_legacy_plane(9)drm_for_each_plane(9)
ngl if you're messing with planes you're gonna want these in your tabs already π₯
and that's the page, bestie π coming at you from ./include/drm, dated October 2026, in the Kernel API Manual β slay, go loop some planes π
π¦ 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