summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Zhang <markz@nvidia.com>2012-08-17 13:31:37 +0800
committerSimone Willett <swillett@nvidia.com>2012-08-23 14:44:15 -0700
commit13694b6bf1dc4572752e13d42f278aa9b624f043 (patch)
tree6ffa0e3946ed8e5a876950c7ed061a37ab4a34a1
parent2e189ac325c9347cbb2411b00154a5dab254cec3 (diff)
video: tegra: dc: Make framebuffer console init OK
Update framebuffer's modelist after we changed it's fb_var_screeninfo. This makes sure the framebuffer console can be inited successfully. During framebuffer console init, it'll check whether the var info of the framebuffer is consistent with the modelist. Unsuccessful init of framebuffer console driver makes VT driver doesn't work in right way. Bug 996992 Signed-off-by: Mark Zhang <markz@nvidia.com> Change-Id: I96a1db1f389be75dcba48b20447cf1510ad3768b Reviewed-on: http://git-master/r/107866 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Shashank Sharma <shashanks@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo <jmayo@nvidia.com>
-rw-r--r--drivers/video/tegra/fb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index f1cd652c3a57..007d713ab948 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -592,6 +592,7 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev,
if (dc->mode.pclk > 1000) {
struct tegra_dc_mode *mode = &dc->mode;
+ struct fb_videomode vmode;
if (dc->out->flags & TEGRA_DC_OUT_ONE_SHOT_MODE)
info->var.pixclock = KHZ2PICOS(mode->rated_pclk / 1000);
@@ -603,6 +604,10 @@ struct tegra_fb_info *tegra_fb_register(struct nvhost_device *ndev,
info->var.lower_margin = mode->v_front_porch;
info->var.hsync_len = mode->h_sync_width;
info->var.vsync_len = mode->v_sync_width;
+
+ /* Keep info->var consistent with info->modelist. */
+ fb_var_to_videomode(&vmode, &info->var);
+ fb_add_videomode(&vmode, &info->modelist);
}
return tegra_fb;