If the application needs to know about the parameters of the framebuffer device, it must be done through the IOCTL () system call.
All the IOCTL command words are defined in header file <linux/fb.h>, however, the most common IOCTL command word is the following two: Fbioget_fscreeninfo and Fbioget_vscreeninfo.
The former returns fixed information related to framebuffer, the size of the actual frame cache space on the specific hardware, and the ability to accelerate the hardware.
The latter returns variable information that is related to framebuffer.
The variable is because the same graphics hardware can work in different modes.
In short, a hardware that supports 1024x768x24 graphics mode can often work in 800x600x16 graphics mode.
Variable information refers to information such as the length, width, and color depth of the framebuffer.
The two command-word-related structures are two: struct fb_fix_screeninfo and struct fb_var_screeninfo.
Both structures are large, which are used to hold fixed information about the framebuffer device, which is used to hold variable information about the framebuffer device.
These two structures are used when the IOCTL () is called.
The following fields of struct fb_var_screeninfo are commonly used in applications:
Xres, Yres, Bits_per_pixel, respectively, represent the resolution of the x-axis, the resolution of the y-axis, and the color depth per pixel (in units of color depth bit/pixel), whose type definitions are unsigned 32-bit integers.
Http://hi.baidu.com/atoe/blog/item/e8da6416912a8a4a20a4e94f.html
Http://hi.baidu.com/excellentderek/blog/item/f387e64e24b713cdd0c86a59.html
Fundamentals of graphic system development (very detailed)
Http://linux.chinaunix.net/bbs/thread-1063136-1-1.html
Linux-framebuffer Equipment Related parameters