drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec.h- Extension
.h- Size
- 3178 bytes
- Lines
- 103
- 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
media/videobuf2-core.hmedia/v4l2-mem2mem.hmtk_vcodec_dec_drv.h
Detected Declarations
struct vdec_fbstruct mtk_video_dec_buf
Annotated Snippet
struct vdec_fb {
struct mtk_vcodec_mem base_y;
struct mtk_vcodec_mem base_c;
unsigned int status;
};
/**
* struct mtk_video_dec_buf - Private data related to each VB2 buffer.
* @m2m_buf: M2M buffer
* @used: Capture buffer contain decoded frame data and keep in
* codec data structure
* @queued_in_vb2: Capture buffer is queue in vb2
* @queued_in_v4l2: Capture buffer is in v4l2 driver, but not in vb2
* queue yet
* @error: An unrecoverable error occurs on this buffer.
* @frame_buffer: Decode status, and buffer information of Capture buffer
* @bs_buffer: Output buffer info
*
* Note : These status information help us track and debug buffer state
*/
struct mtk_video_dec_buf {
struct v4l2_m2m_buffer m2m_buf;
bool used;
bool queued_in_vb2;
bool queued_in_v4l2;
bool error;
union {
struct vdec_fb frame_buffer;
struct mtk_vcodec_mem bs_buffer;
};
};
extern const struct v4l2_ioctl_ops mtk_vdec_ioctl_ops;
extern const struct v4l2_m2m_ops mtk_vdec_m2m_ops;
extern const struct media_device_ops mtk_vcodec_media_ops;
extern const struct mtk_vcodec_dec_pdata mtk_vdec_8173_pdata;
extern const struct mtk_vcodec_dec_pdata mtk_vdec_8183_pdata;
extern const struct mtk_vcodec_dec_pdata mtk_lat_sig_core_pdata;
extern const struct mtk_vcodec_dec_pdata mtk_vdec_single_core_pdata;
/*
* mtk_vdec_lock/mtk_vdec_unlock are for ctx instance to
* get/release lock before/after access decoder hw.
* mtk_vdec_lock get decoder hw lock and set curr_ctx
* to ctx instance that get lock
*/
void mtk_vdec_unlock(struct mtk_vcodec_dec_ctx *ctx);
void mtk_vdec_lock(struct mtk_vcodec_dec_ctx *ctx);
int mtk_vcodec_dec_queue_init(void *priv, struct vb2_queue *src_vq,
struct vb2_queue *dst_vq);
void mtk_vcodec_dec_set_default_params(struct mtk_vcodec_dec_ctx *ctx);
void mtk_vcodec_dec_release(struct mtk_vcodec_dec_ctx *ctx);
/*
* VB2 ops
*/
int vb2ops_vdec_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers,
unsigned int *nplanes, unsigned int sizes[],
struct device *alloc_devs[]);
int vb2ops_vdec_buf_prepare(struct vb2_buffer *vb);
void vb2ops_vdec_buf_finish(struct vb2_buffer *vb);
int vb2ops_vdec_buf_init(struct vb2_buffer *vb);
int vb2ops_vdec_start_streaming(struct vb2_queue *q, unsigned int count);
void vb2ops_vdec_stop_streaming(struct vb2_queue *q);
#endif /* _MTK_VCODEC_DEC_H_ */
Annotation
- Immediate include surface: `media/videobuf2-core.h`, `media/v4l2-mem2mem.h`, `mtk_vcodec_dec_drv.h`.
- Detected declarations: `struct vdec_fb`, `struct mtk_video_dec_buf`.
- 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.