One of the Linux Framebuffer driver Framework concept Introduction and LCD Hardware principle "turn"

Source: Internet
Author: User

This article was reproduced from: http://blog.csdn.net/liuxd3000/article/details/17464779

First, the basic concept

Frame buffering (Framebuffer) is an interface provided by the Linux system for display devices, which shows buffer abstraction, shielding the underlying differences in the image hardware, allowing the upper-level application to read and write directly to the display buffer in graphical mode. The user does not have to care about the physical display buffer location and storage method, which is done by the frame buffer device driver itself. For a framebuffer device, the corresponding color is automatically displayed on the screen whenever a color value is written to the region corresponding to the display buffer, and the next section focuses on the corresponding relationship between the buffer and the display point in the various modes.

/************************************************************************************************************** ********************/

Original works, when reproduced, please be sure to indicate the original source of the article in the form of hyperlinks: http://blog.csdn.net/gqb666/article/details/9338679, Author: gqb666
/************************************************************************************************************** ********************/

The frame buffer device is a standard character device and the main device number is 29, which corresponds to the/DEV/FBN device file. The application can output the video and image data to the display device by opening and reading this device file. In the next blog post will introduce the user state if the operation of the frame buffer device method, Linux abstracted out framebuffer this device for the user State process implementation of the direct write screen. The framebuffer mechanism simulates the function of the graphics card, abstracting the hardware structure of the graphics card, and can manipulate the memory directly through the reading and writing of Framebuffer. The user can view the framebuffer as an image of the display memory and map it to the process address space so that it can read and write directly, and the writes can be immediately reflected on the screen. This operation is abstract, unified, the user does not have to care about the physical memory location, the page change mechanism and so on specific details, these are driven by the framebuffer device to complete, but the framebuffer itself does not have any operational data capabilities, just like a temporary storage of water pool, The CPU will put the results of the operation into this pool, the pool will then stream the results to the display, the middle of the data will not be processed, the application can also directly read and write the contents of the pool. In an embedded system, there is typically no dedicated video memory, but only a section of the display buffer from the RAM (SDRAM) space, as shown in the typical structure:

The relationship between the display buffer and the display point

before describing the relationship between the display buffer and the display point, the next SOC or CPU supported color mode or color bit field is introduced. Color mode is a pixel of the three colors are composed of several data. As RGBA8888, a pixel is represented by a 32-bit data set, and red, green, blue, and transparency are 8 bits respectively. Or ARGB8888 is similar, just note the order and offset when you set the data structure. In the frame buffer device, the operation of the screen display point is done by reading and writing display buffer, in different color mode, the display buffer and the display point on the screen have different correspondence, showing a pixel point 8-bit and 16-bit case of the display buffer and display point of the corresponding relationship.

Third, the hardware principle of LCD and timing relationship

The monitor made of liquid crystal is called LCD, which can be divided into static drive, simple matrix drive, and active matrix drive by 3 kinds of drive mode. Among them, the simple matrix can be subdivided into torsional column type (TN) and ultra-torsional type (STN) 2, while the active matrix is based on thin-film transistor type (TFT). The following table lists the differences between these types of displays

An LCD screen requires not only an LCD driver, but also a corresponding LCD controller. Usually LCD drivers are COF/COG with LCD glass substrates, while LCD controllers are implemented by external circuitry. The LCD controller is integrated directly into many MCUs, and the STN and TFT screens can be conveniently controlled by the LCD controller.

TFT screen is the mainstream of the application of embedded system at present. The typical timing of TFT screen is given. The VCLK, Hcync, and vsync in the sequence diagram are the pixel clock signal (the pixel clock used to latch the image data), the line synchronization signal and the frame synchronization signal, the Vden is the data valid sign signal, the VD is the image data signal.

As the vsync of the frame synchronization signal, each pulse is emitted, which means that the new screen image data is sent to the screen, and as the hsync of the line synchronization signal, each pulse indicates that a new line of image data is started to be sent to the screen. There must be a back sweep time between frame synchronization and the tail of the line synchronization, that is, the (hbpd+1) and (hfpd+1) in the figure are the line sweep time, (vbpd+1) and (vfpd+1) are the frame sweep times. Such scheduling originates from the time required for the CRT's electronic gun deflection, but later becomes a de facto industry standard, so the TFT screen also contains the time to sweep back.

Gives a map of the actual LCD display of a frame of data. The upper and lower bounds are the back sweep time of the frame switch, the left and right boundary are the sweep time of the row switching, and the horizontal and frame synchronization are the time required by the line and frame synchronization respectively. X-res and Y-res are the horizontal and vertical resolution of the screen respectively.

Go to the next blog "Linux framebuffer Drive framework of the two software architecture ."

The following blog posts are available:

two software architectures of Linux framebuffer driver framework
Three related data structures of Linux Framebuffer driver framework
Linux Framebuffer Drive Frame four device driver interface
Implementation of five-DVI device driver for Linux Framebuffer Drive frame
Linux Framebuffer Driver Framework Six user-state operation Framebuffer

One of the Linux Framebuffer driver Framework concept Introduction and LCD Hardware principle "turn"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.