drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_req_multi_if.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_req_multi_if.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_h264_req_multi_if.c- Extension
.c- Size
- 44294 bytes
- Lines
- 1324
- 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/slab.hmedia/v4l2-h264.hmedia/v4l2-mem2mem.hmedia/videobuf2-dma-contig.h../mtk_vcodec_dec.h../../common/mtk_vcodec_intr.h../vdec_drv_base.h../vdec_drv_if.h../vdec_vpu_if.hvdec_h264_req_common.h
Detected Declarations
struct vdec_h264_slice_lat_dec_paramstruct vdec_h264_slice_infostruct vdec_h264_slice_vsistruct vdec_h264_slice_share_infostruct vdec_h264_slice_memstruct vdec_h264_slice_fbstruct vdec_h264_slice_info_extstruct vdec_h264_slice_vsi_extstruct vdec_h264_slice_instenum vdec_h264_core_dec_err_typefunction vdec_h264_slice_fill_decode_parametersfunction get_vdec_sig_decode_parametersfunction vdec_h264_slice_fill_decode_reflistfunction vdec_h264_slice_alloc_mv_buffunction vdec_h264_slice_free_mv_buffunction vdec_h264_slice_get_pic_infofunction vdec_h264_slice_get_crop_infofunction vdec_h264_slice_setup_lat_buffer_extfunction vdec_h264_slice_setup_core_buffer_extfunction vdec_h264_slice_core_decode_extfunction vdec_h264_slice_core_decodefunction vdec_h264_insert_startcodefunction vdec_h264_slice_lat_decode_extfunction vdec_h264_slice_lat_decodefunction vdec_h264_slice_single_decode_extfunction vdec_h264_slice_single_decodefunction vdec_h264_slice_initfunction vdec_h264_slice_deinitfunction vdec_h264_slice_decodefunction vdec_h264_slice_get_param
Annotated Snippet
struct vdec_h264_slice_lat_dec_param {
struct mtk_h264_sps_param sps;
struct mtk_h264_pps_param pps;
struct mtk_h264_slice_hd_param slice_header;
struct slice_api_h264_scaling_matrix scaling_matrix;
struct slice_api_h264_decode_param decode_params;
struct mtk_h264_dpb_info h264_dpb_info[V4L2_H264_NUM_DPB_ENTRIES];
};
/**
* struct vdec_h264_slice_info - decode information (shared data between host and firmware)
*
* @nal_info: nal info of current picture
* @timeout: Decode timeout: 1 timeout, 0 no timeout
* @bs_buf_size: bitstream size
* @bs_buf_addr: bitstream buffer dma address
* @y_fb_dma: Y frame buffer dma address
* @c_fb_dma: C frame buffer dma address
* @vdec_fb_va: VDEC frame buffer struct virtual address
* @crc: Used to check whether hardware's status is right
*/
struct vdec_h264_slice_info {
u16 nal_info;
u16 timeout;
u32 bs_buf_size;
u64 bs_buf_addr;
u64 y_fb_dma;
u64 c_fb_dma;
u64 vdec_fb_va;
u32 crc[8];
};
/**
* struct vdec_h264_slice_vsi - shared memory for decode information exchange
* between SCP and Host (shared data between host and firmware).
*
* @wdma_err_addr: wdma error dma address
* @wdma_start_addr: wdma start dma address
* @wdma_end_addr: wdma end dma address
* @slice_bc_start_addr: slice bc start dma address
* @slice_bc_end_addr: slice bc end dma address
* @row_info_start_addr: row info start dma address
* @row_info_end_addr: row info end dma address
* @trans_start: trans start dma address
* @trans_end: trans end dma address
* @wdma_end_addr_offset: wdma end address offset
*
* @mv_buf_dma: HW working motion vector buffer
* @dec: decode information (AP-R, VPU-W)
* @h264_slice_params: decode parameters for hw used
*/
struct vdec_h264_slice_vsi {
/* LAT dec addr */
u64 wdma_err_addr;
u64 wdma_start_addr;
u64 wdma_end_addr;
u64 slice_bc_start_addr;
u64 slice_bc_end_addr;
u64 row_info_start_addr;
u64 row_info_end_addr;
u64 trans_start;
u64 trans_end;
u64 wdma_end_addr_offset;
u64 mv_buf_dma[H264_MAX_MV_NUM];
struct vdec_h264_slice_info dec;
struct vdec_h264_slice_lat_dec_param h264_slice_params;
};
/**
* struct vdec_h264_slice_share_info - shared information used to exchange
* message between lat and core
*
* @sps: sequence header information from user space
* @dec_params: decoder params from user space
* @h264_slice_params: decoder params used for hardware
* @trans_start: trans start dma address
* @trans_end: trans end dma address
* @nal_info: nal info of current picture
*/
struct vdec_h264_slice_share_info {
struct v4l2_ctrl_h264_sps sps;
struct v4l2_ctrl_h264_decode_params dec_params;
struct vdec_h264_slice_lat_dec_param h264_slice_params;
u64 trans_start;
u64 trans_end;
u16 nal_info;
};
/*
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `media/v4l2-h264.h`, `media/v4l2-mem2mem.h`, `media/videobuf2-dma-contig.h`, `../mtk_vcodec_dec.h`, `../../common/mtk_vcodec_intr.h`, `../vdec_drv_base.h`.
- Detected declarations: `struct vdec_h264_slice_lat_dec_param`, `struct vdec_h264_slice_info`, `struct vdec_h264_slice_vsi`, `struct vdec_h264_slice_share_info`, `struct vdec_h264_slice_mem`, `struct vdec_h264_slice_fb`, `struct vdec_h264_slice_info_ext`, `struct vdec_h264_slice_vsi_ext`, `struct vdec_h264_slice_inst`, `enum vdec_h264_core_dec_err_type`.
- 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.