STRUCT MTK_JPEGENC_COMP_DEV(9)
π 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 thevoid __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 anint, it's the interrupt number, that's the whole gig π₯job_timeout_workβ encode timeout workqueue. astruct delayed_workthat handles when encoding times out (dramatic, but necessary) β°hw_paramβ jpeg encode hw parameters. all the hardware params, bundled πhw_stateβ record hw state. anenum mtk_jpeg_hw_state, keeping receipts of where the hw is at πhw_lockβ spinlock protecting the hw device resource. it's aspinlock_tand it protects the hw device resource β respect the lock or perish, fr fr π
lowkey do NOT touchhw_lock-protected stuff without holdinghw_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.henummtk_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
- 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