STRUCT MTK_MDP_FMT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct mtk_mdp_fmt β€” the driver's internal color format data ✨

okay so this is from the Kernel API Manual, and bestie, it's literally the little struct that holds the driver's own private notes about a color format πŸŽ€ no cap, it's the backstage pass to how MediaTek's MDP driver thinks about pixels.


🌸 NAME 🌸

struct mtk_mdp_fmt β€” the driver's internal color format data. that's it, that's the vibe πŸ’–


✨ SYNOPSIS ✨

struct mtk_mdp_fmt {
    u32 pixelformat;
    u16 num_planes;
    u16 num_comp;
    u8 depth[VIDEO_MAX_PLANES];
    u8 row_depth[VIDEO_MAX_PLANES];
    u32 flags;
    struct mtk_mdp_pix_align *align;
 };

like, look at her. seven fields. main character energy πŸ‘‘


πŸ¦‹ Members πŸ¦‹

  • pixelformat β€” the fourcc code for this format, and it's 0 if not applicable πŸ’« iykyk, if it's zero it's giving "this format isn't a thing here".
  • num_planes β€” number of physically non-contiguous data planes πŸ“ like, how many separate chunks of memory the data actually lives in.
  • num_comp β€” number of logical data planes 🌸 logical, not physical β€” do not mix these up bestie, they are not the same number and the driver keeps them straight.
  • depth β€” per plane driver's private 'number of bits per pixel' ✨ it's an array over the planes, one private lil depth value each.
  • row_depth β€” per plane driver's private 'number of bits per pixel per row' πŸ”₯ yes, per row this time, not per pixel. the driver's private business, again per plane.
  • flags β€” flags indicating which operation mode format applies to πŸŽ€ the two icons are:
    • MTK_MDP_FMT_FLAG_OUTPUT is used in OUTPUT stream
    • MTK_MDP_FMT_FLAG_CAPTURE is used in CAPTURE stream
ngl these flags are the whole mood β€” they tell you which stream the format belongs to, and you genuinely cannot skip reading them πŸ’…
  • align β€” pointer to a pixel alignment struct, NULL if using default value 🧚 so if it's NULL don't panic, that just means "defaults, bestie".

πŸ’œ SEE ALSO πŸ’œ

Kernel file ./drivers/media/platform/mediatek/mdp/mtk_mdp_core.h, plus the whole friend group: struct mtk_mdp_pix_align(9), struct mtk_mdp_addr(9), struct mtk_mdp_frame(9), struct mtk_mdp_variant(9), struct mtk_mdp_dev(9), struct mtk_mdp_ctx(9) 🌈 β€” go read them, they all hang out together fr fr.


ok that's the whole page, no notes πŸ’€ every field accounted for, nothing skipped, we ate and left no crumbs 🫢

sourced from ./drivers/media/platform/media..., October 2026 β€” and yeah, this is struct mtk_mdp_fmt(9) signing off, mwah πŸ’‹

πŸ“¦ where this page comes from