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.
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/debugfs.hlinux/idr.hlinux/irqreturn.hlinux/mutex.hlinux/kfifo.hlinux/videodev2.hlinux/ratelimit.hmedia/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-fh.hmedia/videobuf2-v4l2.hcoda_regs.h
Detected Declarations
struct coda_video_devicestruct coda_devtypestruct coda_aux_bufstruct coda_devstruct coda_codecstruct coda_huff_tabstruct coda_paramsstruct coda_buffer_metastruct coda_q_datastruct coda_iram_infostruct coda_ctxstruct coda_context_opsstruct coda_internal_framestruct coda_ctxenum coda_inst_typeenum coda_productfunction coda_get_bitstream_payloadfunction coda_bitstream_can_fetch_pastfunction coda_jpeg_scale
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
- Immediate include surface: `linux/debugfs.h`, `linux/idr.h`, `linux/irqreturn.h`, `linux/mutex.h`, `linux/kfifo.h`, `linux/videodev2.h`, `linux/ratelimit.h`, `media/v4l2-ctrls.h`.
- Detected declarations: `struct coda_video_device`, `struct coda_devtype`, `struct coda_aux_buf`, `struct coda_dev`, `struct coda_codec`, `struct coda_huff_tab`, `struct coda_params`, `struct coda_buffer_meta`, `struct coda_q_data`, `struct coda_iram_info`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.