blob: 696b50aa7c2490ec4a582fe1989d64e62b7768c7 [file] [log] [blame]
Mauro Carvalho Chehabab42b812019-06-12 14:52:45 -03001=============================
2Frame Buffer device internals
3=============================
Linus Torvalds1da177e2005-04-16 15:20:36 -07004
5This is a first start for some documentation about frame buffer device
6internals.
7
Mauro Carvalho Chehabab42b812019-06-12 14:52:45 -03008Authors:
9
10- Geert Uytterhoeven <geert@linux-m68k.org>, 21 July 1998
11- James Simmons <jsimmons@user.sf.net>, Nov 26 2002
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
13--------------------------------------------------------------------------------
14
Mauro Carvalho Chehabab42b812019-06-12 14:52:45 -030015Structures used by the frame buffer device API
16==============================================
Linus Torvalds1da177e2005-04-16 15:20:36 -070017
18The following structures play a role in the game of frame buffer devices. They
19are defined in <linux/fb.h>.
20
211. Outside the kernel (user space)
22
23 - struct fb_fix_screeninfo
24
25 Device independent unchangeable information about a frame buffer device and
26 a specific video mode. This can be obtained using the FBIOGET_FSCREENINFO
27 ioctl.
28
29 - struct fb_var_screeninfo
30
31 Device independent changeable information about a frame buffer device and a
32 specific video mode. This can be obtained using the FBIOGET_VSCREENINFO
33 ioctl, and updated with the FBIOPUT_VSCREENINFO ioctl. If you want to pan
34 the screen only, you can use the FBIOPAN_DISPLAY ioctl.
35
36 - struct fb_cmap
37
38 Device independent colormap information. You can get and set the colormap
39 using the FBIOGETCMAP and FBIOPUTCMAP ioctls.
40
41
422. Inside the kernel
43
44 - struct fb_info
45
46 Generic information, API and low level information about a specific frame
47 buffer device instance (slot number, board address, ...).
48
Mauro Carvalho Chehabab42b812019-06-12 14:52:45 -030049 - struct `par`
Linus Torvalds1da177e2005-04-16 15:20:36 -070050
51 Device dependent information that uniquely defines the video mode for this
52 particular piece of hardware.
53
54
Mauro Carvalho Chehabab42b812019-06-12 14:52:45 -030055Visuals used by the frame buffer device API
56===========================================
Linus Torvalds1da177e2005-04-16 15:20:36 -070057
58
59Monochrome (FB_VISUAL_MONO01 and FB_VISUAL_MONO10)
Mauro Carvalho Chehabab42b812019-06-12 14:52:45 -030060--------------------------------------------------
Linus Torvalds1da177e2005-04-16 15:20:36 -070061Each pixel is either black or white.
62
63
64Pseudo color (FB_VISUAL_PSEUDOCOLOR and FB_VISUAL_STATIC_PSEUDOCOLOR)
65---------------------------------------------------------------------
66The whole pixel value is fed through a programmable lookup table that has one
67color (including red, green, and blue intensities) for each possible pixel
68value, and that color is displayed.
69
70
71True color (FB_VISUAL_TRUECOLOR)
72--------------------------------
73The pixel value is broken up into red, green, and blue fields.
74
75
76Direct color (FB_VISUAL_DIRECTCOLOR)
77------------------------------------
Mauro Carvalho Chehabab42b812019-06-12 14:52:45 -030078The pixel value is broken up into red, green, and blue fields, each of which
Linus Torvalds1da177e2005-04-16 15:20:36 -070079are looked up in separate red, green, and blue lookup tables.
80
81
82Grayscale displays
83------------------
84Grayscale and static grayscale are special variants of pseudo color and static
85pseudo color, where the red, green and blue components are always equal to
86each other.