ENUM VB2_MEMORY(9)
π enum vb2_memory(9) β like, the actual kernel API manual, bestie
okay so this is a page from the Kernel API Manual and it's all about enum vb2_memory β literally just the vibe-check of which memory model is being used to make buffers visible on userspace. that's it. that's the whole thing. but it's important so pay attention π
β¨ NAME β¨
enum vb2_memory β the type of memory model used to make the buffers visible on userspace. no cap, that's the job. π¦
πΈ SYNOPSIS πΈ
here's the whole enum, bestie, exactly as it lives in the source:
enum vb2_memory {
VB2_MEMORY_UNKNOWN ,
VB2_MEMORY_MMAP ,
VB2_MEMORY_USERPTR ,
VB2_MEMORY_DMABUF
};
π Constants π
okay so these are the four options. four. that's it. slay π
VB2_MEMORY_UNKNOWNβ buffer status is unknown, or it's just not being used yet on userspace. it's giving "no thoughts, head empty" π«§VB2_MEMORY_MMAPβ the buffers are allocated by the Kernel, and they're memory mapped viammapioctl. and listen β this model is also the one in play when the user is using the buffers viareadorwritesystem calls. so it's a two-for-one situation, iconic β¨VB2_MEMORY_USERPTRβ the buffers were allocated in userspace, and it's memory mapped viammapioctl. (yes, that's what it says. userspace allocation,mmapioctl mapping. periodt π)VB2_MEMORY_DMABUFβ the buffers are passed to userspace via DMA buffer. that's the whole description. short and mysterious, main character energy π₯
π SEE ALSO π
okay this list is long and I respect it immensely. here's every single one, no skipping, we don't do that here π
Kernel file ./include/media/videobuf2-core.h:
struct vb2_mem_ops(9)struct vb2_plane(9)enum vb2_io_modes(9)enum vb2_buffer_state(9)struct vb2_buffer(9)struct vb2_ops(9)struct vb2_buf_ops(9)struct vb2_queue(9)vb2_queue_allows_cache_hints(9)vb2_plane_vaddr(9)vb2_plane_cookie(9)vb2_buffer_done(9)vb2_discard_done(9)vb2_wait_for_all_buffers(9)vb2_core_querybuf(9)vb2_core_reqbufs(9)vb2_core_create_bufs(9)vb2_core_prepare_buf(9)vb2_core_remove_bufs(9)vb2_core_qbuf(9)vb2_core_dqbuf(9)vb2_core_streamon(9)vb2_core_streamoff(9)vb2_core_expbuf(9)vb2_core_queue_init(9)vb2_core_queue_release(9)vb2_queue_error(9)vb2_mmap(9)vb2_get_unmapped_area(9)vb2_core_poll(9)vb2_read(9)vb2_write(9)vb2_thread_fnc(9)vb2_thread_start(9)vb2_thread_stop(9)vb2_is_streaming(9)vb2_fileio_is_active(9)vb2_get_num_buffers(9)vb2_is_busy(9)vb2_get_drv_priv(9)vb2_set_plane_payload(9)vb2_get_plane_payload(9)vb2_plane_size(9)vb2_start_streaming_called(9)vb2_clear_last_buffer_dequeued(9)vb2_get_buffer(9)vb2_buffer_in_use(9)vb2_verify_memory_type(9)vb2_request_object_is_buffer(9)vb2_request_buffer_cnt(9)
like. fifty-ish cross-references. obsessed with the dedication honestly π
ngl bestie, thatVB2_MEMORY_USERPTRentry reads exactly like theVB2_MEMORY_MMAPone aboutmmapioctl β I'm just telling you what the page says, don't come for me π
and that's the whole page!! mwah π it lives at ./include/media, and the version/date on this lil beauty is October 2026 β so yeah, future vibes only. go forth and buffer correctly, bestie π§ββοΈβπ«Ά
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms