drm_mode_addfb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– drm_mode_addfb(9) πŸ’–

okay so real talk, this is a page straight outta the Kernel API Manual and it's about drm_mode_addfb β€” the vibe is very "let me add a framebuffer to your graphics config bestie" ✨


πŸŽ€ NAME πŸŽ€

drm_mode_addfb β€” add an FB to the graphics configuration πŸ’…


⭐ SYNOPSIS ⭐

int drm_mode_addfb (struct drm_device *dev , struct drm_mode_fb_cmd *or
, struct drm_file *file_priv );

like, that's the whole signature, no cap 🫢


🌸 ARGUMENTS 🌸

  • dev β€” the drm device for the ioctl πŸ‘‘
  • or β€” pointer to the request structure (yes it's literally named or, iconic)
  • file_priv β€” the drm file πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

So you wanna add a new FB to the specified CRTC, given a user request? slay, that's literally what this does πŸ’–

Important lore tho: this is the original addfb ioctl, and it only supported RGB formats. that's the whole reason drm_mode_addfb2(9) exists, iykyk 😭

It's called by the user via ioctl, or by an in-kernel client. both valid, both main character energy ✨


πŸ”₯ RETURN πŸ”₯

Zero on success, negative errno on failure. simple as that, fr fr πŸ’€


🌈 SEE ALSO 🌈


okay that's the whole page bestie, go forth and add those framebuffers πŸ§šβ€β™€οΈ

this lil love letter to graphics config lives in ./drivers/gpu/drm, dated October 2026 β€” mwah, bye! πŸ’œπŸŽ€πŸ’…

πŸ“¦ where this page comes from