STRUCT MSM_FORMAT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

struct msm_format β€” the struct that defines the format configuration, bestie. it's the whole vibe check for how a pixel format gets described, no cap ✨

this one lives in the struct msm_format(9) section of the Kernel API Manual btw, so you know exactly where to find it πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the whole struct laid out, copy it exactly, don't @ me:

struct msm_format {
    uint32_t pixel_format;
    enum mdp_bpc bpc_g_y, bpc_b_cb, bpc_r_cr;
    enum mdp_bpc_alpha bpc_a;
    u8 element[4];
    enum mdp_fetch_type fetch_type;
    enum mdp_chroma_samp_type chroma_sample;
    bool alpha_enable;
    u8 unpack_count;
    u8 bpp;
    unsigned long flags;
    u8 num_planes;
    enum mdp_fetch_mode fetch_mode;
    u16 tile_height;
 };

🌸 Members 🌸

like. every field is a little icon in its own right, so let's go through them one by one πŸ’–

  • pixel_format β€” the format fourcc, literally the ID card of the format πŸͺͺ
  • bpc_g_y β€” element bit widths: the BPC for G or Y πŸ‘‘
  • bpc_b_cb β€” element bit widths: the BPC for B or Cb 🌈
  • bpc_r_cr β€” element bit widths: the BPC for R or Cr πŸ“
  • bpc_a β€” element bit widths: the BPC for the alpha channel, yes alpha gets its own field, main character energy πŸ’…
  • element β€” element color ordering, aka who stands where in the lineup ✨
  • fetch_type β€” how the color components are packed in pixel format, the packing lore πŸ“¦
  • chroma_sample β€” chroma sub-samplng type (their spelling, not mine, keeping it fr fr) πŸŒ€
  • alpha_enable β€” whether the format has an alpha channel, bool so it's a yes or a no babe 🫢
  • unpack_count β€” number of the components to unpack, count 'em πŸ”’
  • bpp β€” bytes per pixel, the classic πŸ“
  • flags β€” usage bit flags, little bitty flags doing their thing 🚩
  • num_planes β€” number of planes (including meta data planes), meta data planes count too, don't forget 😭
  • fetch_mode β€” linear, tiled, or ubwc hw fetch behavior β€” three modes, all iconic in their own way πŸ”₯
  • tile_height β€” format tile height, the height of the tile, that's it that's the field 🧚

⭐ SEE ALSO ⭐

if you wanna go deeper (and you do, i know you do), the kernel file is right here:

  • Kernel file ./drivers/gpu/drm/msm/disp/mdp_format.h β€” go read it, it's giving source of truth πŸ’œ

ngl bestie, that's the whole struct. every field accounted for, nothing skipped, nothing invented. ate and left no crumbs πŸ“

okay that's a wrap!! this was struct msm_format(9) from ./drivers/gpu/drm/msm/disp, dated October 2026 β€” go forth and format responsibly, ily, bye πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from