drivers/media/platform/chips-media/wave5/wave5-vpuapi.h
Source file repositories/reference/linux-study-clean/drivers/media/platform/chips-media/wave5/wave5-vpuapi.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/chips-media/wave5/wave5-vpuapi.h- Extension
.h- Size
- 30035 bytes
- Lines
- 893
- 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/kfifo.hlinux/idr.hlinux/genalloc.hmedia/v4l2-device.hmedia/v4l2-mem2mem.hmedia/v4l2-ctrls.hwave5-vpuerror.hwave5-vpuconfig.hwave5-vdi.h
Detected Declarations
struct vpu_attrstruct vpu_attrstruct frame_bufferstruct vpu_rectstruct dec_open_paramstruct dec_initial_infostruct dec_output_infostruct queue_status_infostruct custom_gop_pic_paramstruct enc_wave_paramstruct enc_open_paramstruct enc_initial_infostruct enc_code_optstruct enc_paramstruct enc_output_infostruct sec_axi_infostruct dec_infostruct enc_infostruct vpu_devicestruct vpu_instancestruct vpu_instance_opsstruct vpu_instanceenum product_idenum vpu_instance_typeenum vpu_instance_stateenum cod_stdenum wave_stdenum set_param_optionenum codec_commandenum mirror_directionenum frame_buffer_formatenum packed_format_numenum wave5_interrupt_bitenum pic_typeenum sw_reset_modeenum tiled_map_typeenum temporal_id_modeenum enc_pic_code_optionenum gop_preset_idx
Annotated Snippet
struct vpu_attr {
u32 product_id;
char product_name[8]; /* product name in ascii code */
u32 product_version;
u32 fw_version;
u32 customer_id;
u32 support_decoders; /* bitmask */
u32 support_encoders; /* bitmask */
u32 support_backbone: 1;
u32 support_avc10bit_enc: 1;
u32 support_hevc10bit_enc: 1;
u32 support_hevc10bit_dec: 1;
u32 support_vcore_backbone: 1;
u32 support_vcpu_backbone: 1;
};
struct frame_buffer {
dma_addr_t buf_y;
dma_addr_t buf_cb;
dma_addr_t buf_cr;
unsigned int buf_y_size;
unsigned int buf_cb_size;
unsigned int buf_cr_size;
enum tiled_map_type map_type;
unsigned int stride; /* horizontal stride for the given frame buffer */
unsigned int width; /* width of the given frame buffer */
unsigned int height; /* height of the given frame buffer */
size_t size; /* size of the given frame buffer */
unsigned int sequence_no;
bool update_fb_info;
};
struct vpu_rect {
unsigned int left; /* horizontal pixel offset from left edge */
unsigned int top; /* vertical pixel offset from top edge */
unsigned int right; /* horizontal pixel offset from right edge */
unsigned int bottom; /* vertical pixel offset from bottom edge */
};
/*
* decode struct and definition
*/
struct dec_open_param {
dma_addr_t bitstream_buffer;
size_t bitstream_buffer_size;
};
struct dec_initial_info {
u32 pic_width;
u32 pic_height;
struct vpu_rect pic_crop_rect;
u32 min_frame_buffer_count; /* between 1 to 16 */
u32 profile;
u32 luma_bitdepth; /* bit-depth of the luma sample */
u32 chroma_bitdepth; /* bit-depth of the chroma sample */
u32 seq_init_err_reason;
dma_addr_t rd_ptr; /* read pointer of bitstream buffer */
dma_addr_t wr_ptr; /* write pointer of bitstream buffer */
u32 sequence_no;
u32 vlc_buf_size;
u32 param_buf_size;
};
struct dec_output_info {
/**
* This is a frame buffer index for the picture to be displayed at the moment
* among frame buffers which are registered using vpu_dec_register_frame_buffer().
* Frame data that will be displayed is stored in the frame buffer with this index
* When there is no display delay, this index is always the equal to
* index_frame_decoded, however, if displaying is delayed (for display
* reordering in AVC or B-frames in VC1), this index might be different to
* index_frame_decoded. By checking this index, HOST applications can easily figure
* out whether sequence decoding has been finished or not.
*
* -3(0xFFFD) or -2(0xFFFE) : when a display output cannot be given due to picture
* reordering or skip option
* -1(0xFFFF) : when there is no more output for display at the end of sequence
* decoding
*/
s32 index_frame_display;
/**
* This is the frame buffer index of the decoded picture among the frame buffers which were
* registered using vpu_dec_register_frame_buffer(). The currently decoded frame is stored
* into the frame buffer specified by this index.
*
* -2 : indicates that no decoded output is generated because decoder meets EOS
* (end of sequence) or skip
* -1 : indicates that the decoder fails to decode a picture because there is no available
Annotation
- Immediate include surface: `linux/kfifo.h`, `linux/idr.h`, `linux/genalloc.h`, `media/v4l2-device.h`, `media/v4l2-mem2mem.h`, `media/v4l2-ctrls.h`, `wave5-vpuerror.h`, `wave5-vpuconfig.h`.
- Detected declarations: `struct vpu_attr`, `struct vpu_attr`, `struct frame_buffer`, `struct vpu_rect`, `struct dec_open_param`, `struct dec_initial_info`, `struct dec_output_info`, `struct queue_status_info`, `struct custom_gop_pic_param`, `struct enc_wave_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.