Framebuffer driver Framework for Linux driver framework

Source: Internet
Author: User

1. What is Framebuffer?

(1) framebuffer frame buffer (one screen data) (FB) is a virtual device in the Linux kernel, Framebuffer provides a unified standard interface display device to the application layer. Frame buffer (framebuffer)

is an interface provided by Linux for display devices, a device that abstracts the graphics memory, allowing the upper-level application to read and write directly to the display buffer in graphical mode. This operation is abstract and uniform. Use

You don't have to worry about the location of physical memory, the mechanism of page change, etc. These are all done by the framebuffer device driver.

(2) From the driver perspective, FB is a typical character device, and creates a class/sys/class/graphics

(3) Use of framebuffer

1): Open framebuffer device file:/dev/fb0

2): Get framebuffer device information #include <linux/fb.h>

3): Mmap do the mapping

4): Fill framebuffer

2. Initialization function of Framebuffer drive frame: fbmem_init

The code of the Framebuffer Driver Framework section is the same as the previous Misc drive frame and LED driver framework, and is implemented as a module that can be dynamically loaded and unloaded when the kernel is configured, and the benefits of the module have been mentioned before.

Fbmem_init Function Code Analysis:

3. Drive frame left to driver Engineer interface: Register_framebuffer (Unregister_framebuffer)

Driver Framework code is not related to the specific hardware operations, mainly software logic, providing service code. The driver engineer needs to invoke the interface function provided by the driver framework to register the driver and the device with the drive frame.

(1) An important structural body: struct FB_INFO

Framebuffer driver Framework for Linux driver framework

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.