summaryrefslogtreecommitdiffstats
path: root/drivers/video/i810
diff options
context:
space:
mode:
authorAntonino A. Daplas <adaplas@gmail.com>2005-09-12 09:15:16 +0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-11 20:43:47 -0700
commit595e8a97f48619fe7952f31259d3e61af9118f49 (patch)
tree6c0f44cf3c1398fb6265aed03e20016ef93de959 /drivers/video/i810
parent883f64510718e7df9abbfeec4748d92745d8cc3e (diff)
downloadblackbird-op-linux-595e8a97f48619fe7952f31259d3e61af9118f49.tar.gz
blackbird-op-linux-595e8a97f48619fe7952f31259d3e61af9118f49.zip
[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 = {
static char *mode_option __devinitdata = NULL;
static int vram __devinitdata = 4;
static int bpp __devinitdata = 8;
-static int mtrr __devinitdata = 0;
-static int accel __devinitdata = 0;
-static int hsync1 __devinitdata = 0;
-static int hsync2 __devinitdata = 0;
-static int vsync1 __devinitdata = 0;
-static int vsync2 __devinitdata = 0;
-static int xres __devinitdata = 640;
-static int yres __devinitdata = 480;
-static int vyres __devinitdata = 0;
-static int sync __devinitdata = 0;
-static int ext_vga __devinitdata = 0;
-static int dcolor __devinitdata = 0;
+static int mtrr __devinitdata;
+static int accel __devinitdata;
+static int hsync1 __devinitdata;
+static int hsync2 __devinitdata;
+static int vsync1 __devinitdata;
+static int vsync2 __devinitdata;
+static int xres __devinitdata;
+static int yres __devinitdata;
+static int vyres __devinitdata;
+static int sync __devinitdata;
+static int ext_vga __devinitdata;
+static int dcolor __devinitdata;
/*------------------------------------------------------------*/
@@ -1725,12 +1725,21 @@ static void __devinit i810_init_defaults(struct i810fb_par *par,
if (bpp < 8)
bpp = 8;
+ par->i810fb_ops = i810fb_ops;
+
+ if (xres)
+ info->var.xres = xres;
+ else
+ info->var.xres = 640;
+
+ if (yres)
+ info->var.yres = yres;
+ else
+ info->var.yres = 480;
+
if (!vyres)
- vyres = (vram << 20)/(xres*bpp >> 3);
+ vyres = (vram << 20)/(info->var.xres*bpp >> 3);
- par->i810fb_ops = i810fb_ops;
- info->var.xres = xres;
- info->var.yres = yres;
info->var.yres_virtual = vyres;
info->var.bits_per_pixel = bpp;
@@ -1862,7 +1871,16 @@ static void __devinit i810fb_find_init_mode(struct fb_info *info)
fb_videomode_to_modelist(specs->modedb, specs->modedb_len,
&info->modelist);
if (specs->modedb != NULL) {
- if (specs->misc & FB_MISC_1ST_DETAIL) {
+ if (xres && yres) {
+ struct fb_videomode *m;
+
+ if ((m = fb_find_best_mode(&var, &info->modelist))) {
+ mode = *m;
+ found = 1;
+ }
+ }
+
+ if (!found && specs->misc & FB_MISC_1ST_DETAIL) {
for (i = 0; i < specs->modedb_len; i++) {
if (specs->modedb[i].flag & FB_MODE_IS_FIRST) {
mode = specs->modedb[i];
OpenPOWER on IntegriCloud