STRUCT VENUS_INST(9)
π NAME π
struct venus_inst β the lil container that holds all the per-instance parameters, bestie. Like, one of these per session, no cap. (Oh and hii, this is the Kernel API Manual β welcome to the group chat β¨)
β¨ SYNOPSIS β¨
struct venus_inst {
struct list_head list;
struct mutex lock;
struct venus_core *core;
struct clock_data clk_data;
struct list_head dpbbufs;
struct list_head internalbufs;
struct list_head registeredbufs;
struct list_head delayed_process;
struct work_struct delayed_process_work;
bool nonblock;
struct v4l2_ctrl_handler ctrl_handler;
union {
struct vdec_controls dec;
struct venc_controls enc;
} controls;
struct v4l2_fh fh;
unsigned int streamon_cap, streamon_out;
u32 width;
u32 height;
struct v4l2_rect crop;
u32 fw_min_cnt;
u32 out_width;
u32 out_height;
u32 colorspace;
u8 ycbcr_enc;
u8 quantization;
u8 xfer_func;
enum venus_dec_state codec_state;
enum venus_enc_state enc_state;
wait_queue_head_t reconf_wait;
unsigned int subscriptions;
int buf_count;
struct venus_ts_metadata tss[VIDEO_MAX_FRAME];
unsigned long payloads[VIDEO_MAX_FRAME];
u64 fps;
struct v4l2_fract timeperframe;
const struct venus_format *fmt_out;
const struct venus_format *fmt_cap;
unsigned int num_input_bufs;
unsigned int num_output_bufs;
unsigned int input_buf_size;
unsigned int output_buf_size;
unsigned int output2_buf_size;
u32 dpb_buftype;
u32 dpb_fmt;
u32 opb_buftype;
u32 opb_fmt;
bool reconfig;
u32 hfi_codec;
u32 sequence_cap;
u32 sequence_out;
struct v4l2_m2m_dev *m2m_dev;
struct v4l2_m2m_ctx *m2m_ctx;
struct mutex ctx_q_lock;
unsigned int state;
struct completion done;
unsigned int error;
bool session_error;
const struct hfi_inst_ops *ops;
u32 session_type;
union hfi_get_property hprop;
unsigned int core_acquired: 1;
unsigned int bit_depth;
unsigned int pic_struct;
bool next_buf_last;
bool drain_active;
enum venus_inst_modes flags;
struct ida dpb_ids;
};
πΈ Members πΈ
Okay so now we go field by field, and honestly? There are a LOT of them. Stay with me π«Ά
listβ used for attach an instance to the core. Glue duty πlockβ instance lock, the bouncer for this specific instance.coreβ a reference to the core struct.clk_dataβ clock data per core ID.dpbbufsβ a list of decoded picture buffers.internalbufsβ a list of internal buffers.registeredbufsβ a list of registered capture buffers.delayed_processβ a list of delayed buffers, just vibing in the queue.delayed_process_workβ awork_structfor process delayed buffers.nonblockβ nonblocking flag, the "don't wait up for me" switch.ctrl_handlerβ v4l control handler.controlsβ a union of decoder and encoder control parameters. One of these at a time, pick a lane β¨fhβ a holder of v4l file handle structure.streamon_capβ stream on flag for capture queue.streamon_outβ stream on flag for output queue.widthβ current capture width.heightβ current capture height.cropβ current crop rectangle.fw_min_cntβ firmware minimum buffer count.out_widthβ current output width.out_heightβ current output height.colorspaceβ current color space.ycbcr_encβ current YCbCr encoding.quantizationβ current quantization.xfer_funcβ current xfer function.codec_stateβ current decoder API state (seeDEC_STATE_).enc_stateβ current encoder API state (seeENC_STATE_).reconf_waitβ wait queue for resolution change event. She waits π₯Ίsubscriptionsβ used to hold current events subscriptions.buf_countβ used to count number of buffers (reqbuf(0)).tssβ timestamp metadata.payloadsβ cache plane payload to use it for clock/BW scaling.fpsβ holds current FPS.timeperframeβ holds current time per frame structure.fmt_outβ a reference to output format structure.fmt_capβ a reference to capture format structure.num_input_bufsβ holds number of input buffers.num_output_bufsβ holds number of output buffers.input_buf_sizeβ holds input buffer size.output_buf_sizeβ holds output buffer size.output2_buf_sizeβ holds secondary decoder output buffer size.dpb_buftypeβ decoded picture buffer type.dpb_fmtβ decoded picture buffer raw format.opb_buftypeβ output picture buffer type.opb_fmtβ output picture buffer raw format.reconfigβ a flag raised by decoder when the stream resolution changed.hfi_codecβ current codec for this instance in HFI space.sequence_capβ a sequence counter for capture queue.sequence_outβ a sequence counter for output queue.m2m_devβ a reference to m2m device structure.m2m_ctxβ a reference to m2m context structure.ctx_q_lockβ a lock to serialize video device ioctl calls.stateβ current state of the instance.doneβ a completion for sync HFI operation.errorβ an error returned during last HFI sync operation.session_errorβ a flag rised by HFI interface in case of session error.opsβ HFI operations.session_typeβ the type of the session (decoder or encoder).hpropβ a union used as a holder by get property.core_acquiredβ the Core has been acquired. She's taken πbit_depthβ current bitstream bit-depth.pic_structβ bitstream progressive vs interlaced.next_buf_lastβ a flag to mark next queued capture buffer as last.drain_activeβ Drain sequence is in progress.flagsβ bitmask flags describing current instance mode.dpb_idsβ DPB buffer ID's.
π₯ SEE ALSO π₯
- Kernel file
./drivers/media/platform/qcom/venus/core.hstruct venus_core(9)
And that's the whole page, bestie, you ate that π This icon lives at ./drivers/media/platform/qcom/... in the October 2026 edition of struct venus_inst(9) β go forth and read the struct, periodt ππΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms