STRUCT MSM_FORMAT(9)
π 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,boolso 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
- 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