October 2017
Intermediate to advanced
586 pages
14h 8m
English
The fb_ops->fb_check_var hook is responsible for checking framebuffer parameters. Its prototype is as follows:
int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info);
This function should check framebuffer variable parameters and adjust to valid values. var represents the framebuffer variable parameters, which should be checked and adjusted:
static int myfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) { if (var->xres_virtual < var->xres) var->xres_virtual = var->xres; if (var->yres_virtual < var->yres) var->yres_virtual = var->yres; if ((var->bits_per_pixel != 32) && (var->bits_per_pixel != 24) && (var->bits_per_pixel != 16) && (var->bits_per_pixel != 12) && (var->bits_per_pixel != ...Read now
Unlock full access