drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.h- Extension
.h- Size
- 3839 bytes
- Lines
- 120
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct mtk_vcodec_dec_ctxstruct vdec_vpu_inst
Annotated Snippet
struct vdec_vpu_inst {
int id;
int core_id;
void *vsi;
int32_t failure;
uint32_t inst_addr;
uint32_t fw_abi_version;
uint32_t inst_id;
unsigned int signaled;
struct mtk_vcodec_dec_ctx *ctx;
wait_queue_head_t wq;
mtk_vcodec_ipi_handler handler;
unsigned int codec_type;
unsigned int capture_type;
unsigned int fb_sz[2];
};
/**
* vpu_dec_init - init decoder instance and allocate required resource in VPU.
*
* @vpu: instance for vdec_vpu_inst
*/
int vpu_dec_init(struct vdec_vpu_inst *vpu);
/**
* vpu_dec_start - start decoding, basically the function will be invoked once
* every frame.
*
* @vpu : instance for vdec_vpu_inst
* @data: meta data to pass bitstream info to VPU decoder
* @len : meta data length
*/
int vpu_dec_start(struct vdec_vpu_inst *vpu, uint32_t *data, unsigned int len);
/**
* vpu_dec_end - end decoding, basically the function will be invoked once
* when HW decoding done interrupt received successfully. The
* decoder in VPU will continue to do reference frame management
* and check if there is a new decoded frame available to display.
*
* @vpu : instance for vdec_vpu_inst
*/
int vpu_dec_end(struct vdec_vpu_inst *vpu);
/**
* vpu_dec_deinit - deinit decoder instance and resource freed in VPU.
*
* @vpu: instance for vdec_vpu_inst
*/
int vpu_dec_deinit(struct vdec_vpu_inst *vpu);
/**
* vpu_dec_reset - reset decoder, use for flush decoder when end of stream or
* seek. Remaining non displayed frame will be pushed to display.
*
* @vpu: instance for vdec_vpu_inst
*/
int vpu_dec_reset(struct vdec_vpu_inst *vpu);
/**
* vpu_dec_core - core start decoding, basically the function will be invoked once
* every frame.
*
* @vpu : instance for vdec_vpu_inst
*/
int vpu_dec_core(struct vdec_vpu_inst *vpu);
/**
* vpu_dec_core_end - core end decoding, basically the function will be invoked once
* when core HW decoding done and receive interrupt successfully. The
* decoder in VPU will update hardware information and deinit hardware
* and check if there is a new decoded frame available to display.
*
* @vpu : instance for vdec_vpu_inst
*/
int vpu_dec_core_end(struct vdec_vpu_inst *vpu);
/**
* vpu_dec_get_param - get param from scp
*
* @vpu : instance for vdec_vpu_inst
* @data: meta data to pass bitstream info to VPU decoder
* @len : meta data length
* @param_type : get param type
*/
int vpu_dec_get_param(struct vdec_vpu_inst *vpu, uint32_t *data,
unsigned int len, unsigned int param_type);
#endif
Annotation
- Detected declarations: `struct mtk_vcodec_dec_ctx`, `struct vdec_vpu_inst`.
- 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.