vb2_discard_done(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– vb2_discard_done(9) πŸ’–

okay bestie, welcome to the vb2_discard_done(9) page in the Kernel API Manual β€” we’re doing kernel videobuf2 lore today, and it’s lowkey iconic. This page is short, but the warning is highkey important.

🌸 NAME 🌸

vb2_discard_done β€” discard all buffers marked as DONE.

✨ SYNOPSIS ✨

void vb2_discard_done (struct vb2_queue *q );

🫢 ARGUMENTS 🫢

  • q β€” pointer to struct vb2_queue with videobuf2 queue.

πŸ’… DESCRIPTION πŸ’…

This function is intended to be used with suspend/resume operations. It discards all 'done' buffers as they would be too old to be requested after resume.

⚠️ Bestie, read this twice: Drivers must stop the hardware and synchronize with interrupt handlers and/or delayed works before calling this function to make sure no buffer will be touched by the driver and/or hardware.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./include/media/videobuf2-core.h β€” and here’s the whole squad, no skips:


that’s the whole page, bestie 🫢 β€” source/version ./include/media, date October 2026, page vb2_discard_done(9). mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from