aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/i810
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2005-09-11 21:15:16 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-11 23:43:47 -0400
commit595e8a97f48619fe7952f31259d3e61af9118f49 (patch)
tree6c0f44cf3c1398fb6265aed03e20016ef93de959 /drivers/video/i810
parent883f64510718e7df9abbfeec4748d92745d8cc3e (diff)
[PATCH] i810fb: Restore xres and yres option parameters
If i810fb successfully probed for the EDID, it will disregard the boot option parameters 'xres' and 'yres'. Fix this regression. Excellent testing done by Manuel Lauss <mano@roarinelk.homelinux.net>. Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/i810')
-rw-r--r--drivers/video/i810/i810_main.c52
1 files changed, 35 insertions, 17 deletions
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index 6f11989f54e3..78feded40945 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -95,18 +95,18 @@ static struct pci_driver i810fb_driver = {
95static char *mode_option __devinitdata = NULL; 95static char *mode_option __devinitdata = NULL;
96static int vram __devinitdata = 4; 96static int vram __devinitdata = 4;
97static int bpp __devinitdata = 8; 97static int bpp __devinitdata = 8;
98static int mtrr __devinitdata = 0; 98static int mtrr __devinitdata;
99static int accel __devinitdata = 0; 99static int accel __devinitdata;
100static int hsync1 __devinitdata = 0; 100static int hsync1 __devinitdata;
101static int hsync2 __devinitdata = 0; 101static int hsync2 __devinitdata;
102static int vsync1 __devinitdata = 0; 102static int vsync1 __devinitdata;
103static int vsync2 __devinitdata = 0; 103static int vsync2 __devinitdata;
104static int xres __devinitdata = 640; 104static int xres __devinitdata;
105static int yres __devinitdata = 480; 105static int yres __devinitdata;
106static int vyres __devinitdata = 0; 106static int vyres __devinitdata;
107static int sync __devinitdata = 0; 107static int sync __devinitdata;
108static int ext_vga __devinitdata = 0; 108static int ext_vga __devinitdata;
109static int dcolor __devinitdata = 0; 109static int dcolor __devinitdata;
110 110
111/*------------------------------------------------------------*/ 111/*------------------------------------------------------------*/
112 112
@@ -1725,12 +1725,21 @@ static void __devinit i810_init_defaults(struct i810fb_par *par,
1725 if (bpp < 8) 1725 if (bpp < 8)
1726 bpp = 8; 1726 bpp = 8;
1727 1727
1728 par->i810fb_ops = i810fb_ops;
1729
1730 if (xres)
1731 info->var.xres = xres;
1732 else
1733 info->var.xres = 640;
1734
1735 if (yres)
1736 info->var.yres = yres;
1737 else
1738 info->var.yres = 480;
1739
1728 if (!vyres) 1740 if (!vyres)
1729 vyres = (vram << 20)/(xres*bpp >> 3); 1741 vyres = (vram << 20)/(info->var.xres*bpp >> 3);
1730 1742
1731 par->i810fb_ops = i810fb_ops;
1732 info->var.xres = xres;
1733 info->var.yres = yres;
1734 info->var.yres_virtual = vyres; 1743 info->var.yres_virtual = vyres;
1735 info->var.bits_per_pixel = bpp; 1744 info->var.bits_per_pixel = bpp;
1736 1745
@@ -1862,7 +1871,16 @@ static void __devinit i810fb_find_init_mode(struct fb_info *info)
1862 fb_videomode_to_modelist(specs->modedb, specs->modedb_len, 1871 fb_videomode_to_modelist(specs->modedb, specs->modedb_len,
1863 &info->modelist); 1872 &info->modelist);
1864 if (specs->modedb != NULL) { 1873 if (specs->modedb != NULL) {
1865 if (specs->misc & FB_MISC_1ST_DETAIL) { 1874 if (xres && yres) {
1875 struct fb_videomode *m;
1876
1877 if ((m = fb_find_best_mode(&var, &info->modelist))) {
1878 mode = *m;
1879 found = 1;
1880 }
1881 }
1882
1883 if (!found && specs->misc & FB_MISC_1ST_DETAIL) {
1866 for (i = 0; i < specs->modedb_len; i++) { 1884 for (i = 0; i < specs->modedb_len; i++) {
1867 if (specs->modedb[i].flag & FB_MODE_IS_FIRST) { 1885 if (specs->modedb[i].flag & FB_MODE_IS_FIRST) {
1868 mode = specs->modedb[i]; 1886 mode = specs->modedb[i];