[PATCH] nvidiafb: Fix initial display corruption on certain laptops
[linux-3.10.git] / drivers / video / nvidia / nvidia.c
index b2e6b240786917d9c1cae810a76729d3ff2c0686..52b16850a54efe399ce7ba520a1624b6c1459045 100644 (file)
@@ -1324,6 +1324,13 @@ static int __devinit nvidia_set_fbinfo(struct fb_info *info)
 
                fb_videomode_to_var(&nvidiafb_default_var, &modedb);
                nvidiafb_default_var.bits_per_pixel = 8;
+       } else if (par->fpWidth && par->fpHeight) {
+               char buf[16];
+
+               memset(buf, 0, 16);
+               snprintf(buf, 15, "%dx%d", par->fpWidth, par->fpHeight);
+               fb_find_mode(&nvidiafb_default_var, info, buf, specs->modedb,
+                            specs->modedb_len, &modedb, 8);
        }
 
        if (mode_option)