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