drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/mediatek/vcodec/decoder/vdec/vdec_av1_req_lat_if.c- Extension
.c- Size
- 72668 bytes
- Lines
- 2216
- 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/videobuf2-dma-contig.h../mtk_vcodec_dec.h../../common/mtk_vcodec_intr.h../vdec_drv_base.h../vdec_drv_if.h../vdec_vpu_if.h
Detected Declarations
struct vdec_av1_slice_init_vsistruct vdec_av1_slice_memstruct vdec_av1_slice_statestruct vdec_av1_slice_tile_groupstruct vdec_av1_slice_scale_factorsstruct vdec_av1_slice_frame_refsstruct vdec_av1_slice_gmstruct vdec_av1_slice_smstruct vdec_av1_slice_segstruct vdec_av1_slice_delta_q_lfstruct vdec_av1_slice_quantizationstruct vdec_av1_slice_lrstruct vdec_av1_slice_loop_filterstruct vdec_av1_slice_cdefstruct vdec_av1_slice_mfmvstruct vdec_av1_slice_tilestruct vdec_av1_slice_uncompressed_headerstruct vdec_av1_slice_seq_headerstruct vdec_av1_slice_framestruct vdec_av1_slice_work_bufferstruct vdec_av1_slice_frame_infostruct vdec_av1_slice_slotstruct vdec_av1_slice_fbstruct vdec_av1_slice_vsistruct vdec_av1_slice_pfcstruct vdec_av1_slice_instanceenum vdec_av1_slice_resolution_levelenum vdec_av1_slice_frame_typeenum vdec_av1_slice_reference_modefunction vdec_av1_slice_get_msbfunction vdec_av1_slice_need_scalefunction vdec_av1_slice_init_cdf_tablefunction vdec_av1_slice_init_iq_tablefunction vdec_av1_slice_get_new_slotfunction vdec_av1_slice_clear_fbfunction vdec_av1_slice_decrease_ref_countfunction vdec_av1_slice_cleanup_slotsfunction vdec_av1_slice_setup_slotfunction vdec_av1_slice_alloc_working_bufferfunction vdec_av1_slice_free_working_bufferfunction vdec_av1_slice_vsi_from_remotefunction vdec_av1_slice_vsi_to_remotefunction vdec_av1_slice_setup_lat_from_src_buffunction vdec_av1_slice_resolve_divisor_32function vdec_av1_slice_get_shear_paramsfunction vdec_av1_slice_setup_gmfunction vdec_av1_slice_setup_segfunction vdec_av1_slice_setup_quant
Annotated Snippet
struct vdec_av1_slice_init_vsi {
u32 architecture;
u32 reserved;
u64 core_vsi;
u64 cdf_table_addr;
u32 cdf_table_size;
u64 iq_table_addr;
u32 iq_table_size;
u32 vsi_size;
};
/**
* struct vdec_av1_slice_mem - memory address and size
* @buf: dma_addr padding
* @dma_addr: buffer address
* @size: buffer size
* @dma_addr_end: buffer end address
* @padding: for padding
*/
struct vdec_av1_slice_mem {
union {
u64 buf;
dma_addr_t dma_addr;
};
union {
size_t size;
dma_addr_t dma_addr_end;
u64 padding;
};
};
/**
* struct vdec_av1_slice_state - decoding state
* @err : err type for decode
* @full : transcoded buffer is full or not
* @timeout : decode timeout or not
* @perf : performance enable
* @crc : hw checksum
* @out_size : hw output size
*/
struct vdec_av1_slice_state {
int err;
u32 full;
u32 timeout;
u32 perf;
u32 crc[16];
u32 out_size;
};
/*
* enum vdec_av1_slice_resolution_level - resolution level
*/
enum vdec_av1_slice_resolution_level {
AV1_RES_NONE,
AV1_RES_FHD,
AV1_RES_4K,
AV1_RES_8K,
};
/*
* enum vdec_av1_slice_frame_type - av1 frame type
*/
enum vdec_av1_slice_frame_type {
AV1_KEY_FRAME = 0,
AV1_INTER_FRAME,
AV1_INTRA_ONLY_FRAME,
AV1_SWITCH_FRAME,
AV1_FRAME_TYPES,
};
/*
* enum vdec_av1_slice_reference_mode - reference mode type
*/
enum vdec_av1_slice_reference_mode {
AV1_SINGLE_REFERENCE = 0,
AV1_COMPOUND_REFERENCE,
AV1_REFERENCE_MODE_SELECT,
AV1_REFERENCE_MODES,
};
/**
* struct vdec_av1_slice_tile_group - info for each tile
* @num_tiles: tile number
* @tile_size: input size for each tile
* @tile_start_offset: tile offset to input buffer
*/
struct vdec_av1_slice_tile_group {
u32 num_tiles;
u32 tile_size[V4L2_AV1_MAX_TILE_COUNT];
u32 tile_start_offset[V4L2_AV1_MAX_TILE_COUNT];
Annotation
- Immediate include surface: `linux/module.h`, `linux/slab.h`, `media/videobuf2-dma-contig.h`, `../mtk_vcodec_dec.h`, `../../common/mtk_vcodec_intr.h`, `../vdec_drv_base.h`, `../vdec_drv_if.h`, `../vdec_vpu_if.h`.
- Detected declarations: `struct vdec_av1_slice_init_vsi`, `struct vdec_av1_slice_mem`, `struct vdec_av1_slice_state`, `struct vdec_av1_slice_tile_group`, `struct vdec_av1_slice_scale_factors`, `struct vdec_av1_slice_frame_refs`, `struct vdec_av1_slice_gm`, `struct vdec_av1_slice_sm`, `struct vdec_av1_slice_seg`, `struct vdec_av1_slice_delta_q_lf`.
- 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.