Patchwork [U-Boot,V5,3/4] video: Modify exynos_fimd driver to support LCD console

login
register
mail settings
Submitter Ajay Kumar
Date Jan. 8, 2013, 7:32 a.m.
Message ID <1357630328-16346-4-git-send-email-ajaykumar.rs@samsung.com>
Download mbox | patch
Permalink /patch/210305/
State Changes Requested
Delegated to: Minkyu Kang
Headers show

Comments

Ajay Kumar - Jan. 8, 2013, 7:32 a.m.
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.
Define CONFIG_CMD_BMP and make logo_on = 1 to get Logo on screen.
Use logo_on = 0 to get output console on LCD.

Changes in V2:
 -- Use CONFIG_CMD_BMP instead of CONFIG_TIZEN to distinguish
    between Proprietary logo support and LCD console support.
Changes in V3:
 -- Create and use new config CONFIG_EXYNOS_LOGO instead of using
    CONFIG_CMD_BMP
Changes in V4:
 -- Remove #ifdef CONFIG_EXYNOS_LOGO, instead use logo_on field
    to add LCD console support.
Changes in V5:
 -- Remove dummy definition for bmp_display. Instead, place the call to
    bmp_display inside #ifdef CONFIG_CMD_BMP
 -- Added changelog in commit message.

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

Patch

diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index d9a3f9a..944e9fa 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -85,7 +85,9 @@  static void draw_logo(void)
 	}
 
 	addr = panel_info.logo_addr;
+#ifdef	CONFIG_CMD_BMP
 	bmp_display(addr, x, y);
+#endif
 }
 
 static void lcd_panel_on(vidinfo_t *vid)
diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
index 06eae2e..2efe6a6 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));