Framebuffer drivers depend heavily on four data structures, all defined in include/linux/fb.h, which is also the header you should include in your code in order to deal with framebuffer drivers:
#include <linux/fb.h>
These structures are fb_var_screeninfo, fb_fix_screeninfo, fb_cmap, and fb_info. The first three are made available to and from the user space code. Now let's describe the purpose of each structure, their meaning, and what they are used for:
- The kernel uses an instance of struct fb_var_screeninfo to hold variable properties of the video card. These values are those defined by the user, such as resolution depth:
struct fb_var_screeninfo { __u32 xres; /* visible resolution */ __u32 yres; __u32 xres_virtual; ...