STRUCT MTK_JPEG_DEV(9)
π NAME π
okay so bestie, this is struct mtk_jpeg_dev(9) from the Kernel API Manual, and it is literally the JPEG IP abstraction. main character energy for the JPEG situation, no cap. π
β¨ SYNOPSIS β¨
here's the whole struct, exactly as it is, no edits, no chaos:
struct mtk_jpeg_dev {
struct mutex lock;
spinlock_t hw_lock;
struct workqueue_struct *workqueue;
struct device *dev;
struct v4l2_device v4l2_dev;
struct v4l2_m2m_dev *m2m_dev;
void *alloc_ctx;
struct video_device *vdev;
void __iomem *reg_base;
struct delayed_work job_timeout_work;
const struct mtk_jpeg_variant *variant;
void __iomem *reg_encbase[MTK_JPEGENC_HW_MAX];
struct mtk_jpegenc_comp_dev *enc_hw_dev[MTK_JPEGENC_HW_MAX];
wait_queue_head_t hw_wq;
atomic_t hw_rdy;
void __iomem *reg_decbase[MTK_JPEGDEC_HW_MAX];
struct mtk_jpegdec_comp_dev *dec_hw_dev[MTK_JPEGDEC_HW_MAX];
atomic_t hw_index;
};
look at all those fields β she's booked and busy π
π Members π
lockβ the mutex protecting this structure. yes ma'am, mutual exclusion but make it fashion.hw_lockβ the spinlock protecting the hw device resource. tiny, fierce, doing the most.workqueueβ the decode work queue. periodt.devβ the JPEG device.v4l2_devβ the v4l2 device for mem2mem mode.m2m_devβ the v4l2 mem2mem device data.alloc_ctxβ the videobuf2 memory allocator's context. the way that apostrophe is carrying the whole sentence πvdevβ the video device node for jpeg mem2mem mode.reg_baseβ the JPEG registers mapping.job_timeout_workβ the IRQ timeout structure. keeping track, bestie.variantβ the driver variant to be used.reg_encbaseβ the jpg encode register base addr.enc_hw_devβ the jpg encode hardware device.hw_wqβ the jpg wait queue.hw_rdyβ the jpg hw ready flag.reg_decbaseβ the jpg decode register base addr.dec_hw_devβ the jpg decode hardware device.hw_indexβ the jpg hw index.
π₯ SEE ALSO π₯
kernel file ./drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h enum β and these references too, bestie, go read them:
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_fmt(9)struct mtk_jpeg_q_data(9)struct mtk_jpeg_ctx(9)
signed off from ./drivers/media/platform/media..., dated October 2026 β still serving struct mtk_jpeg_dev(9), still iconic π
π¦ 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