xxxfb_set_par(9)
xxxfb_set_par(9) β¨ Kernel API Manual β¨ bestie edition
πΈ NAME πΈ
xxxfb_set_par β the optional function that alters the hardware state. slay.
π¦ SYNOPSIS π¦
int xxxfb_set_par (struct fb_info *info );
π ARGUMENTS π
infoβ the frame buffer structure that represents a single frame buffer π«Ά
π DESCRIPTION π
Okay so using the fb_var_screeninfo in fb_info, we set the resolution of this particular framebuffer. This function alters the par AND the fb_fix_screeninfo stored in fb_info. It does not alter var in fb_info, because we are literally using that data already. Which means we depend on the data in var inside fb_info being supported by the hardware. iykyk.
This function is also used to recover/restore the hardware to a known working state. β¨
xxxfb_check_var is always called before xxxfb_set_par to ensure that the contents of var is always valid. always, bestie.
Again, if you canβt change the resolution, you donβt need this function.
However β and this is the important plot twist β even if your hardware does not support mode changing, a set_par might be needed to at least initialize the hardware to a known working state, especially if it came back from another process that also modifies the same hardware, such as X. main character hardware behavior, honestly.
If this is the case, a combination such as the following should work:
static int xxxfb_check_var(struct fb_var_screeninfo *var, struct fb_info
*info) { *var = info->var; return 0; }
static int xxxfb_set_par(struct fb_info *info) { init your hardware here
}
Returns negative errno on error, or zero on success. π
π₯ SEE ALSO π₯
Kernel file ./drivers/video/fbdev/skeletonfb.c β then the whole friend group: xxxfb_open(9), xxxfb_release(9), xxxfb_check_var(9), xxxfb_setcolreg(9), xxxfb_pan_display(9), xxxfb_blank(9), xxxfb_fillrect(9), xxxfb_copyarea(9), xxxfb_imageblit(9), xxxfb_cursor(9), xxxfb_sync(9), xxxfb_suspend(9), xxxfb_resume(9), xxxfb_suspend(9), xxxfb_resume(9). yes, suspend and resume are listed twice β iconic, not a typo weβre fixing.
source/version: ./drivers/video/fbdev Β· October 2026 π«Άπ
π¦ 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