import of upstream 2.4.34.4 from kernel.org
[linux-2.4.git] / Documentation / fb / internals.txt
1
2 This is a first start for some documentation about frame buffer device
3 internals.
4
5 Geert Uytterhoeven <geert@linux-m68k.org>, 21 July 1998
6
7 --------------------------------------------------------------------------------
8
9             ***  STRUCTURES USED BY THE FRAME BUFFER DEVICE API  ***
10
11 The following structures play a role in the game of frame buffer devices. They
12 are defined in <linux/fb.h>.
13
14 1. Outside the kernel (user space)
15
16   - struct fb_fix_screeninfo
17
18     Device independent unchangeable information about a frame buffer device and
19     a specific video mode. This can be obtained using the FBIOGET_FSCREENINFO
20     ioctl.
21
22   - struct fb_var_screeninfo
23
24     Device independent changeable information about a frame buffer device and a
25     specific video mode. This can be obtained using the FBIOGET_VSCREENINFO
26     ioctl, and updated with the FBIOPUT_VSCREENINFO ioctl. If you want to pan
27     the screen only, you can use the FBIOPAN_DISPLAY ioctl.
28
29   - struct fb_cmap
30
31     Device independent colormap information. You can get and set the colormap
32     using the FBIOGETCMAP and FBIOPUTCMAP ioctls.
33
34
35 2. Inside the kernel
36
37   - struct fb_info
38
39     Generic information, API and low level information about a specific frame
40     buffer device instance (slot number, board address, ...).
41
42   - struct `par'
43
44     Device dependent information that uniquely defines the video mode for this
45     particular piece of hardware.
46
47   - struct display
48
49     Interface between the frame buffer device and the console driver.
50
51
52 --------------------------------------------------------------------------------
53
54             ***  VISUALS USED BY THE FRAME BUFFER DEVICE API  ***
55
56
57 Monochrome (FB_VISUAL_MONO01 and FB_VISUAL_MONO10)
58 -------------------------------------------------
59 Each pixel is either black or white.
60
61
62 Pseudo color (FB_VISUAL_PSEUDOCOLOR and FB_VISUAL_STATIC_PSEUDOCOLOR)
63 ---------------------------------------------------------------------
64 The whole pixel value is fed through a programmable lookup table that has one
65 color (including red, green, and blue intensities) for each possible pixel
66 value, and that color is displayed.
67
68
69 True color (FB_VISUAL_TRUECOLOR)
70 --------------------------------
71 The pixel value is broken up into red, green, and blue fields.
72
73
74 Direct color (FB_VISUAL_DIRECTCOLOR)
75 ------------------------------------
76 The pixel value is broken up into red, green, and blue fields, each of which 
77 are looked up in separate red, green, and blue lookup tables.
78
79
80 Grayscale displays
81 ------------------
82 Grayscale and static grayscale are special variants of pseudo color and static
83 pseudo color, where the red, green and blue components are always equal to
84 each other.
85