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.

Dependency Surface

Detected Declarations

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

Implementation Notes