STRUCT VENC_VPU_IPI_MSG_ENC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct venc_vpu_ipi_msg_enc(9) πŸ’–

okay so bestie, this is a page straight out of the Kernel API Manual β€” it's all about struct venc_vpu_ipi_msg_enc, and it's genuinely the moment the VPU claps back at the AP to say "yeah, I encoded ur thing πŸ’…". Buckle up, it's a struct tour and it's lowkey iconic.


✨ NAME ✨

struct venc_vpu_ipi_msg_enc β€” the VPU ack AP enc cmd structure. That's it, that's the vibe: it's the message the VPU sends back to the AP side as an acknowledgement of an encode command 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

here's the actual shape of it, no cap, copied exactly:

struct venc_vpu_ipi_msg_enc {
    uint32_t msg_id;
    uint32_t status;
    uint64_t venc_inst;
    uint32_t state;
    uint32_t is_key_frm;
    uint32_t bs_size;
    uint32_t reserved;
 };

like… look at her. every field in its lane. main character energy fr πŸ”₯


🌸 MEMBERS 🌸

okay so this is the part where we go field by field, and honestly every single one matters so don't skip:

  • msg_id β€” the message id, and it's specifically VPU_IPIMSG_XXX_ENC_ENCODE_DONE πŸ‘‘ like, this is the "we're done encoding" announcement.
  • status β€” the cmd status, typed as venc_ipi_msg_status. this is where you find out how it went πŸ’€
  • venc_inst β€” the AP encoder instance, which is a struct venc_vp8_inst/venc_h264_inst * πŸŽ€
  • state β€” the encode state, typed as venc_ipi_msg_enc_state ✨
  • is_key_frm β€” literally tells u whether the encoded frame is a key frame πŸ¦‹
  • bs_size β€” the encoded bitstream size, in case u were wondering how chunky it got πŸ“
  • reserved β€” reserved for future use. and bestie, this one has lore: the VPU is running in 32bit. without this reserved field, if the kernel runs in 64bit, this struct size will be different between kernel and vpu 😭 so it's not just padding, it's holding the whole friendship together. respect her.
ngl the reserved field is the real one keeping 32bit VPU and 64bit kernel on speaking terms. do not touch. do not remove. periodt πŸ’…

🧚 SEE ALSO 🧚

the Kernel file involved is:

./drivers/media/platform/mediatek/vcodec/encoder/venc_ipi_msg.h

and here's the whole friend group, all of them, in order, no one left behind:

  • struct venc_ap_ipi_msg_init(9)
  • struct venc_ap_ipi_msg_set_param(9)
  • struct venc_ap_ipi_msg_enc(9)
  • struct venc_ap_ipi_msg_enc_ext(9)
  • struct venc_ap_ipi_msg_enc_ext_34(9)
  • struct venc_ap_ipi_msg_deinit(9)
  • struct venc_vpu_ipi_msg_common(9)
  • struct venc_vpu_ipi_msg_init(9)
  • struct venc_vpu_ipi_msg_set_param(9)
  • enum venc_ipi_msg_enc_state(9)
  • struct venc_vpu_ipi_msg_deinit(9)

and that's the page!! πŸ’œ it came from ./drivers/media/platform/media... and it's dated October 2026, and the whole thing is filed under struct venc_vpu_ipi_msg_enc(9). mwah, go read the other structs, ily, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from