drm_atomic_normalize_zpos(9)
π drm_atomic_normalize_zpos(9) π
okay so bestie, welcome to the Kernel API Manual β this page is literally drm_atomic_normalize_zpos, and it's the one that sorts out your z-order situation. no cap, it's lowkey iconic. let's get into it β¨
πΈ NAME πΈ
drm_atomic_normalize_zpos β calculate normalized zpos values for all crtcs π
π¦ SYNOPSIS π¦
int drm_atomic_normalize_zpos (struct drm_device *dev , struct
drm_atomic_commit *state );
π ARGUMENTS π
devβ the DRM device, your main character π«Άstateβ the atomic state of the DRM device, the vibe check in question π
π DESCRIPTION π
This function calculates the normalized zpos value for all modified planes in the provided atomic state of the DRM device. literally its whole job. slay. π
For every CRTC, this function checks the new states of all planes assigned to it and calculates the normalized zpos value for those planes. here's how the ranking works, pay attention:
- Planes are compared first by their
zposvalues. - Then by plane id (only if
zposis equal β tiebreaker energy β¨). - The plane with the lowest
zposvalue is at the bottom. yes, lowest = bottom, that's just how it is π§
Then drm_plane_state.normalized_zpos is filled with unique values from 0 to number of active planes in crtc minus one. so like, 0, 1, 2, ... n-1. clean, unique, no duplicates, no drama. π
β RETURNS β
Zero for success, or -errno. that's it, that's the return. π
π₯ SEE ALSO π₯
- Kernel file
./drivers/gpu/drm/drm_blend.cβ theoverview(9)bestie drm_plane_create_alpha_property(9)drm_plane_create_rotation_property(9)drm_rotation_simplify(9)drm_plane_create_zpos_property(9)drm_plane_create_zpos_immutable_property(9)drm_plane_create_blend_mode_property(9)drm_crtc_attach_background_color_property(9)
go read all of them fr fr, they're the squad π«Άπ
and that's the page!! mwah π this one lives over in ./drivers/gpu/drm and it's stamped October 2026 β so like, future-dated slay. bookmark it, screenshot it, send it to your group chat. periodt. πβ¨π
π¦ 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