STRUCT MTK_VPU(9)
π struct mtk_vpu(9)
okay so this is a page from the Kernel API Manual, and bestie, we are about to get so acquainted with the VPU driver data struct. no cap, it's a good one. π«Ά
πΈ NAME πΈ
struct mtk_vpu β literally just the vpu driver data. that's the whole vibe. β¨
π SYNOPSIS π
struct mtk_vpu {
struct vpu_mem extmem[2];
struct vpu_regs reg;
struct vpu_run run;
struct vpu_wdt wdt;
struct vpu_ipi_desc ipi_desc[IPI_MAX];
struct share_obj __iomem *recv_buf;
struct share_obj __iomem *send_buf;
struct device *dev;
struct clk *clk;
bool fw_loaded;
bool enable_4GB;
struct mutex vpu_mutex;
u32 wdt_refcnt;
wait_queue_head_t ack_wq;
bool ipi_id_ack[IPI_MAX];
};
like, look at her. iconic struct. no notes. π
π¦ Members π¦
β¨ the actual members, one by one β¨
extmemβ the VPU extended memory information. extra memory, extra slay. πregβ the VPU TCM and configuration registers. very official. very main character. βrunβ the VPU initialization status. is she up? is she running? this knows. π₯wdtβ the VPU watchdog workqueue. someone's gotta watch, fr fr. πipi_descβ the VPU IPI descriptor. πrecv_bufβ the VPU DTCM share buffer for receiving. β οΈ heads up: the receive buffer is only accessed in interrupt context. that's not a suggestion, that's the rule. πsend_bufβ the VPU DTCM share buffer for sending. the outgoing bestie. π¦devβ the VPUstruct device. the whole identity tbh. πΈclkβ the VPU clock on/off. turn it up. π₯fw_loadedβ indicates the VPU firmware is loaded. βenable_4GBβ VPU 4GB mode on/off. 4GB mode is either giving or it isn't. πvpu_mutexβ protectsmtk_vpu(exceptrecv_buf) and makes sure only one client uses the VPU service at a time. for example: suppose a client is using the VPU to decode VP8. if the other client wants to encode VP8, it has to wait until VP8 decode completes. no cutting the line, periodt. π§wdt_refcntβ the WDT reference count, which makes sure the watchdog can be disabled if no other client is using the VPU service. π§ack_wqβ the wait queue for each codec and mdp. when sleeping processes wake up, they check the conditionipi_id_ackto run the corresponding action or go back to sleep. like a group chat notification β you check it, then maybe you go back to bed. πipi_id_ackβ the ACKs for the registered IPI function sending an interrupt to the VPU. π¬
π SEE ALSO π
- the kernel file
./drivers/media/platform/mediatek/vpu/mtk_vpu.c enum vpu_fw_type(9)struct vpu_mem(9)struct vpu_regs(9)struct vpu_wdt_handler(9)struct vpu_wdt(9)struct vpu_run(9)struct vpu_ipi_desc(9)struct share_obj(9)
go read those too, iykyk. π«Ά
π and that's the page, bestie! it came from ./drivers/media/platform/media... and it's dated October 2026. catch you in the next manpage, mwah πβ¨
π¦ 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