xxxfb_set_par(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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