drivers/media/test-drivers/vim2m.c
Source file repositories/reference/linux-study-clean/drivers/media/test-drivers/vim2m.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/test-drivers/vim2m.c- Extension
.c- Size
- 39257 bytes
- Lines
- 1616
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/delay.hlinux/fs.hlinux/sched.hlinux/slab.hlinux/platform_device.hmedia/v4l2-mem2mem.hmedia/v4l2-device.hmedia/v4l2-ioctl.hmedia/v4l2-ctrls.hmedia/v4l2-event.hmedia/videobuf2-vmalloc.hmedia/v4l2-common.h
Detected Declarations
struct vim2m_fmtstruct vim2m_q_datastruct vim2m_devstruct vim2m_ctxfunction vim2m_dev_releasefunction get_alignmentfunction copy_linefunction copy_two_pixelsfunction device_processfunction job_readyfunction job_abortfunction device_runfunction device_workfunction vidioc_querycapfunction enum_fmtfunction vidioc_enum_fmt_vid_capfunction vidioc_enum_fmt_vid_outfunction vidioc_enum_framesizesfunction vidioc_g_fmtfunction vidioc_g_fmt_mplanefunction vidioc_g_fmt_vid_outfunction vidioc_g_fmt_vid_capfunction vidioc_g_fmt_vid_out_mplanefunction vidioc_g_fmt_vid_cap_mplanefunction vidioc_try_fmtfunction vidioc_try_fmt_vid_capfunction vidioc_try_fmt_vid_cap_mplanefunction vidioc_try_fmt_vid_outfunction vidioc_try_fmt_vid_out_mplanefunction vidioc_s_fmtfunction vidioc_s_fmt_vid_capfunction vidioc_s_fmt_vid_cap_mplanefunction vidioc_s_fmt_vid_outfunction vidioc_s_fmt_vid_out_mplanefunction vim2m_s_ctrlfunction vim2m_queue_setupfunction vim2m_buf_out_validatefunction vim2m_buf_preparefunction vim2m_buf_queuefunction vim2m_start_streamingfunction vim2m_stop_streamingfunction vim2m_buf_request_completefunction queue_initfunction vim2m_openfunction vim2m_releasefunction vim2m_device_releasefunction vim2m_probefunction vim2m_remove
Annotated Snippet
module_init(vim2m_init);
module_exit(vim2m_exit);
Annotation
- Immediate include surface: `linux/module.h`, `linux/delay.h`, `linux/fs.h`, `linux/sched.h`, `linux/slab.h`, `linux/platform_device.h`, `media/v4l2-mem2mem.h`, `media/v4l2-device.h`.
- Detected declarations: `struct vim2m_fmt`, `struct vim2m_q_data`, `struct vim2m_dev`, `struct vim2m_ctx`, `function vim2m_dev_release`, `function get_alignment`, `function copy_line`, `function copy_two_pixels`, `function device_process`, `function job_ready`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.