Android4.0 framebuffer Study Notes (1)

Source: Internet
Author: User

1) related header files

Include/Linux/FB. h some key struct and macros; Drivers/Video/fbmem. c implements interfaces for device initialization, uninstallation, and file operations; Drivers/Video/xxxfb. c. Add a specific device driver file by yourself;

2) Key struct

Struct fb_var_screeninfo {} modifiable controller parameters; struct fb_fix_screeninfo {} Fixed controller parameters; unchangeable; struct fb_bitfield {} display the buffer organization mode in each pixel; struct fb_cmap {} describes device-independent color ing information; struct fb_info {includes struct fb_var_screeninfo var; struct fb_fix_screeninfo fix; struct fb_ops * fbops} the most critical data struct; each framebuffer device must correspond to an fb_info structure;
The abstraction of the underlying operations of struct fb_ops {} is different from that of file_operations. For the framebuffer device file_operations, The fb_info structure is also called;

3) Source Code call relationship

Drivers/Video/xxxfb. c => Drivers/Video/fbmem. C: The drivers/Video/xxxfb. c file is registered with fbmem. C to generate the/dev/FB * file;
Call relationship between the upper layer and the bottom layer: struct file_operations => struct fb_ops => struct fb_info
For example, the source code Drivers/Video/s3c2410fb. c
1)module_init(s3c2410fb_init);
 2)platform_driver_register(&s3c2410fb_driver);
3)static struct platform_driver s3c2410fb_driver = {    .probe      = s3c2410fb_probe,
4) return s3c24xxfb_probe(pdev, DRV_S3C2410);
5) fbinfo-> fbops = & s3c2410fb_ops; (the final fb_ops operation fb_info structure called );

Certificate ------------------------------------------------------------------------------------------------------------------------------------------------

Implementation source files related to OMAP:

1) Drivers/Video/omap2/omapfb/omapfb-main.c

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.