[U-Boot] [PATCH V4 3/4] video: Modify exynos_fimd driver to support LCD console

Ajay Kumar ajaykumar.rs at samsung.com
Fri Dec 21 11:35:21 CET 2012


Currently, exynos FIMD driver is being used to support only TIZEN LOGOs.
In order to get LCD console, we need to enable half word swap feature
of FIMD and use 16 BPP.
LCD console and proprietary Logo cannot be used simultaneously.
We use logo_on field inside vidinfo_t structure to decide whether
user wants Logo or Console.

Signed-off-by: Ajay Kumar <ajaykumar.rs at samsung.com>
---
 drivers/video/exynos_fb.c   |    7 +++++++
 drivers/video/exynos_fimd.c |   12 ++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index d9a3f9a..ee916be 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -45,6 +45,13 @@ short console_row;
 
 static unsigned int panel_width, panel_height;
 
+#ifndef CONFIG_CMD_BMP
+int bmp_display(ulong addr, int x, int y)
+{
+	return 0;
+}
+#endif
+
 static void exynos_lcd_init_mem(void *lcdbase, vidinfo_t *vid)
 {
 	unsigned long palette_size;
diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
index 06eae2e..f957dc8 100644
--- a/drivers/video/exynos_fimd.c
+++ b/drivers/video/exynos_fimd.c
@@ -88,14 +88,18 @@ static void exynos_fimd_set_par(unsigned int win_id)
 	/* DATAPATH is DMA */
 	cfg |= EXYNOS_WINCON_DATAPATH_DMA;
 
-	/* bpp is 32 */
-	cfg |= EXYNOS_WINCON_WSWP_ENABLE;
+	if (pvid->logo_on) /* To get proprietary LOGO */
+		cfg |= EXYNOS_WINCON_WSWP_ENABLE;
+	else /* To get output console on LCD */
+		cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
 
 	/* dma burst is 16 */
 	cfg |= EXYNOS_WINCON_BURSTLEN_16WORD;
 
-	/* pixel format is unpacked RGB888 */
-	cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
+	if (pvid->logo_on) /* To get proprietary LOGO */
+		cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
+	else /* To get output console on LCD */
+		cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
 
 	writel(cfg, (unsigned int)&fimd_ctrl->wincon0 +
 			EXYNOS_WINCON(win_id));
-- 
1.7.1



More information about the U-Boot mailing list