STRUCT FIMC_FMT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct fimc_fmt(9)

okay bestie, welcome to the Kernel API Manual ✨ β€” this is the page for struct fimc_fmt(9), aka the color format data structure. it's giving "small struct, big responsibilities" and honestly? we love her for it. πŸŽ€


🌸 NAME 🌸

struct fimc_fmt β€” the color format data structure. that's it, that's the vibe. she holds the format tea and she holds it well. πŸ’–


✨ SYNOPSIS ✨

okay so here's the whole struct laid out, no cap, copy it verbatim bestie:

struct fimc_fmt {
    u32 mbus_code;
    u32 fourcc;
    u32 color;
    u16 memplanes;
    u16 colplanes;
    u8 colorspace;
    u8 depth[FIMC_MAX_PLANES];
    u16 mdataplanes;
    u16 flags;
  #define FMT_FLAGS_CAM           (1 << 0);
  #define FMT_FLAGS_M2M_IN        (1 << 1);
  #define FMT_FLAGS_M2M_OUT       (1 << 2);
  #define FMT_FLAGS_M2M           (1 << 1 | 1 << 2);
  #define FMT_HAS_ALPHA           (1 << 3);
  #define FMT_FLAGS_COMPRESSED    (1 << 4);
  #define FMT_FLAGS_WRITEBACK     (1 << 5);
  #define FMT_FLAGS_RAW_BAYER     (1 << 6);
  #define FMT_FLAGS_YUV           (1 << 7);
 };

those #defines live inside the struct body, and yes that's iconic of them 🫢. lowkey all those bit flags are doing the most, and we stan.


πŸ¦‹ Members πŸ¦‹

let's do a little meet-and-greet with every single member, because nobody gets left out on my watch πŸ’œ:

  • mbus_code β€” the media bus pixel code. if it doesn't apply? it's -1. simple as that, bestie.
  • fourcc β€” the fourcc code for this format. if it's not applicable, it's 0. no fourcc, no problem. πŸ™ˆ
  • color β€” the driver's own private color format id. very "my format, my rules" energy πŸ‘‘.
  • memplanes β€” number of physically non-contiguous data planes. like, the planes are not sitting next to each other, they're off doing their own thing πŸ’€.
  • colplanes β€” number of physically contiguous data planes. these ones ARE next to each other. squad goals. 🫢
  • colorspace β€” the v4l2 colorspace, written as V4L2_COLORSPACE_*. pick your palette, honey 🌈.
  • depth β€” per-plane driver's private "number of bits per pixel". note the depth[FIMC_MAX_PLANES] situation β€” one depth per plane, because obviously ✨.
  • mdataplanes β€” a bitmask marking the meta data plane(s), expressed as (1 << plane_no). bit shifting is her love language πŸ’….
  • flags β€” the flags that say which operation mode this format applies to. see all those FMT_FLAGS_* and friends up in the synopsis? yeah. that's her. πŸ”₯

🌟 SEE ALSO 🌟

  • Kernel file ./include/media/drv-intf/exynos-fimc.h and the page for struct fimc_source_info(9) β€” go read those too, bestie, they're part of the lore πŸ“–πŸ’–

a gentle reminder that this page is literally just the struct definition and its members β€” nothing extra, nothing hidden. what you see is what you get, fr fr. 🧚

and that's the whole page! 🌸 sourced from ./include/media/drv-intf, dated October 2026 β€” mwah, go forth and format your pixels, queen πŸ‘‘πŸ’…βœ¨

πŸ“¦ where this page comes from