summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/video/tegra/fb.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index d22603f7e2bd..e64039a7743c 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -603,6 +603,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],
@@ -698,6 +703,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);
+ /* 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);
}