drivers/media/pci/intel/ipu3/ipu3-cio2.h
Source file repositories/reference/linux-study-clean/drivers/media/pci/intel/ipu3/ipu3-cio2.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/pci/intel/ipu3/ipu3-cio2.h- Extension
.h- Size
- 16724 bytes
- Lines
- 457
- 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
linux/bits.hlinux/dma-mapping.hlinux/kernel.hlinux/mutex.hlinux/types.hasm/page.hmedia/media-device.hmedia/media-entity.hmedia/v4l2-async.hmedia/v4l2-dev.hmedia/v4l2-device.hmedia/v4l2-subdev.hmedia/videobuf2-core.hmedia/videobuf2-v4l2.h
Detected Declarations
struct cio2_fbpt_entrystruct pci_devstruct cio2_csi2_timingstruct cio2_bufferstruct csi2_bus_infostruct cio2_queuestruct cio2_devicestruct __packedstruct __packed
Annotated Snippet
struct cio2_csi2_timing {
s32 clk_termen;
s32 clk_settle;
s32 dat_termen;
s32 dat_settle;
};
struct cio2_buffer {
struct vb2_v4l2_buffer vbb;
u32 *lop[CIO2_MAX_LOPS];
dma_addr_t lop_bus_addr[CIO2_MAX_LOPS];
unsigned int offset;
};
#define to_cio2_buffer(vb) container_of(vb, struct cio2_buffer, vbb.vb2_buf)
struct csi2_bus_info {
u32 port;
u32 lanes;
};
struct cio2_queue {
/* mutex to be used by vb2_queue */
struct mutex lock;
struct media_pipeline pipe;
struct csi2_bus_info csi2;
struct v4l2_subdev *sensor;
void __iomem *csi_rx_base;
/* Subdev, /dev/v4l-subdevX */
struct v4l2_subdev subdev;
struct media_pad subdev_pads[CIO2_PADS];
atomic_t frame_sequence;
/* Video device, /dev/videoX */
struct video_device vdev;
struct media_pad vdev_pad;
struct v4l2_pix_format_mplane format;
struct vb2_queue vbq;
/* Buffer queue handling */
struct cio2_fbpt_entry *fbpt; /* Frame buffer pointer table */
dma_addr_t fbpt_bus_addr;
struct cio2_buffer *bufs[CIO2_MAX_BUFFERS];
unsigned int bufs_first; /* Index of the first used entry */
unsigned int bufs_next; /* Index of the first unused entry */
atomic_t bufs_queued;
};
struct cio2_device {
struct pci_dev *pci_dev;
void __iomem *base;
struct v4l2_device v4l2_dev;
struct cio2_queue queue[CIO2_QUEUES];
struct cio2_queue *cur_queue;
/* mutex to be used by video_device */
struct mutex lock;
bool streaming;
struct v4l2_async_notifier notifier;
struct media_device media_dev;
/*
* Safety net to catch DMA fetch ahead
* when reaching the end of LOP
*/
void *dummy_page;
/* DMA handle of dummy_page */
dma_addr_t dummy_page_bus_addr;
/* single List of Pointers (LOP) page */
u32 *dummy_lop;
/* DMA handle of dummy_lop */
dma_addr_t dummy_lop_bus_addr;
};
#define to_cio2_device(n) container_of(n, struct cio2_device, notifier)
/**************** Virtual channel ****************/
/*
* This should come from sensor driver. No
* driver interface nor requirement yet.
*/
#define SENSOR_VIR_CH_DFLT 0
/**************** FBPT operations ****************/
#define CIO2_FBPT_SIZE (CIO2_MAX_BUFFERS * CIO2_MAX_LOPS * \
sizeof(struct cio2_fbpt_entry))
#define CIO2_FBPT_SUBENTRY_UNIT 4
Annotation
- Immediate include surface: `linux/bits.h`, `linux/dma-mapping.h`, `linux/kernel.h`, `linux/mutex.h`, `linux/types.h`, `asm/page.h`, `media/media-device.h`, `media/media-entity.h`.
- Detected declarations: `struct cio2_fbpt_entry`, `struct pci_dev`, `struct cio2_csi2_timing`, `struct cio2_buffer`, `struct csi2_bus_info`, `struct cio2_queue`, `struct cio2_device`, `struct __packed`, `struct __packed`.
- 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.