STRUCT MTK_JPEG_VARIANT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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 jpeg vb2_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 jpeg v4l2_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 jpeg v4l2_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