modedb.txt 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. modedb default video mode support
  2. Currently all frame buffer device drivers have their own video mode databases,
  3. which is a mess and a waste of resources. The main idea of modedb is to have
  4. - one routine to probe for video modes, which can be used by all frame buffer
  5. devices
  6. - one generic video mode database with a fair amount of standard videomodes
  7. (taken from XFree86)
  8. - the possibility to supply your own mode database for graphics hardware that
  9. needs non-standard modes, like amifb and Mac frame buffer drivers (which
  10. use macmodes.c)
  11. When a frame buffer device receives a video= option it doesn't know, it should
  12. consider that to be a video mode option. If no frame buffer device is specified
  13. in a video= option, fbmem considers that to be a global video mode option.
  14. Valid mode specifiers (mode_option argument):
  15. <xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m]
  16. <name>[-<bpp>][@<refresh>]
  17. with <xres>, <yres>, <bpp> and <refresh> decimal numbers and <name> a string.
  18. Things between square brackets are optional.
  19. If 'M' is specified in the mode_option argument (after <yres> and before
  20. <bpp> and <refresh>, if specified) the timings will be calculated using
  21. VESA(TM) Coordinated Video Timings instead of looking up the mode from a table.
  22. If 'R' is specified, do a 'reduced blanking' calculation for digital displays.
  23. If 'i' is specified, calculate for an interlaced mode. And if 'm' is
  24. specified, add margins to the calculation (1.8% of xres rounded down to 8
  25. pixels and 1.8% of yres).
  26. Sample usage: 1024x768M@60m - CVT timing with margins
  27. ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo *****
  28. What is the VESA(TM) Coordinated Video Timings (CVT)?
  29. From the VESA(TM) Website:
  30. "The purpose of CVT is to provide a method for generating a consistent
  31. and coordinated set of standard formats, display refresh rates, and
  32. timing specifications for computer display products, both those
  33. employing CRTs, and those using other display technologies. The
  34. intention of CVT is to give both source and display manufacturers a
  35. common set of tools to enable new timings to be developed in a
  36. consistent manner that ensures greater compatibility."
  37. This is the third standard approved by VESA(TM) concerning video timings. The
  38. first was the Discrete Video Timings (DVT) which is a collection of
  39. pre-defined modes approved by VESA(TM). The second is the Generalized Timing
  40. Formula (GTF) which is an algorithm to calculate the timings, given the
  41. pixelclock, the horizontal sync frequency, or the vertical refresh rate.
  42. The GTF is limited by the fact that it is designed mainly for CRT displays.
  43. It artificially increases the pixelclock because of its high blanking
  44. requirement. This is inappropriate for digital display interface with its high
  45. data rate which requires that it conserves the pixelclock as much as possible.
  46. Also, GTF does not take into account the aspect ratio of the display.
  47. The CVT addresses these limitations. If used with CRT's, the formula used
  48. is a derivation of GTF with a few modifications. If used with digital
  49. displays, the "reduced blanking" calculation can be used.
  50. From the framebuffer subsystem perspective, new formats need not be added
  51. to the global mode database whenever a new mode is released by display
  52. manufacturers. Specifying for CVT will work for most, if not all, relatively
  53. new CRT displays and probably with most flatpanels, if 'reduced blanking'
  54. calculation is specified. (The CVT compatibility of the display can be
  55. determined from its EDID. The version 1.3 of the EDID has extra 128-byte
  56. blocks where additional timing information is placed. As of this time, there
  57. is no support yet in the layer to parse this additional blocks.)
  58. CVT also introduced a new naming convention (should be seen from dmesg output):
  59. <pix>M<a>[-R]
  60. where: pix = total amount of pixels in MB (xres x yres)
  61. M = always present
  62. a = aspect ratio (3 - 4:3; 4 - 5:4; 9 - 15:9, 16:9; A - 16:10)
  63. -R = reduced blanking
  64. example: .48M3-R - 800x600 with reduced blanking
  65. Note: VESA(TM) has restrictions on what is a standard CVT timing:
  66. - aspect ratio can only be one of the above values
  67. - acceptable refresh rates are 50, 60, 70 or 85 Hz only
  68. - if reduced blanking, the refresh rate must be at 60Hz
  69. If one of the above are not satisfied, the kernel will print a warning but the
  70. timings will still be calculated.
  71. ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo *****
  72. To find a suitable video mode, you just call
  73. int __init fb_find_mode(struct fb_var_screeninfo *var,
  74. struct fb_info *info, const char *mode_option,
  75. const struct fb_videomode *db, unsigned int dbsize,
  76. const struct fb_videomode *default_mode,
  77. unsigned int default_bpp)
  78. with db/dbsize your non-standard video mode database, or NULL to use the
  79. standard video mode database.
  80. fb_find_mode() first tries the specified video mode (or any mode that matches,
  81. e.g. there can be multiple 640x480 modes, each of them is tried). If that
  82. fails, the default mode is tried. If that fails, it walks over all modes.
  83. To specify a video mode at bootup, use the following boot options:
  84. video=<driver>:<xres>x<yres>[-<bpp>][@refresh]
  85. where <driver> is a name from the table below. Valid default modes can be
  86. found in linux/drivers/video/modedb.c. Check your driver's documentation.
  87. There may be more modes.
  88. Drivers that support modedb boot options
  89. Boot Name Cards Supported
  90. amifb - Amiga chipset frame buffer
  91. aty128fb - ATI Rage128 / Pro frame buffer
  92. atyfb - ATI Mach64 frame buffer
  93. pm2fb - Permedia 2/2V frame buffer
  94. pm3fb - Permedia 3 frame buffer
  95. sstfb - Voodoo 1/2 (SST1) chipset frame buffer
  96. tdfxfb - 3D Fx frame buffer
  97. tridentfb - Trident (Cyber)blade chipset frame buffer
  98. vt8623fb - VIA 8623 frame buffer
  99. BTW, only a few drivers use this at the moment. Others are to follow
  100. (feel free to send patches).