drivers/staging/media/sunxi/cedrus/cedrus.h
Source file repositories/reference/linux-study-clean/drivers/staging/media/sunxi/cedrus/cedrus.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/staging/media/sunxi/cedrus/cedrus.h- Extension
.h- Size
- 7079 bytes
- Lines
- 280
- Domain
- Driver Families
- Bucket
- drivers/staging
- 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
media/v4l2-ctrls.hmedia/v4l2-device.hmedia/v4l2-mem2mem.hmedia/videobuf2-v4l2.hmedia/videobuf2-dma-contig.hlinux/iopoll.hlinux/platform_device.hlinux/workqueue.h
Detected Declarations
struct cedrus_controlstruct cedrus_h264_runstruct cedrus_mpeg2_runstruct cedrus_h265_runstruct cedrus_vp8_runstruct cedrus_runstruct cedrus_bufferstruct cedrus_ctxstruct cedrus_dec_opsstruct cedrus_variantstruct cedrus_devenum cedrus_irq_statusenum cedrus_h264_pic_typefunction cedrus_writefunction cedrus_readfunction cedrus_wait_forfunction cedrus_buf_addrfunction cedrus_dst_buf_addrfunction cedrus_write_ref_buf_addrfunction vb2_v4l2_to_cedrus_bufferfunction vb2_to_cedrus_bufferfunction cedrus_is_capable
Annotated Snippet
struct cedrus_control {
struct v4l2_ctrl_config cfg;
unsigned int capabilities;
};
struct cedrus_h264_run {
const struct v4l2_ctrl_h264_decode_params *decode_params;
const struct v4l2_ctrl_h264_pps *pps;
const struct v4l2_ctrl_h264_scaling_matrix *scaling_matrix;
const struct v4l2_ctrl_h264_slice_params *slice_params;
const struct v4l2_ctrl_h264_sps *sps;
const struct v4l2_ctrl_h264_pred_weights *pred_weights;
};
struct cedrus_mpeg2_run {
const struct v4l2_ctrl_mpeg2_sequence *sequence;
const struct v4l2_ctrl_mpeg2_picture *picture;
const struct v4l2_ctrl_mpeg2_quantisation *quantisation;
};
struct cedrus_h265_run {
const struct v4l2_ctrl_hevc_sps *sps;
const struct v4l2_ctrl_hevc_pps *pps;
const struct v4l2_ctrl_hevc_slice_params *slice_params;
const struct v4l2_ctrl_hevc_decode_params *decode_params;
const struct v4l2_ctrl_hevc_scaling_matrix *scaling_matrix;
const u32 *entry_points;
u32 entry_points_count;
};
struct cedrus_vp8_run {
const struct v4l2_ctrl_vp8_frame *frame_params;
};
struct cedrus_run {
struct vb2_v4l2_buffer *src;
struct vb2_v4l2_buffer *dst;
union {
struct cedrus_h264_run h264;
struct cedrus_mpeg2_run mpeg2;
struct cedrus_h265_run h265;
struct cedrus_vp8_run vp8;
};
};
struct cedrus_buffer {
struct v4l2_m2m_buffer m2m_buf;
union {
struct {
unsigned int position;
enum cedrus_h264_pic_type pic_type;
void *mv_col_buf;
dma_addr_t mv_col_buf_dma;
ssize_t mv_col_buf_size;
} h264;
struct {
void *mv_col_buf;
dma_addr_t mv_col_buf_dma;
ssize_t mv_col_buf_size;
} h265;
} codec;
};
struct cedrus_ctx {
struct v4l2_fh fh;
struct cedrus_dev *dev;
struct v4l2_pix_format src_fmt;
struct v4l2_pix_format dst_fmt;
struct cedrus_dec_ops *current_codec;
unsigned int bit_depth;
struct v4l2_ctrl_handler hdl;
struct v4l2_ctrl **ctrls;
union {
struct {
void *pic_info_buf;
dma_addr_t pic_info_buf_dma;
ssize_t pic_info_buf_size;
void *neighbor_info_buf;
dma_addr_t neighbor_info_buf_dma;
void *deblk_buf;
dma_addr_t deblk_buf_dma;
ssize_t deblk_buf_size;
void *intra_pred_buf;
dma_addr_t intra_pred_buf_dma;
ssize_t intra_pred_buf_size;
Annotation
- Immediate include surface: `media/v4l2-ctrls.h`, `media/v4l2-device.h`, `media/v4l2-mem2mem.h`, `media/videobuf2-v4l2.h`, `media/videobuf2-dma-contig.h`, `linux/iopoll.h`, `linux/platform_device.h`, `linux/workqueue.h`.
- Detected declarations: `struct cedrus_control`, `struct cedrus_h264_run`, `struct cedrus_mpeg2_run`, `struct cedrus_h265_run`, `struct cedrus_vp8_run`, `struct cedrus_run`, `struct cedrus_buffer`, `struct cedrus_ctx`, `struct cedrus_dec_ops`, `struct cedrus_variant`.
- Atlas domain: Driver Families / drivers/staging.
- 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.