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