xref: /OK3568_Linux_fs/kernel/Documentation/driver-api/frame-buffer.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrame Buffer Library
2*4882a593Smuzhiyun====================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunThe frame buffer drivers depend heavily on four data structures. These
5*4882a593Smuzhiyunstructures are declared in include/linux/fb.h. They are fb_info,
6*4882a593Smuzhiyunfb_var_screeninfo, fb_fix_screeninfo and fb_monospecs. The last
7*4882a593Smuzhiyunthree can be made available to and from userland.
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunfb_info defines the current state of a particular video card. Inside
10*4882a593Smuzhiyunfb_info, there exists a fb_ops structure which is a collection of
11*4882a593Smuzhiyunneeded functions to make fbdev and fbcon work. fb_info is only visible
12*4882a593Smuzhiyunto the kernel.
13*4882a593Smuzhiyun
14*4882a593Smuzhiyunfb_var_screeninfo is used to describe the features of a video card
15*4882a593Smuzhiyunthat are user defined. With fb_var_screeninfo, things such as depth
16*4882a593Smuzhiyunand the resolution may be defined.
17*4882a593Smuzhiyun
18*4882a593SmuzhiyunThe next structure is fb_fix_screeninfo. This defines the properties
19*4882a593Smuzhiyunof a card that are created when a mode is set and can't be changed
20*4882a593Smuzhiyunotherwise. A good example of this is the start of the frame buffer
21*4882a593Smuzhiyunmemory. This "locks" the address of the frame buffer memory, so that it
22*4882a593Smuzhiyuncannot be changed or moved.
23*4882a593Smuzhiyun
24*4882a593SmuzhiyunThe last structure is fb_monospecs. In the old API, there was little
25*4882a593Smuzhiyunimportance for fb_monospecs. This allowed for forbidden things such as
26*4882a593Smuzhiyunsetting a mode of 800x600 on a fix frequency monitor. With the new API,
27*4882a593Smuzhiyunfb_monospecs prevents such things, and if used correctly, can prevent a
28*4882a593Smuzhiyunmonitor from being cooked. fb_monospecs will not be useful until
29*4882a593Smuzhiyunkernels 2.5.x.
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunFrame Buffer Memory
32*4882a593Smuzhiyun-------------------
33*4882a593Smuzhiyun
34*4882a593Smuzhiyun.. kernel-doc:: drivers/video/fbdev/core/fbmem.c
35*4882a593Smuzhiyun   :export:
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunFrame Buffer Colormap
38*4882a593Smuzhiyun---------------------
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun.. kernel-doc:: drivers/video/fbdev/core/fbcmap.c
41*4882a593Smuzhiyun   :export:
42*4882a593Smuzhiyun
43*4882a593SmuzhiyunFrame Buffer Video Mode Database
44*4882a593Smuzhiyun--------------------------------
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun.. kernel-doc:: drivers/video/fbdev/core/modedb.c
47*4882a593Smuzhiyun   :internal:
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun.. kernel-doc:: drivers/video/fbdev/core/modedb.c
50*4882a593Smuzhiyun   :export:
51*4882a593Smuzhiyun
52*4882a593SmuzhiyunFrame Buffer Macintosh Video Mode Database
53*4882a593Smuzhiyun------------------------------------------
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun.. kernel-doc:: drivers/video/fbdev/macmodes.c
56*4882a593Smuzhiyun   :export:
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunFrame Buffer Fonts
59*4882a593Smuzhiyun------------------
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunRefer to the file lib/fonts/fonts.c for more information.
62*4882a593Smuzhiyun
63