drm_mode_copy(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_mode_copy β€” like, the drm_mode_copy(9) page, bestie ✨

okay so this is straight out of the Kernel API Manual, and it's genuinely one of the shortest little icons in the whole DRM family. no cap, it's a two-line function and she still ate. πŸŽ€


🌸 NAME 🌸

drm_mode_copy β€” copy the mode. that's it. that's the whole vibe. πŸ¦‹


✨ SYNOPSIS ✨

void drm_mode_copy (struct drm_display_mode *dst , const struct
       drm_display_mode *src );

so yeah, she takes two pointers to struct drm_display_mode and returns void. no drama, no return value, she just does the thing. πŸ’œ


🫢 ARGUMENTS 🫢

  • dst β€” the mode you're overwriting. she's the main character getting a whole new look, bestie. makeover time. πŸ’…
  • src β€” the mode you're copying from. the blueprint. the inspo. the source material. πŸ‘‘

🧚 DESCRIPTION 🧚

okay so the actual tea: drm_mode_copy copies an existing mode into another mode. that's the whole job. lowkey iconic in its simplicity. ⭐

but β€” and this is the part you cannot skip, fr fr β€” it does it while preserving the list head of the destination mode. like, the dst mode's list head stays exactly where it is. do not touch. she's anchored. πŸŽ€

so it's not just a blind memcpy of the whole struct β€” the list head of dst is preserved. remember that, iykyk. 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

the source file lives here, in the kernel tree:

  • Kernel file ./drivers/gpu/drm/drm_modes.c

and here's the whole friend group, no one left out πŸ’–:


and that's the whole page, bestie 🌈✨ go forth and copy modes responsibly πŸ’…

this one's brought to you by ./drivers/gpu/drm, dated October 2026 β€” mwah, catch you on the next man page πŸ«ΆπŸ’–
πŸ“¦ where this page comes from