get_line_length(9)
π get_line_length β Kernel API Manual β¨
okay bestie, welcome to the get_line_length glow-up π this lil function lives in the Kernel API Manual (yes, the big-league kernel docs, we're literally in there) and it's about to tell you exactly how many bytes wide your buffer pitch is. no cap. π
πΈ NAME πΈ
get_line_length β calculates buffer pitch in bytes π«
β¨ SYNOPSIS β¨
u32 get_line_length (struct i810fb_par *par , int xres_virtual , int bpp
);
like, she takes three things and gives you back a u32. iconic behavior honestly π«Ά
π¦ ARGUMENTS π¦
parβ a pointer to thestruct i810fb_parstructure. that's your whole vibe-holding struct, she needs it πxres_virtualβ the virtual resolution of the frame. yes, virtual, not the regular one, read the name bestie πbppβ bits per pixel. the tiny unit that decides how thicc each pixel is π
π DESCRIPTION π
She calculates the buffer pitch, in bytes. that's it. that's the whole job. lowkey a queen for doing one thing and doing it flawlessly πβ¨
π₯ SEE ALSO π₯
so the kernel file we're talking about is ./drivers/video/fbdev/i810/i810_main.c β go read it if you're feeling brave π and then there's the whole friend group, the entire i810fb squad, all referenced here fr fr:
i810_screen_off(9)i810_dram_off(9)i810_protect_regs(9)i810_load_pll(9)i810_load_vga(9)i810_load_vgax(9)i810_load_2d(9)i810_hires(9)i810_load_pitch(9)i810_load_color(9)i810_load_regs(9)i810_calc_dclk(9)i810_enable_cursor(9)i810_init_cursor(9)i810_round_off(9)set_color_bitfields(9)i810_check_params(9)encode_fix(9)decode_var(9)i810fb_getcolreg(9)i810_init_monspecs(9)i810_init_defaults(9)i810_init_device(9)
not a single one skipped, we don't do that here ππ
and that's the page!! mwah π«Ά this lil rewrite came straight out of ./drivers/video/fbdev/i810 and it's dated October 2026 β bestie, mark your calendar, we are so ahead of schedule πβ byeeee π
π¦ 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