aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbmem.c
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2005-09-09 16:09:58 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 17:03:39 -0400
commit96fe6a2109db29cd15b90a093c16e6cb4b19371a (patch)
treebd3c424f3f43e6b5a2ba6c235c7c25b3ba197f4c /drivers/video/fbmem.c
parent5251bffc9b4ca699993c79166adf02faf1bbc043 (diff)
[PATCH] fbdev: Add VESA Coordinated Video Timings (CVT) support
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 <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/fbmem.c')
-rw-r--r--drivers/video/fbmem.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index a815f5e2fcb5..71b55070bdb9 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1029,6 +1029,7 @@ register_framebuffer(struct fb_info *fb_info)
1029{ 1029{
1030 int i; 1030 int i;
1031 struct fb_event event; 1031 struct fb_event event;
1032 struct fb_videomode mode;
1032 1033
1033 if (num_registered_fb == FB_MAX) 1034 if (num_registered_fb == FB_MAX)
1034 return -ENXIO; 1035 return -ENXIO;
@@ -1059,16 +1060,11 @@ register_framebuffer(struct fb_info *fb_info)
1059 } 1060 }
1060 fb_info->pixmap.offset = 0; 1061 fb_info->pixmap.offset = 0;
1061 1062
1062 if (!fb_info->modelist.prev || 1063 if (!fb_info->modelist.prev || !fb_info->modelist.next)
1063 !fb_info->modelist.next ||
1064 list_empty(&fb_info->modelist)) {
1065 struct fb_videomode mode;
1066
1067 INIT_LIST_HEAD(&fb_info->modelist); 1064 INIT_LIST_HEAD(&fb_info->modelist);
1068 fb_var_to_videomode(&mode, &fb_info->var);
1069 fb_add_videomode(&mode, &fb_info->modelist);
1070 }
1071 1065
1066 fb_var_to_videomode(&mode, &fb_info->var);
1067 fb_add_videomode(&mode, &fb_info->modelist);
1072 registered_fb[i] = fb_info; 1068 registered_fb[i] = fb_info;
1073 1069
1074 devfs_mk_cdev(MKDEV(FB_MAJOR, i), 1070 devfs_mk_cdev(MKDEV(FB_MAJOR, i),