drivers/media/platform/amphion/vpu_windsor.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/amphion/vpu_windsor.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/amphion/vpu_windsor.c- Extension
.c- Size
- 30369 bytes
- Lines
- 1181
- 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
linux/init.hlinux/interconnect.hlinux/ioctl.hlinux/list.hlinux/kernel.hlinux/module.hlinux/platform_device.hlinux/time64.hmedia/videobuf2-v4l2.hmedia/videobuf2-dma-contig.hvpu.hvpu_rpc.hvpu_defs.hvpu_helpers.hvpu_cmds.hvpu_v4l2.hvpu_imx8q.hvpu_windsor.h
Detected Declarations
struct windsor_ifacestruct windsor_ctrl_ifacestruct vpu_enc_yuv_descstruct vpu_enc_calib_paramsstruct vpu_enc_config_paramsstruct vpu_enc_static_paramsstruct vpu_enc_dynamic_paramsstruct vpu_enc_expert_mode_paramstruct vpu_enc_memory_resourcestruct vpu_enc_paramstruct vpu_enc_mem_poolstruct vpu_enc_encoding_statusstruct vpu_enc_dsa_statusstruct vpu_enc_ctrlstruct vpu_enc_host_ctrlsstruct windsor_pic_infoenum MEDIAIP_ENC_FMTenum MEDIAIP_ENC_PROFILEenum MEDIAIP_ENC_BITRATE_MODEfunction vpu_windsor_get_data_sizefunction get_ptrfunction vpu_windsor_init_rpcfunction vpu_windsor_set_log_buffunction vpu_windsor_set_system_cfgfunction vpu_windsor_get_stream_buffer_sizefunction vpu_windsor_pack_cmdfunction vpu_windsor_convert_msg_idfunction vpu_windsor_unpack_pic_infofunction vpu_windsor_unpack_mem_reqfunction vpu_windsor_unpack_msg_datafunction vpu_windsor_fill_yuv_framefunction vpu_windsor_input_framefunction vpu_windsor_config_memory_resourcefunction vpu_windsor_config_stream_bufferfunction vpu_windsor_update_stream_bufferfunction vpu_windsor_get_stream_buffer_descfunction vpu_windsor_get_versionfunction vpu_windsor_set_frame_ratefunction vpu_windsor_set_formatfunction vpu_windsor_set_profilefunction vpu_windsor_set_levelfunction vpu_windsor_set_sizefunction vpu_windsor_set_gopfunction vpu_windsor_set_bframesfunction vpu_windsor_set_bitrate_modefunction vpu_windsor_bitratefunction vpu_windsor_set_bitratefunction vpu_windsor_set_qp
Annotated Snippet
struct windsor_iface {
u32 exec_base_addr;
u32 exec_area_size;
struct vpu_rpc_buffer_desc cmd_buffer_desc;
struct vpu_rpc_buffer_desc msg_buffer_desc;
u32 cmd_int_enable[VID_API_NUM_STREAMS];
u32 fw_version;
u32 mvd_fw_offset;
u32 max_streams;
u32 ctrl_iface[VID_API_NUM_STREAMS];
struct vpu_rpc_system_config system_config;
u32 api_version;
struct vpu_rpc_buffer_desc log_buffer_desc;
};
struct windsor_ctrl_iface {
u32 enc_yuv_buffer_desc;
u32 enc_stream_buffer_desc;
u32 enc_expert_mode_param;
u32 enc_param;
u32 enc_mem_pool;
u32 enc_encoding_status;
u32 enc_dsa_status;
};
struct vpu_enc_yuv_desc {
u32 frame_id;
u32 luma_base;
u32 chroma_base;
u32 param_idx;
u32 key_frame;
};
struct vpu_enc_calib_params {
u32 use_ame;
u32 cme_mvx_max;
u32 cme_mvy_max;
u32 ame_prefresh_y0;
u32 ame_prefresh_y1;
u32 fme_min_sad;
u32 cme_min_sad;
u32 fme_pred_int_weight;
u32 fme_pred_hp_weight;
u32 fme_pred_qp_weight;
u32 fme_cost_weight;
u32 fme_act_thold;
u32 fme_sad_thold;
u32 fme_zero_sad_thold;
u32 fme_lrg_mvx_lmt;
u32 fme_lrg_mvy_lmt;
u32 fme_force_mode;
u32 fme_force4mvcost;
u32 fme_force2mvcost;
u32 h264_inter_thrd;
u32 i16x16_mode_cost;
u32 i4x4_mode_lambda;
u32 i8x8_mode_lambda;
u32 inter_mod_mult;
u32 inter_sel_mult;
u32 inter_bid_cost;
u32 inter_bwd_cost;
u32 inter_4mv_cost;
s32 one_mv_i16_cost;
s32 one_mv_i4x4_cost;
s32 one_mv_i8x8_cost;
s32 two_mv_i16_cost;
s32 two_mv_i4x4_cost;
s32 two_mv_i8x8_cost;
s32 four_mv_i16_cost;
s32 four_mv_i4x4_cost;
s32 four_mv_i8x8_cost;
u32 intra_pred_enab;
u32 intra_chr_pred;
u32 intra16_pred;
u32 intra4x4_pred;
u32 intra8x8_pred;
u32 cb_base;
u32 cb_size;
u32 cb_head_room;
u32 mem_page_width;
u32 mem_page_height;
Annotation
- Immediate include surface: `linux/init.h`, `linux/interconnect.h`, `linux/ioctl.h`, `linux/list.h`, `linux/kernel.h`, `linux/module.h`, `linux/platform_device.h`, `linux/time64.h`.
- Detected declarations: `struct windsor_iface`, `struct windsor_ctrl_iface`, `struct vpu_enc_yuv_desc`, `struct vpu_enc_calib_params`, `struct vpu_enc_config_params`, `struct vpu_enc_static_params`, `struct vpu_enc_dynamic_params`, `struct vpu_enc_expert_mode_param`, `struct vpu_enc_memory_resource`, `struct vpu_enc_param`.
- 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.