Skip to Content
Linux Device Drivers Development
book

Linux Device Drivers Development

by John Madieu
October 2017
Intermediate to advanced
586 pages
14h 8m
English
Packt Publishing
Content preview from Linux Device Drivers Development

Driver data structures

Framebuffer drivers depend heavily on four data structures, all defined in include/linux/fb.h, which is also the header you should include in your code in order to deal with framebuffer drivers:

#include <linux/fb.h> 

These structures are fb_var_screeninfo, fb_fix_screeninfo, fb_cmap, and fb_info. The first three are made available to and from the user space code. Now let's describe the purpose of each structure, their meaning, and what they are used for:

  1. The kernel uses an instance of struct fb_var_screeninfo to hold variable properties of the video card. These values are those defined by the user, such as resolution depth:
struct fb_var_screeninfo { __u32 xres; /* visible resolution */ __u32 yres; __u32 xres_virtual; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Device Drivers, Second Edition

Linux Device Drivers, Second Edition

Jonathan Corbet, Alessandro Rubini
Linux Device Drivers, 3rd Edition

Linux Device Drivers, 3rd Edition

Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman

Publisher Resources

ISBN: 9781785280009Supplemental Content