[U-Boot] [PATCH V2 3/4] video: Modify exynos_fimd driver to support LCD console
Ajay Kumar
ajaykumar.rs at samsung.com
Thu Dec 13 12:29:26 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.
You should define CONFIG_CMD_BMP for proprietary Logo, and if
CONFIG_CMD_BMP is not defined you get output console on LCD.
Signed-off-by: Ajay Kumar <ajaykumar.rs at samsung.com>
---
drivers/video/exynos_fb.c | 5 ++++-
drivers/video/exynos_fimd.c | 10 ++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index 39d3b74..cb19192 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -65,6 +65,7 @@ static void exynos_lcd_init(vidinfo_t *vid)
exynos_fimd_lcd_init(vid);
}
+#ifdef CONFIG_CMD_BMP
static void draw_logo(void)
{
int x, y;
@@ -87,6 +88,7 @@ static void draw_logo(void)
addr = panel_info.logo_addr;
bmp_display(addr, x, y);
}
+#endif
static void lcd_panel_on(vidinfo_t *vid)
{
@@ -146,12 +148,13 @@ void lcd_ctrl_init(void *lcdbase)
void lcd_enable(void)
{
+#ifdef CONFIG_CMD_BMP
if (panel_info.logo_on) {
memset(lcd_base, 0, panel_width * panel_height *
(NBITS(panel_info.vl_bpix) >> 3));
draw_logo();
}
-
+#endif
lcd_panel_on(&panel_info);
}
diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c
index 06eae2e..0776b6d 100644
--- a/drivers/video/exynos_fimd.c
+++ b/drivers/video/exynos_fimd.c
@@ -88,14 +88,20 @@ static void exynos_fimd_set_par(unsigned int win_id)
/* DATAPATH is DMA */
cfg |= EXYNOS_WINCON_DATAPATH_DMA;
- /* bpp is 32 */
+#ifdef CONFIG_CMD_BMP /* To get proprietary LOGO */
cfg |= EXYNOS_WINCON_WSWP_ENABLE;
+#else /* To get output console on LCD */
+ cfg |= EXYNOS_WINCON_HAWSWP_ENABLE;
+#endif
/* dma burst is 16 */
cfg |= EXYNOS_WINCON_BURSTLEN_16WORD;
- /* pixel format is unpacked RGB888 */
+#ifdef CONFIG_CMD_BMP /* To get proprietary LOGO */
cfg |= EXYNOS_WINCON_BPPMODE_24BPP_888;
+#else /* To get output console on LCD */
+ cfg |= EXYNOS_WINCON_BPPMODE_16BPP_565;
+#endif
writel(cfg, (unsigned int)&fimd_ctrl->wincon0 +
EXYNOS_WINCON(win_id));
--
1.7.1
More information about the U-Boot
mailing list