drivers/media/platform/ti/vpe/vip.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/ti/vpe/vip.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/ti/vpe/vip.h- Extension
.h- Size
- 21467 bytes
- Lines
- 718
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/videodev2.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-event.hmedia/v4l2-ioctl.hmedia/videobuf2-core.hmedia/videobuf2-dma-contig.hmedia/videobuf2-memops.hmedia/v4l2-fwnode.hmedia/v4l2-async.hvpdma.hvpdma_priv.hsc.hcsc.h
Detected Declarations
struct vip_bufferstruct vip_fmtstruct vip_parser_datastruct vip_sharedstruct vip_ctrl_modulestruct vip_devstruct vip_portstruct vip_streamenum vip_csc_stateenum data_path_selectenum data_interface_modesenum sync_types
Annotated Snippet
struct vip_buffer {
/* common v4l buffer stuff */
struct vb2_v4l2_buffer vb;
struct list_head list;
bool drop;
};
/*
* struct vip_fmt - VIP media bus format information
* @fourcc: V4L2 pixel format FCC identifier
* @code: V4L2 media bus format code
* @colorspace: V4L2 colorspace identifier
* @coplanar: 1 if unpacked Luma and Chroma, 0 otherwise (packed/interleaved)
* @vpdma_fmt: VPDMA data format per plane.
* @finfo: Cache v4l2_format_info for associated fourcc
*/
struct vip_fmt {
u32 fourcc;
u32 code;
u32 colorspace;
u8 coplanar;
const struct vpdma_data_format *vpdma_fmt[VIP_MAX_PLANES];
const struct v4l2_format_info *finfo;
};
/*
* The vip_parser_data structures contains the memory mapped
* info to access the parser registers.
*/
struct vip_parser_data {
void __iomem *base;
struct platform_device *pdev;
};
/*
* The vip_shared structure contains data that is shared by both
* the VIP1 and VIP2 slices.
*/
struct vip_shared {
struct list_head list;
void __iomem *base;
struct vpdma_data vpdma_data;
struct vpdma_data *vpdma;
struct v4l2_device v4l2_dev;
struct vip_dev *devs[VIP_NUM_SLICES];
struct v4l2_ctrl_handler ctrl_handler;
};
struct vip_ctrl_module {
struct regmap *syscon_pol;
u32 syscon_offset;
u32 syscon_bit_field[4];
};
/*
* There are two vip_dev structure, one for each vip slice: VIP1 & VIP2.
*/
struct vip_dev {
struct v4l2_device v4l2_dev;
struct platform_device *pdev;
struct vip_shared *shared;
struct vip_ctrl_module *syscon;
int instance_id;
int slice_id;
int num_ports; /* count of open ports */
struct mutex mutex;
/* protects access to stream buffer queues */
spinlock_t slock;
int irq;
void __iomem *base;
struct vip_port *ports[VIP_NUM_PORTS];
char name[16];
/* parser data handle */
struct vip_parser_data *parser;
/* scaler data handle */
struct sc_data *sc;
/* scaler port assignation */
int sc_assigned;
/* csc data handle */
struct csc_data *csc;
/* csc port assignation */
int csc_assigned;
};
/*
* There are two vip_port structures for each vip_dev, one for port A
Annotation
- Immediate include surface: `linux/videodev2.h`, `media/v4l2-ctrls.h`, `media/v4l2-device.h`, `media/v4l2-event.h`, `media/v4l2-ioctl.h`, `media/videobuf2-core.h`, `media/videobuf2-dma-contig.h`, `media/videobuf2-memops.h`.
- Detected declarations: `struct vip_buffer`, `struct vip_fmt`, `struct vip_parser_data`, `struct vip_shared`, `struct vip_ctrl_module`, `struct vip_dev`, `struct vip_port`, `struct vip_stream`, `enum vip_csc_state`, `enum data_path_select`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
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.