STRUCT MTK_MMSYS_DRIVER_DATA(9)
πΈ NAME πΈ
struct mtk_mmsys_driver_data β literally the settings of the mmsys, that's the whole vibe π
This is a page from the Kernel API Manual, section 9, bestie. Buckle up π
β¨ SYNOPSIS β¨
struct mtk_mmsys_driver_data {
const char *clk_driver;
const struct mtk_mmsys_routes *routes;
const unsigned int num_routes;
const u16 sw0_rst_offset;
const u8 *rst_tb;
const u32 num_resets;
const bool is_vppsys;
const u8 vsync_len;
};
Like, that's the whole struct, and it's giving "small but iconic" β¨
π«Ά Members π«Ά
clk_driverβ the name of the clock driver that the mmsys is using. It's defined over indrivers/clk/mediatek/clk-*.c, iykyk πroutesβ the routing table of the mmsys. Basically it hands you the mux settings that go from one module to another πnum_routesβ the array size of theroutes. Yes bestie, the count. It's a count πsw0_rst_offsetβ the register offset for the reset control βnum_resetsβ how many reset bits are defined. That's it. That's the number πis_vppsysβ whether the mmsys is VPPSYS (Video Processing Pipe) or VDOSYS (Video). Only VDOSYS needs to be added to the drm driver, so pay attention here πvsync_lenβ the VSYNC length of the MIXER. Okay so this one needs a whole story, grab a snack π- VSYNC is usually triggered by the connector, so its length is a fixed value once the frame rate is decided. Simple, right?
- BUT ETHDR and MIXER generate their own VSYNC because of the hardware design, so MIXER has to sync with ETHDR by adjusting the VSYNC length. Teamwork fr fr π«Ά
- On MT8195 there's no such setting, so they use the gap between the falling edge and the rising edge of the SOF (Start of Frame) signal to do the job. Respect the hustle, but also π
- Since MT8188 though?
VSYNC_LENsetting was introduced to solve the problem, and it's given0x40(ticks) as the default value. Slay β¨ - > β οΈ Heads up, and this part is important: this value has to be set to
1(minimum) if ETHDR is bypassed. Otherwise MIXER could wait too long and cause underflow π no cap, don't skip this one.
Quick honest note: rst_tb is chillin' in the struct up there but the page never describes it, so I'm not gonna make stuff up about it π
π Description π
Each MMSYS (multi-media system) may have different settings. They may use different clock sources, different mux settings, different reset control, ...etc., and all of those differences are stored right here in this struct. It's basically the group chat of "every mmsys is a little different" and this struct is where all the lore lives π
π¦ SEE ALSO π¦
- Kernel file
./drivers/soc/mediatek/mtk-mmsys.hβ go read it, bestie, it's right there π
That's the whole page! Source path ./drivers/soc/mediatek, dated October 2026, page struct mtk_m..._driver_data(9) β mwah, hope this helped, go be a main character in the kernel ππ§ββοΈπ
π¦ 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