DEVFIX: upstreamed
Dan Willemsen [Wed, 13 Apr 2011 20:30:33 +0000 (13:30 -0700)]
Rebase-Id: Rebec6e6d6ea7463417a63bcf5fe30cb9f8aa0211

drivers/video/tegra/fb.c

index 815c0fd..05eeb6a 100644 (file)
@@ -604,7 +604,11 @@ static int tegra_fb_ioctl(struct fb_info *info, unsigned int cmd, unsigned long
 
                        if (i >= modedb.modedb_len)
                                break;
+
+                       /* fb_videomode_to_var doesn't fill out all the members
+                          of fb_var_screeninfo */
                        memset(&var, 0x0, sizeof(var));
+
                        fb_videomode_to_var(&var, &modelist->mode);
 
                        if (copy_to_user((void __user *)&modedb.modedb[i],
@@ -700,8 +704,10 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
                fb_info->info->mode = (struct fb_videomode *)
                        fb_find_best_display(specs, &fb_info->info->modelist);
 
-               memset(&fb_info->info->var, 0x0,
-                      sizeof(fb_info->info->var));
+               /* fb_videomode_to_var doesn't fill out all the members
+                  of fb_var_screeninfo */
+               memset(&fb_info->info->var, 0x0, sizeof(fb_info->info->var));
+
                fb_videomode_to_var(&fb_info->info->var, fb_info->info->mode);
                tegra_fb_set_par(fb_info->info);
        }