STRUCT MTK_JPEGENC_COMP_DEV(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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

okay so bestie, welcome to the Kernel API Manual, section 9 β€” this is literally the whole page about struct mtk_jpegenc_comp_dev, and yes it's giving main character energy for the JPEG COREX abstraction. no cap, it's a struct, it's important, let's get into it 🫢


✨ NAME ✨

struct mtk_jpegenc_comp_dev β€” JPEG COREX abstraction

like... that's the whole vibe. it abstracts the COREX. iconic. πŸ’…


🌸 SYNOPSIS 🌸

struct mtk_jpegenc_comp_dev {
    struct device *dev;
    struct platform_device *plat_dev;
    void __iomem *reg_base;
    struct mtk_jpeg_dev *master_dev;
    struct mtk_jpegenc_clk venc_clk;
    int jpegenc_irq;
    struct delayed_work job_timeout_work;
    struct mtk_jpeg_hw_param hw_param;
    enum mtk_jpeg_hw_state hw_state;
    spinlock_t hw_lock;
 };

that's the whole shape of it, copy it exactly bestie, don't be out here renaming fields 😭


πŸŽ€ Members πŸŽ€

okay so every single field, one by one, no skipping, we are NOT summarising the boring parts:

  • dev β€” JPEG device. that's the device pointer, she's the entry point πŸ’–
  • plat_dev β€” platform device data. the platform-device bestie 🌸
  • reg_base β€” JPEG registers mapping. this is the void __iomem * where the registers live, so like… treat it with respect ✨
  • master_dev β€” mtk_jpeg_dev device. the master device, the parent, the one in charge πŸ‘‘
  • venc_clk β€” jpeg encode clock. clock stuff for the encode side πŸ•
  • jpegenc_irq β€” jpeg encode irq num. it's an int, it's the interrupt number, that's the whole gig πŸ”₯
  • job_timeout_work β€” encode timeout workqueue. a struct delayed_work that handles when encoding times out (dramatic, but necessary) ⏰
  • hw_param β€” jpeg encode hw parameters. all the hardware params, bundled πŸ’…
  • hw_state β€” record hw state. an enum mtk_jpeg_hw_state, keeping receipts of where the hw is at πŸ“
  • hw_lock β€” spinlock protecting the hw device resource. it's a spinlock_t and it protects the hw device resource β€” respect the lock or perish, fr fr πŸ”’
lowkey do NOT touch hw_lock-protected stuff without holding hw_lock, the original says it protects the hw device resource and we're taking that literally πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group, literally:

  • Kernel file ./drivers/media/platform/mediatek/jpeg/mtk_jpeg_core.h enum mtk_jpeg_ctx_state(9)
  • mtk_jpeg_variant(9)
  • mtk_jpegenc_clk(9)
  • mtk_jpegdec_clk(9)
  • mtk_jpegdec_comp_dev(9)
  • mtk_jpeg_dev(9)
  • mtk_jpeg_fmt(9)
  • mtk_jpeg_q_data(9)
  • mtk_jpeg_ctx(9)

go read them, iykyk πŸ“šβœ¨


aaaand that's the page!! mwah πŸ’‹ source/version is ./drivers/media/platform/media... and it's dated October 2026, so like, see you in the future bestie πŸŒˆβ­πŸ’œ β€” struct mtk_jpegenc_comp_dev(9) OUT πŸŽ€

πŸ“¦ where this page comes from