diff options
author | Sandor Yu <R01008@freescale.com> | 2012-02-21 17:26:28 +0800 |
---|---|---|
committer | Sandor Yu <R01008@freescale.com> | 2012-02-22 12:28:23 +0800 |
commit | 5b8606cec7f1887f4e6885c32cdc633b5b935db5 (patch) | |
tree | 4dc5df794cee14426d0bedc3c5d6d7e154d51459 /drivers/video | |
parent | fcbe0380f438699aea39c18468de0d2c5d1f132b (diff) |
ENGR00174911 MX6x Setting HDMI default mode according bootload cmdline
Origin HDMI default video mode is setting to VGA.
But the HDMI will change to the vide mode setting in bootloader
command line when the first time HDMI cable plugin.
It will cause GUI sometime can't not get correct FB video mode
when system bootup without HDMI cable plugout.
Signed-off-by: Sandor Yu <R01008@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/mxc_hdmi.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/drivers/video/mxc_hdmi.c b/drivers/video/mxc_hdmi.c index 9d95e94def82..c415042f204d 100644 --- a/drivers/video/mxc_hdmi.c +++ b/drivers/video/mxc_hdmi.c @@ -2098,6 +2098,8 @@ static int mxc_hdmi_disp_init(struct mxc_dispdrv_handle *disp, struct mxc_dispdrv_setting *setting) { int ret = 0; + u32 i; + const struct fb_videomode *mode; struct mxc_hdmi *hdmi = mxc_dispdrv_getdata(disp); struct fsl_mxc_hdmi_platform_data *plat = hdmi->pdev->dev.platform_data; int irq = platform_get_irq(hdmi->pdev, 0); @@ -2186,8 +2188,27 @@ static int mxc_hdmi_disp_init(struct mxc_dispdrv_handle *disp, spin_lock_init(&hdmi->irq_lock); - fb_add_videomode(&vga_mode, &hdmi->fbi->modelist); - fb_videomode_to_var(&hdmi->fbi->var, &vga_mode); + /* Set the default mode and modelist when disp init. */ + fb_find_mode(&hdmi->fbi->var, hdmi->fbi, + hdmi->dft_mode_str, NULL, 0, NULL, + hdmi->default_bpp); + + console_lock(); + + fb_destroy_modelist(&hdmi->fbi->modelist); + + /*Add all no interlaced CEA mode to default modelist */ + for (i = 0; i < ARRAY_SIZE(mxc_cea_mode); i++) { + mode = &mxc_cea_mode[i]; + if (!(mode->vmode & FB_VMODE_INTERLACED) && (mode->xres != 0)) + fb_add_videomode(mode, &hdmi->fbi->modelist); + } + + /*Add XGA and SXGA to default modelist */ + fb_add_videomode(&xga_mode, &hdmi->fbi->modelist); + fb_add_videomode(&sxga_mode, &hdmi->fbi->modelist); + + console_unlock(); INIT_DELAYED_WORK(&hdmi->hotplug_work, hotplug_worker); |