drm_atomic_normalize_zpos(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 zpos values.
  • Then by plane id (only if zpos is equal β€” tiebreaker energy ✨).
  • The plane with the lowest zpos value 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 πŸ”₯

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