Skip to content

Commit

Permalink
[PATCH] fbdev: Add VESA Coordinated Video Timings (CVT) support
Browse files Browse the repository at this point in the history
The Coordinated Video Timings (CVT) is the latest standard approved by VESA
concerning video timings generation.  It addresses the limitation of GTF which
is designed mainly for CRT displays.  CRT's have a high blanking requirement
(as much as 25% of the horizontal frame length) which artificially increases
the pixelclock.  Digital displays, on the other hand, needs to conserve the
pixelclock as much as possible.  The GTF also does not take into account the
different aspect ratios in its calculation.

The new function added is fb_find_mode_cvt().  It is called by fb_find_mode()
if it recognizes a mode option string formatted for CVT.  The format is:

<xres>x<yres>[M][R][-<bpp>][<at-sign><refresh>][i][m]

The 'M' tells the function to calculate using CVT.  On it's own, it will
compute a timing for CRT displays at 60Hz.  If the 'R' is specified, 'reduced
blanking' computation will be used, best for flatpanels.  The 'i' and the 'm'
is for 'interlaced mode' and 'with margins' respectively.

To determine if CVT was used, check for dmesg for something like this:

CVT Mode - <pix>M<n>[-R], ie: .480M3-R  (800x600 reduced blanking)

where: pix - product of xres and yres, in MB
    M   - is a CVT mode
    n   - the aspect ratio (3 - 4:3; 4 - 5:4; 9 - 16:9, 15:9; A - 16:10)
    -R   - reduced blanking

Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
adaplas authored and Linus Torvalds committed Sep 9, 2005
1 parent 5251bff commit 96fe6a2
Show file tree
Hide file tree
Showing 6 changed files with 519 additions and 12 deletions.
73 changes: 72 additions & 1 deletion Documentation/fb/modedb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,83 @@ in a video= option, fbmem considers that to be a global video mode option.

Valid mode specifiers (mode_option argument):

<xres>x<yres>[-<bpp>][@<refresh>]
<xres>x<yres>[M][R][-<bpp>][@<refresh>][i][m]
<name>[-<bpp>][@<refresh>]

with <xres>, <yres>, <bpp> and <refresh> decimal numbers and <name> a string.
Things between square brackets are optional.

If 'M' is specified in the mode_option argument (after <yres> and before
<bpp> and <refresh>, if specified) the timings will be calculated using
VESA(TM) Coordinated Video Timings instead of looking up the mode from a table.
If 'R' is specified, do a 'reduced blanking' calculation for digital displays.
If 'i' is specified, calculate for an interlaced mode. And if 'm' is
specified, add margins to the calculation (1.8% of xres rounded down to 8
pixels and 1.8% of yres).

Sample usage: 1024x768M@60m - CVT timing with margins

***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo *****

What is the VESA(TM) Coordinated Video Timings (CVT)?

From the VESA(TM) Website:

"The purpose of CVT is to provide a method for generating a consistent
and coordinated set of standard formats, display refresh rates, and
timing specifications for computer display products, both those
employing CRTs, and those using other display technologies. The
intention of CVT is to give both source and display manufacturers a
common set of tools to enable new timings to be developed in a
consistent manner that ensures greater compatibility."

This is the third standard approved by VESA(TM) concerning video timings. The
first was the Discrete Video Timings (DVT) which is a collection of
pre-defined modes approved by VESA(TM). The second is the Generalized Timing
Formula (GTF) which is an algorithm to calculate the timings, given the
pixelclock, the horizontal sync frequency, or the vertical refresh rate.

The GTF is limited by the fact that it is designed mainly for CRT displays.
It artificially increases the pixelclock because of its high blanking
requirement. This is inappropriate for digital display interface with its high
data rate which requires that it conserves the pixelclock as much as possible.
Also, GTF does not take into account the aspect ratio of the display.

The CVT addresses these limitations. If used with CRT's, the formula used
is a derivation of GTF with a few modifications. If used with digital
displays, the "reduced blanking" calculation can be used.

From the framebuffer subsystem perspective, new formats need not be added
to the global mode database whenever a new mode is released by display
manufacturers. Specifying for CVT will work for most, if not all, relatively
new CRT displays and probably with most flatpanels, if 'reduced blanking'
calculation is specified. (The CVT compatibility of the display can be
determined from its EDID. The version 1.3 of the EDID has extra 128-byte
blocks where additional timing information is placed. As of this time, there
is no support yet in the layer to parse this additional blocks.)

CVT also introduced a new naming convention (should be seen from dmesg output):

<pix>M<a>[-R]

where: pix = total amount of pixels in MB (xres x yres)
M = always present
a = aspect ratio (3 - 4:3; 4 - 5:4; 9 - 15:9, 16:9; A - 16:10)
-R = reduced blanking

example: .48M3-R - 800x600 with reduced blanking

Note: VESA(TM) has restrictions on what is a standard CVT timing:

- aspect ratio can only be one of the above values
- acceptable refresh rates are 50, 60, 70 or 85 Hz only
- if reduced blanking, the refresh rate must be at 60Hz

If one of the above are not satisfied, the kernel will print a warning but the
timings will still be calculated.

***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo ***** oOo *****

To find a suitable video mode, you just call

int __init fb_find_mode(struct fb_var_screeninfo *var,
Expand Down
3 changes: 2 additions & 1 deletion drivers/video/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ obj-$(CONFIG_LOGO) += logo/
obj-$(CONFIG_SYSFS) += backlight/

obj-$(CONFIG_FB) += fb.o
fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o modedb.o
fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \
modedb.o fbcvt.o
fb-objs := $(fb-y)

obj-$(CONFIG_FB_CFB_FILLRECT) += cfbfillrect.o
Expand Down
Loading

0 comments on commit 96fe6a2

Please sign in to comment.