STRUCT MTK_JPEG_CTX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so bestie, welcome to the Kernel API Manual β€” this little cutie is struct mtk_jpeg_ctx, and it's literally the device context data. that's the whole vibe. it's the main character struct that holds all the state for one JPEG device context πŸŽ€


✨ SYNOPSIS ✨

struct mtk_jpeg_ctx {
    struct mtk_jpeg_dev             *jpeg;
    struct mtk_jpeg_q_data          out_q;
    struct mtk_jpeg_q_data          cap_q;
    struct v4l2_fh                  fh;
    enum mtk_jpeg_ctx_state         state;
    bool enable_exif;
    u8 enc_quality;
    u8 restart_interval;
    struct v4l2_ctrl_handler ctrl_hdl;
    struct work_struct jpeg_work;
    u32 total_frame_num;
    struct list_head dst_done_queue;
    spinlock_t done_queue_lock;
    u32 last_done_frame_num;
 };

no cap, that's the whole struct πŸ’…


🌸 Members 🌸

okay so member by member, here's the tea:

  • jpeg β€” the JPEG IP device for this context. like, the actual hardware bae this whole thing belongs to 🫢
  • out_q β€” source (output) queue information
  • cap_q β€” destination queue information
  • fh β€” the V4L2 file handle
  • state β€” the state of the context (iykyk, it's giving "where are we at rn")
  • enable_exif β€” enables exif mode of the jpeg encoder ✨
  • enc_quality β€” jpeg encoder quality
  • restart_interval β€” jpeg encoder restart interval
  • ctrl_hdl β€” controls handler
  • jpeg_work β€” jpeg encoder workqueue (she's working, periodt πŸ’…)
  • total_frame_num β€” encoded frame number
  • dst_done_queue β€” encoded frame buffer queue
  • done_queue_lock β€” encoded frame operation spinlock πŸ”’
  • last_done_frame_num β€” the last encoded frame number

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h enum mtk_jpeg_ctx_state(9), struct mtk_jpeg_variant(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)

like, go read the whole friend group, they all ate πŸ”₯


bestie this one's short and sweet β€” no scary warnings, no deprecated drama, just a struct living her best life in the MediaTek JPEG driver 🌈

and that's the page! shoutout to ./drivers/media/platform/media... for the source, version vibes from October 2026 πŸ“…, and the icon herself, struct mtk_jpeg_ctx(9) β€” she's booked, she's blessed, she's in the kernel πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from