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.

Dependency Surface

Detected Declarations

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

Implementation Notes