STRUCT MTK_JPEG_VARIANT(9)
okay so bestie, welcome to the Kernel API Manual section 9, where we're gonna talk about struct mtk_jpeg_variant π
this is the page for struct mtk_jpeg_variant(9) and it's literally the blueprint for a specific mtk jpeg driver variant, no cap.
β¨ NAME β¨
struct mtk_jpeg_variant β the mtk jpeg driver variant struct. it's giving "driver's little ID card plus toolbox" energy π like, every variant of the MediaTek JPEG hardware gets one of these to tell the driver what it's working with.
π SYNOPSIS π
struct mtk_jpeg_variant {
struct clk_bulk_data *clks;
int num_clks;
struct mtk_jpeg_fmt *formats;
int num_formats;
const struct vb2_ops *qops;
irqreturn_t (*irq_handler)(int irq, void *priv);
void (*hw_reset)(void __iomem *base);
const struct v4l2_m2m_ops *m2m_ops;
const char *dev_name;
const struct v4l2_ioctl_ops *ioctl_ops;
u32 out_q_default_fourcc;
u32 cap_q_default_fourcc;
bool multi_core;
void (*jpeg_worker)(struct work_struct *work);
bool support_34bit;
};
π Members π
clksβ the clock names β like, which clocks this variant needs to function, bestie πnum_clksβ the number of clocks β how many clocks there are, fr fr π’formatsβ the jpeg driver's internal color format β the secret sauce of how it sees colors πnum_formatsβ the number of formats β how many formats are in that list, periodt β¨qopsβ the callback for jpegvb2_opsβ the videobuf2 ops, iykyk πirq_handlerβ the jpeg IRQ handler callback β what runs when the hardware interrupts, like "hey bestie, I'm done" πhw_resetβ the jpeg hardware reset callback β the "turn it off and on again" function πm2m_opsβ the callback for jpegv4l2_m2m_opsβ memory-to-memory ops, the whole pipeline vibe π¦dev_nameβ the jpeg device name β literally the name of the device, its government name πioctl_opsβ the callback for jpegv4l2_ioctl_opsβ all the ioctl handlers, the control freak energy πout_q_default_fourccβ the output queue default fourcc β the pixel format the output queue starts with, no cap π§’cap_q_default_fourccβ the capture queue default fourcc β same vibe but for the capture side, periodt πmulti_coreβ a flag marking whether the jpeg hardware is multi-core or not β like, does it have main character energy with multiple cores? π₯jpeg_workerβ the jpeg decode or encode worker β the function that gets the work done, the backbone of the operation π€support_34bitβ a flag to check support for 34-bit DMA addresses β 34, not 32, not 64, exactly 34, iconic π
π¦ SEE ALSO π¦
go check out these other icons in ./drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h:
enum mtk_jpeg_ctx_state(9)struct mtk_jpegenc_clk(9)struct mtk_jpegdec_clk(9)struct mtk_jpegenc_comp_dev(9)struct mtk_jpegdec_comp_dev(9)struct mtk_jpeg_dev(9)struct mtk_jpeg_fmt(9)struct mtk_jpeg_q_data(9)struct mtk_jpeg_ctx(9)
and that's the whole vibe! this page is from ./drivers/media/platform/media... β October 2026, and it's literally called struct mtk_jpeg_variant(9) if you need to find it again. slay π
β¨
π¦ 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