drivers/media/platform/qcom/venus/core.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/venus/core.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/qcom/venus/core.h- Extension
.h- Size
- 16842 bytes
- Lines
- 603
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/bitops.hlinux/list.hmedia/videobuf2-v4l2.hmedia/v4l2-ctrls.hmedia/v4l2-device.hdbgfs.hhfi.hhfi_platform.hhfi_helper.h
Detected Declarations
struct freq_tblstruct reg_valstruct bw_tblstruct firmware_versionstruct venus_resourcesstruct venus_formatstruct venus_corestruct video_firmwarestruct vdec_controlsstruct venc_controlsstruct venus_bufferstruct clock_datastruct venus_ts_metadatastruct venus_instenum vpu_versionenum venus_fmtenum venus_dec_stateenum venus_enc_stateenum venus_inst_modesfunction is_litefunction venus_caps_by_codecfunction is_fw_rev_or_newerfunction is_fw_rev_or_older
Annotated Snippet
struct freq_tbl {
unsigned int load;
unsigned long freq;
};
struct reg_val {
u32 reg;
u32 value;
};
struct bw_tbl {
u32 mbs_per_sec;
u32 avg;
u32 peak;
u32 avg_10bit;
u32 peak_10bit;
};
enum vpu_version {
VPU_VERSION_AR50,
VPU_VERSION_AR50_LITE,
VPU_VERSION_IRIS1,
#if (!IS_ENABLED(CONFIG_VIDEO_QCOM_IRIS))
VPU_VERSION_IRIS2,
VPU_VERSION_IRIS2_1,
#endif
};
struct firmware_version {
u32 major;
u32 minor;
u32 rev;
};
struct venus_resources {
u64 dma_mask;
const struct freq_tbl *freq_tbl;
unsigned int freq_tbl_size;
const struct bw_tbl *bw_tbl_enc;
unsigned int bw_tbl_enc_size;
const struct bw_tbl *bw_tbl_dec;
unsigned int bw_tbl_dec_size;
const struct reg_val *reg_tbl;
unsigned int reg_tbl_size;
const struct hfi_ubwc_config *ubwc_conf;
const char * const clks[VIDC_CLKS_NUM_MAX];
unsigned int clks_num;
const char * const vcodec_clks[VIDC_VCODEC_CLKS_NUM_MAX];
const char * const vcodec0_clks[VIDC_VCODEC_CLKS_NUM_MAX];
const char * const vcodec1_clks[VIDC_VCODEC_CLKS_NUM_MAX];
unsigned int vcodec_clks_num;
const char **vcodec_pmdomains;
unsigned int vcodec_pmdomains_num;
const char **opp_pmdomain;
unsigned int opp_pmdomain_num;
unsigned int vcodec_num;
const u32 dec_codec_blacklist;
const u32 enc_codec_blacklist;
const char * const resets[VIDC_RESETS_NUM_MAX];
unsigned int resets_num;
enum hfi_version hfi_version;
enum vpu_version vpu_version;
u8 num_vpp_pipes;
u32 max_load;
unsigned int vmem_id;
u32 vmem_size;
u32 vmem_addr;
u32 cp_start;
u32 cp_size;
u32 cp_nonpixel_start;
u32 cp_nonpixel_size;
const char *fwname;
const char *enc_nodename;
const char *dec_nodename;
const struct firmware_version *min_fw;
};
enum venus_fmt {
VENUS_FMT_NV12 = 0,
VENUS_FMT_QC08C = 1,
VENUS_FMT_QC10C = 2,
VENUS_FMT_P010 = 3,
VENUS_FMT_H264 = 4,
VENUS_FMT_VP8 = 5,
VENUS_FMT_VP9 = 6,
VENUS_FMT_HEVC = 7,
VENUS_FMT_VC1_ANNEX_G = 8,
VENUS_FMT_VC1_ANNEX_L = 9,
VENUS_FMT_MPEG4 = 10,
VENUS_FMT_MPEG2 = 11,
Annotation
- Immediate include surface: `linux/bitops.h`, `linux/list.h`, `media/videobuf2-v4l2.h`, `media/v4l2-ctrls.h`, `media/v4l2-device.h`, `dbgfs.h`, `hfi.h`, `hfi_platform.h`.
- Detected declarations: `struct freq_tbl`, `struct reg_val`, `struct bw_tbl`, `struct firmware_version`, `struct venus_resources`, `struct venus_format`, `struct venus_core`, `struct video_firmware`, `struct vdec_controls`, `struct venc_controls`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.