drivers/media/platform/chips-media/coda/coda.h

Source file repositories/reference/linux-study-clean/drivers/media/platform/chips-media/coda/coda.h

File Facts

System
Linux kernel
Corpus path
drivers/media/platform/chips-media/coda/coda.h
Extension
.h
Size
10838 bytes
Lines
404
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 coda_devtype {
	char			*firmware[3];
	enum coda_product	product;
	const struct coda_codec	*codecs;
	unsigned int		num_codecs;
	const struct coda_video_device **vdevs;
	unsigned int		num_vdevs;
	size_t			workbuf_size;
	size_t			tempbuf_size;
	size_t			iram_size;
};

struct coda_aux_buf {
	void			*vaddr;
	dma_addr_t		paddr;
	u32			size;
	struct debugfs_blob_wrapper blob;
	struct dentry		*dentry;
};

struct coda_dev {
	struct v4l2_device	v4l2_dev;
	struct video_device	vfd[6];
	struct device		*dev;
	const struct coda_devtype *devtype;
	int			firmware;
	struct vdoa_data	*vdoa;

	void __iomem		*regs_base;
	struct clk		*clk_per;
	struct clk		*clk_ahb;
	struct reset_control	*rstc;

	struct coda_aux_buf	codebuf;
	struct coda_aux_buf	tempbuf;
	struct coda_aux_buf	workbuf;
	struct gen_pool		*iram_pool;
	struct coda_aux_buf	iram;

	struct mutex		dev_mutex;
	struct mutex		coda_mutex;
	struct workqueue_struct	*workqueue;
	struct v4l2_m2m_dev	*m2m_dev;
	struct ida		ida;
	struct dentry		*debugfs_root;
	struct ratelimit_state	mb_err_rs;
};

struct coda_codec {
	u32 mode;
	u32 src_fourcc;
	u32 dst_fourcc;
	u32 max_w;
	u32 max_h;
};

struct coda_huff_tab;

struct coda_params {
	u8			rot_mode;
	u8			h264_intra_qp;
	u8			h264_inter_qp;
	u8			h264_min_qp;
	u8			h264_max_qp;
	u8			h264_disable_deblocking_filter_idc;
	s8			h264_slice_alpha_c0_offset_div2;
	s8			h264_slice_beta_offset_div2;
	bool			h264_constrained_intra_pred_flag;
	s8			h264_chroma_qp_index_offset;
	u8			h264_profile_idc;
	u8			h264_level_idc;
	u8			mpeg2_profile_idc;
	u8			mpeg2_level_idc;
	u8			mpeg4_intra_qp;
	u8			mpeg4_inter_qp;
	u8			gop_size;
	int			intra_refresh;
	enum v4l2_jpeg_chroma_subsampling jpeg_chroma_subsampling;
	u8			jpeg_quality;
	u8			jpeg_restart_interval;
	u8			*jpeg_qmat_tab[3];
	int			jpeg_qmat_index[3];
	int			jpeg_huff_dc_index[3];
	int			jpeg_huff_ac_index[3];
	u32			*jpeg_huff_data;
	struct coda_huff_tab	*jpeg_huff_tab;
	int			codec_mode;
	int			codec_mode_aux;
	enum v4l2_mpeg_video_multi_slice_mode slice_mode;
	u32			framerate;

Annotation

Implementation Notes