drm_mode_addfb2(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_mode_addfb2 πŸ’…

okay so bestie, welcome to the drm_mode_addfb2(9) page β€” yeah it's section 9 of the Kernel API Manual, the kernel-internals girlies' home turf. sit down, hydrate, and let's get into it 🫢


✨ NAME ✨

drm_mode_addfb2 β€” add an FB to the graphics configuration πŸ”₯

πŸ¦‹ SYNOPSIS πŸ¦‹

int drm_mode_addfb2 (struct drm_device *dev , void *data , struct
drm_file *file_priv );

that's it. that's the whole signature. she's giving minimal, she's giving efficient, we love her for it πŸ‘‘

πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the drm device for the ioctl. your main character device, literally ✨
  • data β€” data pointer for the ioctl. just the pointer, the payload, the vessel πŸ’«
  • file_priv β€” drm file for the ioctl call. your file, your vibe, your private little handle 🌸

🌈 DESCRIPTION 🌈

Add a new FB to the specified CRTC, given a user request with format. yes bestie, an FB β€” a framebuffer β€” and she's getting added to the CRTC you asked for, based on the format you requested πŸ–ΌοΈβœ¨

and here's the tea: this is the 2nd version of the addfb ioctl. v2! the glow-up! πŸ™ˆ she supports multi-planar framebuffers (plural planes, so fancy) and she uses fourcc codes</> as pixel format specifiers. fourcc! iconic format-specifier behavior, no cap πŸ’…

Called by the user via ioctl. fr fr, that's the entry point β€” userland knocks, ioctl answers πŸšͺ✨

⭐ RETURN ⭐

Zero on success, negative errno on failure. so: 0 = slay, negative errno = not slay 😭 that's the whole vibe check

πŸ‘‘ SEE ALSO πŸ‘‘


real talk bestie: ioctl paths are kernel territory, so if something returns a negative errno, that's your signal to actually read it β€” no guessing, no vibes-only debugging πŸ™

okay that's the page!! sourced straight from the kernel tree at ./drivers/gpu/drm πŸ’– and dated October 2026 β€” so this manual page is literally from the future, she's ahead of her time, main character energy periodt πŸ‘‘βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from