1. The LCD from the Perspective of Application Engineers
An LCD is composed of individual pixels: each row has xres pixels and there are yres rows, resulting in a resolution of: xres * yres.

2. How Colors are Represented in Pixels
Colors can be represented using red, green, and blue. This can be done using 24-bit data for RGB, or other formats such as:
* bpp: bits per pixel, the number of bits used to represent each pixel
* 24bpp: actually uses 32 bits, where 8 bits are unused, and the remaining 24 bits represent red (R), green (G), and blue (B) with 8 bits each
* 16bpp: includes rgb565, rgb555
* rgb565: uses 5 bits for red, 6 bits for green, and 5 bits for blue
* rgb555: in 16 bits, uses 5 bits for red, 5 bits for green, and 5 bits for blue, wasting one bit

3. How to Send Colors to the LCD
Assuming each pixel’s color is represented using 16 bits, and an LCD has xres * yres pixels,
the required memory is: xres * yres * 16 / 8, meaning this much memory is needed to set the color of all pixels.
This memory is referred to as the framebuffer:
* Each piece of data in the framebuffer corresponds to one pixel
* The size of each piece of data may be 16 bits or 32 bits, depending on the color format of the pixels on the LCD
* After setting up the LCD hardware, you only need to write the color data into the framebuffer

4. The LCD from the Perspective of Driver Engineers
Driver engineers need to understand the hardware in depth, for example, they need to answer these questions:
* Where is the framebuffer?
* Who sends the data from the framebuffer to the LCD?

5. Framebuffer Driver Program Framework

* Driver main device number
* Construct the file_operations structure, filling in open/read/write and other member functions
* Register the driver: register_chrdev(major, name, &fops)
* Entry function
* Exit function
6. Framebuffer Driver Program Framework
Divided into two layers:
* fbmem.c: serves as a bridge
* Implements and registers the file_operations structure
* Forwards APP calls down to the specific hardware driver
* xxx_fb.c: hardware-related driver
* Implements and registers the fb_info structure
* Implements hardware operations

Code Writing Process:
* Allocate fb_info
* framebuffer_alloc
* Set fb_info
* var
* fbops
* Hardware-related operations
* Register fb_info
* register_framebuffer