video: tegra: ensure first video mode is marked with FB_MODE_IS_FIRST
authorErik Gilling <konkers@android.com>
Thu, 14 Oct 2010 19:46:57 +0000 (12:46 -0700)
committerErik Gilling <konkers@android.com>
Mon, 18 Oct 2010 19:08:19 +0000 (12:08 -0700)
Change-Id: If3c417c670962e4ca6ff92c3bd1a388c189f11ab
Signed-off-by: Erik Gilling <konkers@android.com>
drivers/video/tegra/fb.c

index 746ea532661c32eb59cbd62ad2ec830f7c6dc4b1..961e0a62d06bc0c9207d2de1097427baf10e775c 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);