video: tegra: ensure first video mode is marked with FB_MODE_IS_FIRST
Erik Gilling [Thu, 14 Oct 2010 19:46:57 +0000 (12:46 -0700)]
Change-Id: If3c417c670962e4ca6ff92c3bd1a388c189f11ab
Signed-off-by: Erik Gilling <konkers@android.com>

drivers/video/tegra/fb.c

index 746ea53..961e0a6 100644 (file)
@@ -547,6 +547,7 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
                              bool (*mode_filter)(struct fb_videomode *mode))
 {
        struct fb_event event;
+       struct fb_modelist *m;
        int i;
 
        mutex_lock(&fb_info->info->lock);
@@ -568,6 +569,10 @@ void tegra_fb_update_monspecs(struct tegra_fb_info *fb_info,
                }
        }
 
+       /* in case the first mode was not matched */
+       m = list_first_entry(&fb_info->info->modelist, struct fb_modelist, list);
+       m->mode.flag |= FB_MODE_IS_FIRST;
+
        fb_info->info->mode = (struct fb_videomode *)
                fb_find_best_display(specs, &fb_info->info->modelist);