STRUCT MTK_MDP_FMT(9)
π 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's0if 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_OUTPUTis used in OUTPUT streamMTK_MDP_FMT_FLAG_CAPTUREis 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,NULLif using default value π§ so if it'sNULLdon'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
- 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