__drm_gem_du..._plane_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

Hiii bestie, welcome to the <pink>Kernel API Manual</pink> page for __drm_gem_duplicate_shadow_plane_state β€” the function whose whole entire job is <purple>duplicating shadow-buffered plane state</purple>. Yes that's the whole name. Yes it's a mouthful. We stan anyway. πŸŽ€


✨ SYNOPSIS ✨

void __drm_gem_duplicate_shadow_plane_state (struct drm_plane *plane ,
       struct drm_shadow_plane_state *new_shadow_plane_state );

Like... look at her. <cyan>void</cyan>, two args, no notes. Iconic behavior honestly. 🫢


🌸 ARGUMENTS 🌸

  • plane β€” the plane. That's it. That's the description. She's the <hotpink>main character</hotpink> of this call, literally the thing being duplicated from. πŸ’…
  • new_shadow_plane_state β€” the new shadow-buffered plane state, i.e. the <mint>fresh copy</mint> that's about to be all filled in. Destination vibes only. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so, real talk: this function <green>duplicates shadow-buffered plane state</green>. Full stop, that's the assignment, and she ate. πŸ“

Who is this for, you ask? It's <yellow>helpful for drivers that subclass struct drm_shadow_plane_state</yellow> β€” so if your driver is doing the subclass thing, this is your girl. iykyk. πŸ‘‘

Now here's the part you <red>cannot</red> skip, bestie, pay attention:

This function <bold>does not</bold> duplicate existing mappings of the shadow buffers. Not a single one. Zero. Nada. πŸ™ˆ

So where do the mappings actually get maintained? During the <purple>atomic commit</purple>, babes β€” handled by the plane's prepare_fb and cleanup_fb helpers. If you want the corresponding helper lore, go look at drm_gem_prepare_shadow_fb and drm_gem_cleanup_shadow_fb. Those two are carrying the team fr fr. πŸ’€


πŸ”₯ SEE ALSO πŸ”₯

Lowkey the whole squad shows up here, so let me introduce everyone:

Not a single one left behind. We don't do that here. πŸ’–


Okay that's the whole page, bestie! This lil' beauty lives in the <bold>./drivers/gpu/drm</bold> corner of the kernel and it was stamped October 2026 β€” so mark your calendar and go duplicate some plane state responsibly. Mwah! πŸ’‹βœ¨πŸŽ€

πŸ“¦ where this page comes from