| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 194 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 194 Page - STMicroelectronics |
|
194 / 245 page ![]() Audio/video drivers UM0851 194/245 Doc ID 16604 Rev 2 #setenv FRAMEBUFFER /dev/fb1(for csh users) Data structure of framebuffer ● The struct fb_info defines the current state of the video card. struct fb_info is only visible from the kernel. Inside struct fb_info, there is a struct fb_ops which is a collection of the functions needed to make the driver work. struct fb_info is the central data structure of framebuffer drivers. This structure is defined in include/linux/fb.h as follows: struct fb_info { /* ... */ struct fb_var_screeninfo var; /* Variable screen information*/ struct fb_fix_screeninfo fix; /* Fixed screen information*/ /* ... */ struct fb_cmap cmap; /* Color map*/ /* ... */ struct fb_ops *fbops; /* Driver operations*/ /* ... */ char __iomem *screen_base; /* Frame buffer's virtual address */ unsigned long screen_size; /* Frame buffer's size */ /* ... */ /* From here on everything is device dependent */ void *par; /* Private area */ } Memory for struct fb_info is allocated by framebuffer_alloc(), a library routine provided by the framebuffer core. This function also takes the size of a private area as an argument and appends it to the end of the allocated struct fb_info. This private area can be referenced using the par pointer in the struct fb_info. ● The user application program can use the ioctl () system call to perform low level operations on theLCD hardware. Methods defined in 'struct fb_ops' are used to support these operations. The struct fb_ops' structure contains the addresses of all entry points provided by the low-level framebuffer driver. The first few methods in struct fb_ops' are necessary for the functioning of the driver, while the remaining are optional ones that provide for graphics acceleration. The CLCD device driver fills this structure (with all hardware related routines) and exports it to framebuffer layer. The responsibility of each function is briefly explained within comments: struct fb_ops { struct module *owner; int (*fb_open)(struct fb_info *info, int user);/* Driver open */ int (*fb_release)(struct fb_info *info, int user);/* Driver close */ /* ... */ int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info); /* Sanity check on video parameters */ int (*fb_set_par)(struct fb_info *info); /* Configure the video controller registers */ int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info);/* Create pseudo color palette map */ int (*fb_blank)(int blank, struct fb_info *info);/* Blank/unblank display */ /* ... */ /* Accelerated method to fill a rectangle with pixel lines */ |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |