From 7050f20cae617d20cfad1ee5786093ef700fc6cb Mon Sep 17 00:00:00 2001 From: Sandor Yu Date: Thu, 27 Dec 2012 16:49:37 +0800 Subject: [PATCH] ENGR00238382 MX6 HDMI: Change VGA mode flag, adjust default modelist sequency - Change VGA mode the flag from unknow to VESA. - Adjust default modelist order, put the VESA to the end of modelist. - Fix a build warning. Signed-off-by: Sandor Yu --- drivers/video/mxc_hdmi.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/video/mxc_hdmi.c b/drivers/video/mxc_hdmi.c index 4f14d1dfc584..369e54f7d865 100644 --- a/drivers/video/mxc_hdmi.c +++ b/drivers/video/mxc_hdmi.c @@ -94,7 +94,7 @@ static const struct fb_videomode vga_mode = { /* 640x480 @ 60 Hz, 31.5 kHz hsync */ NULL, 60, 640, 480, 39721, 48, 16, 33, 10, 96, 2, 0, - FB_VMODE_NONINTERLACED | FB_VMODE_ASPECT_4_3, 0, + FB_VMODE_NONINTERLACED | FB_VMODE_ASPECT_4_3, FB_MODE_IS_VESA, }; static const struct fb_videomode xga_mode = { @@ -1373,7 +1373,7 @@ static int mxc_hdmi_read_edid(struct mxc_hdmi *hdmi) memcpy(edid_old, hdmi->edid, HDMI_EDID_LEN); ret = mxc_edid_read(hdmi_i2c->adapter, hdmi_i2c->addr, hdmi->edid, - &hdmi->edid_cfg, hdmi->fbi); + &hdmi->edid_cfg, hdmi->fbi); if (ret < 0) return HDMI_EDID_FAIL; @@ -1572,6 +1572,11 @@ static void mxc_hdmi_default_modelist(struct mxc_hdmi *hdmi) fb_destroy_modelist(&hdmi->fbi->modelist); + /*Add XGA and SXGA to default modelist */ + fb_add_videomode(&vga_mode, &hdmi->fbi->modelist); + fb_add_videomode(&xga_mode, &hdmi->fbi->modelist); + fb_add_videomode(&sxga_mode, &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]; @@ -1579,10 +1584,6 @@ static void mxc_hdmi_default_modelist(struct mxc_hdmi *hdmi) 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(); } @@ -2206,7 +2207,7 @@ static int mxc_hdmi_disp_init(struct mxc_dispdrv_handle *disp, mode = fb_find_nearest_mode(&m, &hdmi->fbi->modelist); if (!mode) { pr_err("%s: could not find mode in modelist\n", __func__); - return; + return -1; } fb_videomode_to_var(&hdmi->fbi->var, mode); -- 2.39.5