drivers/media/platform/verisilicon/hantro_hw.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/verisilicon/hantro_hw.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/verisilicon/hantro_hw.h- Extension
.h- Size
- 18602 bytes
- Lines
- 589
- 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.
- Touches IRQ or DMA behavior; this matters for the representative real-device path.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/interrupt.hlinux/v4l2-controls.hmedia/v4l2-ctrls.hmedia/v4l2-vp9.hmedia/videobuf2-core.hrockchip_av1_entropymode.hrockchip_av1_filmgrain.h
Detected Declarations
struct hantro_devstruct hantro_ctxstruct hantro_bufstruct hantro_variantstruct hantro_aux_bufstruct hantro_h264_dec_ctrlsstruct hantro_h264_dec_reflistsstruct hantro_h264_dec_hw_ctxstruct hantro_hevc_dec_ctrlsstruct hantro_hevc_dec_hw_ctxstruct hantro_mpeg2_dec_hw_ctxstruct hantro_vp8_dec_hw_ctxstruct hantro_vp9_frame_infostruct hantro_vp9_dec_hw_ctxstruct hantro_av1_dec_ctrlsstruct hantro_av1_frame_refstruct hantro_av1_dec_hw_ctxstruct hantro_postproc_ctxstruct hantro_postproc_opsstruct hantro_codec_opsenum hantro_enc_fmtfunction hantro_vp9_num_sbsfunction hantro_vp9_mv_sizefunction hantro_h264_mv_sizefunction hantro_hevc_mv_sizefunction hantro_hevc_luma_compressed_sizefunction hantro_hevc_chroma_compressed_sizefunction hantro_hevc_compressed_sizefunction hantro_av1_num_sbsfunction hantro_av1_mv_size
Annotated Snippet
struct hantro_aux_buf {
void *cpu;
dma_addr_t dma;
size_t size;
unsigned long attrs;
};
/* Max. number of entries in the DPB (HW limitation). */
#define HANTRO_H264_DPB_SIZE 16
/**
* struct hantro_h264_dec_ctrls
*
* @decode: Decode params
* @scaling: Scaling info
* @sps: SPS info
* @pps: PPS info
*/
struct hantro_h264_dec_ctrls {
const struct v4l2_ctrl_h264_decode_params *decode;
const struct v4l2_ctrl_h264_scaling_matrix *scaling;
const struct v4l2_ctrl_h264_sps *sps;
const struct v4l2_ctrl_h264_pps *pps;
};
/**
* struct hantro_h264_dec_reflists
*
* @p: P reflist
* @b0: B0 reflist
* @b1: B1 reflist
*/
struct hantro_h264_dec_reflists {
struct v4l2_h264_reference p[V4L2_H264_REF_LIST_LEN];
struct v4l2_h264_reference b0[V4L2_H264_REF_LIST_LEN];
struct v4l2_h264_reference b1[V4L2_H264_REF_LIST_LEN];
};
/**
* struct hantro_h264_dec_hw_ctx
*
* @priv: Private auxiliary buffer for hardware.
* @dpb: DPB
* @reflists: P/B0/B1 reflists
* @ctrls: V4L2 controls attached to a run
* @dpb_longterm: DPB long-term
* @dpb_valid: DPB valid
* @cur_poc: Current picture order count
*/
struct hantro_h264_dec_hw_ctx {
struct hantro_aux_buf priv;
struct v4l2_h264_dpb_entry dpb[HANTRO_H264_DPB_SIZE];
struct hantro_h264_dec_reflists reflists;
struct hantro_h264_dec_ctrls ctrls;
u32 dpb_longterm;
u32 dpb_valid;
s32 cur_poc;
};
/**
* struct hantro_hevc_dec_ctrls
* @decode_params: Decode params
* @scaling: Scaling matrix
* @sps: SPS info
* @pps: PPS info
* @hevc_hdr_skip_length: the number of data (in bits) to skip in the
* slice segment header syntax after 'slice type'
* token
*/
struct hantro_hevc_dec_ctrls {
const struct v4l2_ctrl_hevc_decode_params *decode_params;
const struct v4l2_ctrl_hevc_scaling_matrix *scaling;
const struct v4l2_ctrl_hevc_sps *sps;
const struct v4l2_ctrl_hevc_pps *pps;
u32 hevc_hdr_skip_length;
};
/**
* struct hantro_hevc_dec_hw_ctx
* @tile_sizes: Tile sizes buffer
* @tile_filter: Tile vertical filter buffer
* @tile_sao: Tile SAO buffer
* @tile_bsd: Tile BSD control buffer
* @ref_bufs: Internal reference buffers
* @scaling_lists: Scaling lists buffer
* @ref_bufs_poc: Internal reference buffers picture order count
* @ref_bufs_used: Bitfield of used reference buffers
* @ctrls: V4L2 controls attached to a run
* @num_tile_cols_allocated: number of allocated tiles
* @use_compression: use reference buffer compression
Annotation
- Immediate include surface: `linux/interrupt.h`, `linux/v4l2-controls.h`, `media/v4l2-ctrls.h`, `media/v4l2-vp9.h`, `media/videobuf2-core.h`, `rockchip_av1_entropymode.h`, `rockchip_av1_filmgrain.h`.
- Detected declarations: `struct hantro_dev`, `struct hantro_ctx`, `struct hantro_buf`, `struct hantro_variant`, `struct hantro_aux_buf`, `struct hantro_h264_dec_ctrls`, `struct hantro_h264_dec_reflists`, `struct hantro_h264_dec_hw_ctx`, `struct hantro_hevc_dec_ctrls`, `struct hantro_hevc_dec_hw_ctx`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- IRQ or DMA behavior appears here, which is relevant to the selected PCIe/NVMe device path.
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.