drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/renesas/rzv2h-ivc/rzv2h-ivc-video.c- Extension
.c- Size
- 13973 bytes
- Lines
- 552
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
rzv2h-ivc.hlinux/bitfield.hlinux/cleanup.hlinux/iopoll.hlinux/lockdep.hlinux/media-bus-format.hlinux/minmax.hlinux/mutex.hlinux/pm_runtime.hmedia/mipi-csi2.hmedia/v4l2-ctrls.hmedia/v4l2-dev.hmedia/v4l2-event.hmedia/v4l2-fh.hmedia/v4l2-ioctl.hmedia/videobuf2-dma-contig.h
Detected Declarations
struct rzv2h_ivc_buffunction rzv2h_ivc_buffer_donefunction scoped_guardfunction rzv2h_ivc_transfer_bufferfunction rzv2h_ivc_queue_setupfunction rzv2h_ivc_buf_queuefunction scoped_guardfunction scoped_guardfunction rzv2h_ivc_format_configurefunction rzv2h_ivc_return_buffersfunction list_for_each_entry_safefunction rzv2h_ivc_start_streamingfunction scoped_guardfunction rzv2h_ivc_stop_streamingfunction rzv2h_ivc_buffer_donefunction rzv2h_ivc_format_from_pixelformatfunction rzv2h_ivc_enum_fmt_vid_outfunction rzv2h_ivc_g_fmt_vid_outfunction rzv2h_ivc_try_fmtfunction rzv2h_ivc_set_formatfunction rzv2h_ivc_s_fmt_vid_outfunction rzv2h_ivc_try_fmt_vid_outfunction rzv2h_ivc_querycapfunction rzv2h_ivc_init_vdevfunction rzv2h_deinit_video_dev_and_queue
Annotated Snippet
struct rzv2h_ivc_buf {
struct vb2_v4l2_buffer vb;
struct list_head queue;
dma_addr_t addr;
};
#define to_rzv2h_ivc_buf(vbuf) \
container_of(vbuf, struct rzv2h_ivc_buf, vb)
static const struct rzv2h_ivc_format rzv2h_ivc_formats[] = {
{
.fourcc = V4L2_PIX_FMT_SBGGR8,
.mbus_codes = {
MEDIA_BUS_FMT_SBGGR8_1X8,
},
.dtype = MIPI_CSI2_DT_RAW8,
},
{
.fourcc = V4L2_PIX_FMT_SGBRG8,
.mbus_codes = {
MEDIA_BUS_FMT_SGBRG8_1X8,
},
.dtype = MIPI_CSI2_DT_RAW8,
},
{
.fourcc = V4L2_PIX_FMT_SGRBG8,
.mbus_codes = {
MEDIA_BUS_FMT_SGRBG8_1X8,
},
.dtype = MIPI_CSI2_DT_RAW8,
},
{
.fourcc = V4L2_PIX_FMT_SRGGB8,
.mbus_codes = {
MEDIA_BUS_FMT_SRGGB8_1X8,
},
.dtype = MIPI_CSI2_DT_RAW8,
},
{
.fourcc = V4L2_PIX_FMT_RAW_CRU10,
.mbus_codes = {
MEDIA_BUS_FMT_SBGGR10_1X10,
MEDIA_BUS_FMT_SGBRG10_1X10,
MEDIA_BUS_FMT_SGRBG10_1X10,
MEDIA_BUS_FMT_SRGGB10_1X10
},
.dtype = MIPI_CSI2_DT_RAW10,
},
{
.fourcc = V4L2_PIX_FMT_RAW_CRU12,
.mbus_codes = {
MEDIA_BUS_FMT_SBGGR12_1X12,
MEDIA_BUS_FMT_SGBRG12_1X12,
MEDIA_BUS_FMT_SGRBG12_1X12,
MEDIA_BUS_FMT_SRGGB12_1X12
},
.dtype = MIPI_CSI2_DT_RAW12,
},
{
.fourcc = V4L2_PIX_FMT_RAW_CRU14,
.mbus_codes = {
MEDIA_BUS_FMT_SBGGR14_1X14,
MEDIA_BUS_FMT_SGBRG14_1X14,
MEDIA_BUS_FMT_SGRBG14_1X14,
MEDIA_BUS_FMT_SRGGB14_1X14
},
.dtype = MIPI_CSI2_DT_RAW14,
},
{
.fourcc = V4L2_PIX_FMT_SBGGR16,
.mbus_codes = {
MEDIA_BUS_FMT_SBGGR16_1X16,
},
.dtype = MIPI_CSI2_DT_RAW16,
},
{
.fourcc = V4L2_PIX_FMT_SGBRG16,
.mbus_codes = {
MEDIA_BUS_FMT_SGBRG16_1X16,
},
.dtype = MIPI_CSI2_DT_RAW16,
},
{
.fourcc = V4L2_PIX_FMT_SGRBG16,
.mbus_codes = {
MEDIA_BUS_FMT_SGRBG16_1X16,
},
.dtype = MIPI_CSI2_DT_RAW16,
},
{
Annotation
- Immediate include surface: `rzv2h-ivc.h`, `linux/bitfield.h`, `linux/cleanup.h`, `linux/iopoll.h`, `linux/lockdep.h`, `linux/media-bus-format.h`, `linux/minmax.h`, `linux/mutex.h`.
- Detected declarations: `struct rzv2h_ivc_buf`, `function rzv2h_ivc_buffer_done`, `function scoped_guard`, `function rzv2h_ivc_transfer_buffer`, `function rzv2h_ivc_queue_setup`, `function rzv2h_ivc_buf_queue`, `function scoped_guard`, `function scoped_guard`, `function rzv2h_ivc_format_configure`, `function rzv2h_ivc_return_buffers`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.