summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Perez de Heredia <pedro.perez@digi.com>2012-01-21 19:27:38 +0100
committerPedro Perez de Heredia <pedro.perez@digi.com>2012-01-21 19:27:38 +0100
commitc05cdc0210afbe89f61ffb4b7b4b26bd8c137b5b (patch)
tree02e9bde12dcc0ce59e6564ef3fac02ec7a8ed200
parente2fdab3ae4ed922595557218157d54d1ee125993 (diff)
ccxmx5x: fixes in pixel format for RGB666 and RGB888 (#41820)
This commit fixes a problem on the ccxmx5x where the pixel format was incorrectly set for RGB666, RGB888 on VGA and HDMI interfaces. For the LCDs it was properly set. Fixes #41820. Signed-off-by: Pedro Perez de Heredia <pedro.perez@digi.com>
-rw-r--r--arch/arm/mach-mx5/devices_ccwmx51.c13
-rw-r--r--arch/arm/mach-mx5/devices_ccwmx53.c12
-rw-r--r--drivers/video/mxc/mxc_ipuv3_fb.c16
3 files changed, 28 insertions, 13 deletions
diff --git a/arch/arm/mach-mx5/devices_ccwmx51.c b/arch/arm/mach-mx5/devices_ccwmx51.c
index d313cbbc5bb4..91dca5b3b33b 100644
--- a/arch/arm/mach-mx5/devices_ccwmx51.c
+++ b/arch/arm/mach-mx5/devices_ccwmx51.c
@@ -986,6 +986,10 @@ int __init ccwmx51_init_fb(void)
#if !defined(CONFIG_CCXMX5X_DISP1)
if (i == 1) continue;
#endif
+
+ /* Set default pixel format, maybe overwritten later */
+ mx51_fb_data[i].interface_pix_fmt = i ? DISP1_PIX_FMT : DISP0_PIX_FMT;
+
if ((p = ccwmx51_get_video_cmdline_opt(i, "HDMI")) != NULL) {
#if defined(CONFIG_VIDEO_AD9389) || defined(CONFIG_VIDEO_AD9389_MODULE)
pr_info("HDMI interface in DISP%d\n", i);
@@ -1011,11 +1015,10 @@ int __init ccwmx51_init_fb(void)
&plcd_platform_data[i].fb_pdata,
sizeof(struct mxc_fb_platform_data));
plcd_platform_data[i].vif = i;
- if (!plcd_platform_data[i].fb_pdata.interface_pix_fmt)
- plcd_platform_data[i].fb_pdata.interface_pix_fmt =
- i ? DISP1_PIX_FMT : DISP0_PIX_FMT;
- mx51_fb_data[i].interface_pix_fmt =
- plcd_platform_data[i].fb_pdata.interface_pix_fmt;
+ if (plcd_platform_data[i].fb_pdata.interface_pix_fmt) {
+ mx51_fb_data[i].interface_pix_fmt =
+ plcd_platform_data[i].fb_pdata.interface_pix_fmt;
+ }
mxc_register_device(&lcd_pdev[i], (void *)&plcd_platform_data[i]);
}
} else if ((p = ccwmx51_get_video_cmdline_opt(i, "VGA")) != NULL) {
diff --git a/arch/arm/mach-mx5/devices_ccwmx53.c b/arch/arm/mach-mx5/devices_ccwmx53.c
index 98b65169e144..641563024919 100644
--- a/arch/arm/mach-mx5/devices_ccwmx53.c
+++ b/arch/arm/mach-mx5/devices_ccwmx53.c
@@ -732,6 +732,9 @@ int __init ccwmx5x_init_fb(void)
#if !defined(CONFIG_CCXMX5X_DISP1)
if (i == 1) continue;
#endif
+ /* Set default pixel format, maybe overwritten later */
+ mx53_fb_data[i].interface_pix_fmt = i ? DISP1_PIX_FMT : DISP0_PIX_FMT;
+
if ((p = ccwmx53_get_video_cmdline_opt(i, "disabled")) != NULL) {
/* Skip this interface */
continue;
@@ -760,11 +763,10 @@ int __init ccwmx5x_init_fb(void)
&plcd_platform_data[i].fb_pdata,
sizeof(struct mxc_fb_platform_data));
plcd_platform_data[i].vif = i;
- if (!plcd_platform_data[i].fb_pdata.interface_pix_fmt)
- plcd_platform_data[i].fb_pdata.interface_pix_fmt =
- i ? DISP1_PIX_FMT : DISP0_PIX_FMT;
- mx53_fb_data[i].interface_pix_fmt =
- plcd_platform_data[i].fb_pdata.interface_pix_fmt;
+ if (plcd_platform_data[i].fb_pdata.interface_pix_fmt) {
+ mx53_fb_data[i].interface_pix_fmt =
+ plcd_platform_data[i].fb_pdata.interface_pix_fmt;
+ }
mxc_register_device(&lcd_pdev[i], (void *)&plcd_platform_data[i]);
}
} else if ((p = ccwmx53_get_video_cmdline_opt(i, "VGA")) != NULL) {
diff --git a/drivers/video/mxc/mxc_ipuv3_fb.c b/drivers/video/mxc/mxc_ipuv3_fb.c
index 837ef5bffe2b..c12d0dc904f8 100644
--- a/drivers/video/mxc/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc/mxc_ipuv3_fb.c
@@ -1692,7 +1692,7 @@ static int mxcfb_setup(struct fb_info *fbi, struct platform_device *pdev)
struct mxc_fb_platform_data *plat_data = pdev->dev.platform_data;
int ret = 0;
#ifdef CONFIG_MODULE_CCXMX5X
- char *mstr;
+ char *mstr, vga = 0;
#endif
/* Need dummy values until real panel is configured */
@@ -1714,10 +1714,14 @@ static int mxcfb_setup(struct fb_info *fbi, struct platform_device *pdev)
if (mxcfbi->fb_mode_str) {
#ifdef CONFIG_MODULE_CCXMX5X
- if ((mstr = strstr(mxcfbi->fb_mode_str, "VGA@")) != NULL)
+ /* FIXME: we should move in future to use mxcfb_pre_setup
+ * instead of this hack in the video driver */
+ if ((mstr = strstr(mxcfbi->fb_mode_str, "VGA@")) != NULL) {
mxcfbi->fb_mode_str = mstr + 4;
+ vga = 1;
+ }
- /* Device specific adjustments */
+ // Device specific adjustments
mxcfb_adjust(mxcfbi);
#endif
if (mxcfbi->ipu_di >= 0) {
@@ -1834,6 +1838,12 @@ static int mxcfb_setup(struct fb_info *fbi, struct platform_device *pdev)
/*added found mode to fbi modelist*/
fb_var_to_videomode(&m, &fbi->var);
fb_add_videomode(&m, &fbi->modelist);
+#ifdef CONFIG_MODULE_CCXMX5X
+ /* FIXME: move in to mxcfb_pre_setup instead of this hack */
+ if (vga) {
+ fbi->var.sync |= FB_SYNC_EXT | FB_SYNC_CLK_LAT_FALL;
+ }
+#endif
}
}