internals.txt 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. This is a first start for some documentation about frame buffer device
  2. internals.
  3. Geert Uytterhoeven <geert@linux-m68k.org>, 21 July 1998
  4. James Simmons <jsimmons@user.sf.net>, Nov 26 2002
  5. --------------------------------------------------------------------------------
  6. *** STRUCTURES USED BY THE FRAME BUFFER DEVICE API ***
  7. The following structures play a role in the game of frame buffer devices. They
  8. are defined in <linux/fb.h>.
  9. 1. Outside the kernel (user space)
  10. - struct fb_fix_screeninfo
  11. Device independent unchangeable information about a frame buffer device and
  12. a specific video mode. This can be obtained using the FBIOGET_FSCREENINFO
  13. ioctl.
  14. - struct fb_var_screeninfo
  15. Device independent changeable information about a frame buffer device and a
  16. specific video mode. This can be obtained using the FBIOGET_VSCREENINFO
  17. ioctl, and updated with the FBIOPUT_VSCREENINFO ioctl. If you want to pan
  18. the screen only, you can use the FBIOPAN_DISPLAY ioctl.
  19. - struct fb_cmap
  20. Device independent colormap information. You can get and set the colormap
  21. using the FBIOGETCMAP and FBIOPUTCMAP ioctls.
  22. 2. Inside the kernel
  23. - struct fb_info
  24. Generic information, API and low level information about a specific frame
  25. buffer device instance (slot number, board address, ...).
  26. - struct `par'
  27. Device dependent information that uniquely defines the video mode for this
  28. particular piece of hardware.
  29. --------------------------------------------------------------------------------
  30. *** VISUALS USED BY THE FRAME BUFFER DEVICE API ***
  31. Monochrome (FB_VISUAL_MONO01 and FB_VISUAL_MONO10)
  32. -------------------------------------------------
  33. Each pixel is either black or white.
  34. Pseudo color (FB_VISUAL_PSEUDOCOLOR and FB_VISUAL_STATIC_PSEUDOCOLOR)
  35. ---------------------------------------------------------------------
  36. The whole pixel value is fed through a programmable lookup table that has one
  37. color (including red, green, and blue intensities) for each possible pixel
  38. value, and that color is displayed.
  39. True color (FB_VISUAL_TRUECOLOR)
  40. --------------------------------
  41. The pixel value is broken up into red, green, and blue fields.
  42. Direct color (FB_VISUAL_DIRECTCOLOR)
  43. ------------------------------------
  44. The pixel value is broken up into red, green, and blue fields, each of which
  45. are looked up in separate red, green, and blue lookup tables.
  46. Grayscale displays
  47. ------------------
  48. Grayscale and static grayscale are special variants of pseudo color and static
  49. pseudo color, where the red, green and blue components are always equal to
  50. each other.