drm_mode_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drm_mode_create(9) β€” like, the Kernel API Manual page, bestie πŸ’–

okay so welcome to the drm_mode_create(9) glow-up ✨ this is straight out of the Kernel API Manual and it's literally your cheat sheet for making a brand-new display mode. no cap, it's short, it's sweet, and it slays πŸŽ€


🌸 NAME 🌸

drm_mode_create β€” create a new display mode πŸ–₯️✨


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_display_mode * drm_mode_create (struct drm_device *dev );

πŸ’… ARGUMENTS πŸ’…

  • dev β€” the DRM device, aka the whole reason we're here 🫢

🌈 DESCRIPTION 🌈

okay so here's the vibe: this function creates a new, cleared drm_display_mode using kzalloc, allocates an ID for it, and hands it right back to you 🎁✨

that's it. that's the whole function. iconic behaviour, honestly πŸ‘‘


⭐ RETURN ⭐

  • Pointer to the new mode on success πŸ’–
  • NULL on error 😭

🧚 SEE ALSO 🧚

Kernel file ./drivers/gpu/drm/drm_modes.c β€” go read the source, iykyk πŸ“–

and like, the whole friend group of mode-related functions, fr fr:


and that's the whole page, bestie 🫢 this one lives over in ./drivers/gpu/drm and it's dated October 2026 β€” the Kernel API Manual said so, so it's canon πŸ’œ mwah, go create some modes πŸ’…βœ¨

πŸ“¦ where this page comes from