vsp1_get_fo...nfo_by_index(9)
π
vsp1_get_fo...nfo_by_index β the vsp1_get_format_info_by_index(9) glow-up
okay bestie, so this is a page from the Kernel API Manual β yes the actual one, the (9) girlies β and today's main character is vsp1_get_format_info_by_index. she's a tiny helper in the VSP1 media world and honestly she ate. let's get into it π
β¨ NAME β¨
vsp1_get_format_info_by_index β literally just enumerate format information, that's her whole job π
π¦ SYNOPSIS π¦
const struct vsp1_format_info * vsp1_get_format_info_by_index (struct
vsp1_device *vsp1 , unsigned int index , u32 code );
like yes, she returns a const struct vsp1_format_info *, and yes, those params are exactly what you think π«Ά
πΈ ARGUMENTS πΈ
vsp1β the VSP1 device. the main character of the wider story ngl.indexβ the format index. it's giving "which one tho" β¨codeβ media bus code, used to limit the enumeration. she's picky on purpose π
π₯ DESCRIPTION π₯
so what she does is: return a pointer to the format information structure that corresponds to the given index. iconic. correct. no notes.
but β and this is the important part β she returns NULL if the index exceeds the supported formats list π so always vibe check your index before you dereference, fr fr.
and if the code parameter is not zero, then only the formats compatible with that media bus code get enumerated. like she filters, she curates, she serves π if code is zero, no filtering, everything's invited to the party.
β οΈ please internalise that NULL case, bestie. that's the whole safety briefing. no cap.
π SEE ALSO π
kernel file over here, go read it:
./drivers/media/platform/renesas/vsp1/vsp1_pipe.c
and her two friends, both (9):
β¨ that's the whole page β¨ no crumbs left, every detail preserved, we love a thorough queen.
this little gem lives at ./drivers/media/platform/renes... and the date on it is October 2026 β so yeah, mark your calendar, she's from the future π¦π byeee π«Ά
π¦ 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