drm_atomic_helper_dirtyfb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_atomic_helper_dirtyfb(9) β€” Kernel API Manual πŸŽ€

okay so bestie, we're in the Kernel API Manual today and the star of the show is drm_atomic_helper_dirtyfb. she's a helper. she does dirtyfb. that's the whole vibe. let's get into it ✨


✨ NAME ✨

drm_atomic_helper_dirtyfb β€” literally the helper for dirtyfb. that's it. that's her whole job description and she's slaying it πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

int drm_atomic_helper_dirtyfb (struct drm_framebuffer *fb , struct
       drm_file *file_priv , unsigned int flags , unsigned int color , struct
       drm_clip_rect *clips , unsigned int num_clips );

six arguments, one int coming back at you. iconic signature, no notes 🫢


🌸 ARGUMENTS 🌸

  • fb β€” the DRM framebuffer, aka the main character πŸ’–
  • file_priv β€” the DRM file for the ioctl call. she's the receipts 🧾
  • flags β€” dirty fb annotate flags 🌈
  • color β€” color for the annotate fill 🎨
  • clips β€” the dirty region, spill the tea about which bits changed πŸ“
  • num_clips β€” count of clip in clips. yes, keep track bestie πŸ”’

πŸ”₯ DESCRIPTION πŸ”₯

so this is a helper to implement drm_framebuffer_funcs.dirty using the damage interface during plane update. ngl that's a lot of words, but it means: you hand her the damage info and she handles the dirty-ing for you 😌

here's the important bit β€” if num_clips is 0, then this helper will do a full plane update. and this is the same behaviour expected by the DIRTFB IOCTL, so like, no surprises, fr fr ✨

also note, this helper is a blocking implementation 🚨 that's not a bug, that's the point. this is what current drivers and userspace expect in their DIRTFB IOCTL implementation, as a way to rate-limit userspace and make sure its rendering doesn't get ahead of uploading new data too much. she's literally holding the line so nobody sprints ahead πŸ’€πŸ‘‘

⭐ RETURN ⭐

  • zero on success πŸŽ‰ slay
  • negative errno on failure 😭 it's giving error vibes

πŸ‘‘ SEE ALSO πŸ‘‘

go read those next, they're all in the same friend group 🫢


and that's the whole page bestie!! πŸ’– this absolute queen lives at ./drivers/gpu/drm, dated October 2026, and yes, this is the drm_atomic_helper_dirtyfb(9) manual. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from