xref: /OK3568_Linux_fs/kernel/Documentation/fb/internals.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun=============================
2*4882a593SmuzhiyunFrame Buffer device internals
3*4882a593Smuzhiyun=============================
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunThis is a first start for some documentation about frame buffer device
6*4882a593Smuzhiyuninternals.
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunAuthors:
9*4882a593Smuzhiyun
10*4882a593Smuzhiyun- Geert Uytterhoeven <geert@linux-m68k.org>, 21 July 1998
11*4882a593Smuzhiyun- James Simmons <jsimmons@user.sf.net>, Nov 26 2002
12*4882a593Smuzhiyun
13*4882a593Smuzhiyun--------------------------------------------------------------------------------
14*4882a593Smuzhiyun
15*4882a593SmuzhiyunStructures used by the frame buffer device API
16*4882a593Smuzhiyun==============================================
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunThe following structures play a role in the game of frame buffer devices. They
19*4882a593Smuzhiyunare defined in <linux/fb.h>.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun1. Outside the kernel (user space)
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun  - struct fb_fix_screeninfo
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun    Device independent unchangeable information about a frame buffer device and
26*4882a593Smuzhiyun    a specific video mode. This can be obtained using the FBIOGET_FSCREENINFO
27*4882a593Smuzhiyun    ioctl.
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun  - struct fb_var_screeninfo
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun    Device independent changeable information about a frame buffer device and a
32*4882a593Smuzhiyun    specific video mode. This can be obtained using the FBIOGET_VSCREENINFO
33*4882a593Smuzhiyun    ioctl, and updated with the FBIOPUT_VSCREENINFO ioctl. If you want to pan
34*4882a593Smuzhiyun    the screen only, you can use the FBIOPAN_DISPLAY ioctl.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun  - struct fb_cmap
37*4882a593Smuzhiyun
38*4882a593Smuzhiyun    Device independent colormap information. You can get and set the colormap
39*4882a593Smuzhiyun    using the FBIOGETCMAP and FBIOPUTCMAP ioctls.
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun
42*4882a593Smuzhiyun2. Inside the kernel
43*4882a593Smuzhiyun
44*4882a593Smuzhiyun  - struct fb_info
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun    Generic information, API and low level information about a specific frame
47*4882a593Smuzhiyun    buffer device instance (slot number, board address, ...).
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun  - struct `par`
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun    Device dependent information that uniquely defines the video mode for this
52*4882a593Smuzhiyun    particular piece of hardware.
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunVisuals used by the frame buffer device API
56*4882a593Smuzhiyun===========================================
57*4882a593Smuzhiyun
58*4882a593Smuzhiyun
59*4882a593SmuzhiyunMonochrome (FB_VISUAL_MONO01 and FB_VISUAL_MONO10)
60*4882a593Smuzhiyun--------------------------------------------------
61*4882a593SmuzhiyunEach pixel is either black or white.
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunPseudo color (FB_VISUAL_PSEUDOCOLOR and FB_VISUAL_STATIC_PSEUDOCOLOR)
65*4882a593Smuzhiyun---------------------------------------------------------------------
66*4882a593SmuzhiyunThe whole pixel value is fed through a programmable lookup table that has one
67*4882a593Smuzhiyuncolor (including red, green, and blue intensities) for each possible pixel
68*4882a593Smuzhiyunvalue, and that color is displayed.
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun
71*4882a593SmuzhiyunTrue color (FB_VISUAL_TRUECOLOR)
72*4882a593Smuzhiyun--------------------------------
73*4882a593SmuzhiyunThe pixel value is broken up into red, green, and blue fields.
74*4882a593Smuzhiyun
75*4882a593Smuzhiyun
76*4882a593SmuzhiyunDirect color (FB_VISUAL_DIRECTCOLOR)
77*4882a593Smuzhiyun------------------------------------
78*4882a593SmuzhiyunThe pixel value is broken up into red, green, and blue fields, each of which
79*4882a593Smuzhiyunare looked up in separate red, green, and blue lookup tables.
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun
82*4882a593SmuzhiyunGrayscale displays
83*4882a593Smuzhiyun------------------
84*4882a593SmuzhiyunGrayscale and static grayscale are special variants of pseudo color and static
85*4882a593Smuzhiyunpseudo color, where the red, green and blue components are always equal to
86*4882a593Smuzhiyuneach other.
87