drm_sysfb_build_fourcc_list(9)
โจ drm_sysfb_build_fourcc_list ๐
okay so bestie, welcome to the drm_sysfb_build_fourcc_list(9) page of the Kernel API Manual โ yes that's the manual name, and yes we're diving straight in because this one's actually kind of a bop ๐
๐ธ NAME ๐ธ
drm_sysfb_build_fourcc_list โ it filters a list of supported color formats against the device's native formats, no cap โจ
๐ฆ SYNOPSIS ๐ฆ
size_t drm_sysfb_build_fourcc_list (struct drm_device *dev , const u32
*native_fourccs , size_t native_nfourccs , u32 *fourccs_out , size_t
nfourccs_out );
like, that's the whole signature, take it in, it's giving function ๐
๐ ARGUMENTS ๐
devโ the DRM device itself, the main character ๐native_fourccsโ the 4CC codes of natively supported color formats ๐ผ๏ธnative_nfourccsโ the number of entries innative_fourccs, literally just the count ๐งฎfourccs_outโ where the 4CC codes of supported color formats get returned to you ๐ซถnfourccs_outโ the number of available entries infourccs_out, so it knows how much room it's got ๐ธ
๐ DESCRIPTION ๐
So this function creates a list of supported color formats from the natively supported formats plus some additional emulated formats. periodt โจ
At a minimum, most userspace programs expect at least support for XRGB8888 on the primary plane โ that's the floor, bestie, don't go below it ๐ญ
Sysfb devices that have to emulate the format should use drm_sysfb_build_fourcc_list to create a list of supported color formats. The returned list can be handed over to drm_universal_plane_init et al. โ yes, "et al.", very fancy ๐
Now the important ranking tea โ:
- Native formats will go before emulated formats. native stays winning ๐ฅ
- Native formats with an alpha channel will be replaced by equal formats without an alpha channel, because primary planes usually don't support alpha ๐
- Other heuristics might be applied to optimize the sorting order โ so the order isn't totally fixed, iykyk ๐คซ
- Formats near the beginning of the list are usually preferred over formats near the end of the list. front of the line = main character energy ๐ฅ
โญ RETURN โญ
It returns the number of color-formats 4CC codes returned in fourccs_out. that's it, that's the return value, slay ๐ซ
๐ SEE ALSO ๐
- Kernel file
./drivers/gpu/drm/sysfb/drm_sysfb_modeset.cโ go read it, it's right there ๐ฆ
๐ heads up: the sorting order involves heuristics, so "might be applied" means might โ don't go assuming a guaranteed order beyond what's written here, fr fr.
and that's the page!! brought to you by ./drivers/gpu/drm/sysfb, dated October 2026 โ mwah, go build those fourcc lists bestie ๐ซถ๐โจ
๐ฆ 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