STRUCT MTK_MMSYS_DRIVER_DATA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 in drivers/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 the routes. 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_LEN setting was introduced to solve the problem, and it's given 0x40 (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