From 90464971f999032fec077bc081b578131b2a3319 Mon Sep 17 00:00:00 2001 From: Donghwa Lee Date: Wed, 9 May 2012 19:23:46 +0000 Subject: EXYNOS: display 32bpp bitmap TIZEN logo This patch supports drawing 32bpp bitmap TIZEN logo in exynos fb. "tizen_hd_logo.h" data is compressed from trats_logo.bmp to trats_logo.bmp.gz by gzip and converted to tizen_hd_logo.h header file format by some application. The logo data is decompressed in the exynos fb driver by bmp_display(). Signed-off-by: Donghwa Lee Signed-off-by: Kyungmin Park Acked-by: Minkyu Kang Signed-off-by: Anatolij Gustschin --- drivers/video/exynos_fb.c | 19 +++++++++++++++++++ drivers/video/exynos_fb.h | 7 ------- drivers/video/exynos_fimd.c | 2 +- 3 files changed, 20 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index a1cf449..92be4ea 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -67,6 +67,18 @@ static void exynos_lcd_init(vidinfo_t *vid) exynos_fimd_lcd_init(vid); } +static void draw_logo(void) +{ + int x, y; + ulong addr; + + x = ((panel_width - panel_info.logo_width) >> 1); + y = ((panel_height - panel_info.logo_height) >> 1) - 4; + + addr = panel_info.logo_addr; + bmp_display(addr, x, y); +} + static void lcd_panel_on(vidinfo_t *vid) { udelay(vid->init_delay); @@ -118,6 +130,13 @@ void lcd_ctrl_init(void *lcdbase) void lcd_enable(void) { + if (panel_info.logo_on) { + memset(lcd_base, 0, panel_width * panel_height * + (NBITS(panel_info.vl_bpix) >> 3)); + + draw_logo(); + } + lcd_panel_on(&panel_info); } diff --git a/drivers/video/exynos_fb.h b/drivers/video/exynos_fb.h index 66f5da6..4ff2efd 100644 --- a/drivers/video/exynos_fb.h +++ b/drivers/video/exynos_fb.h @@ -27,13 +27,6 @@ #define MAX_CLOCK (86 * 1000000) -enum exynos_fb_rgb_mode_t { - MODE_RGB_P = 0, - MODE_BGR_P = 1, - MODE_RGB_S = 2, - MODE_BGR_S = 3, -}; - enum exynos_cpu_auto_cmd_rate { DISABLE_AUTO_FRM, PER_TWO_FRM, diff --git a/drivers/video/exynos_fimd.c b/drivers/video/exynos_fimd.c index 6416b90..f07568a 100644 --- a/drivers/video/exynos_fimd.c +++ b/drivers/video/exynos_fimd.c @@ -273,7 +273,7 @@ void exynos_fimd_lcd_init(vidinfo_t *vid) /* store panel info to global variable */ pvid = vid; - rgb_mode = MODE_RGB_P; + rgb_mode = vid->rgb_mode; if (vid->interface_mode == FIMD_RGB_INTERFACE) { cfg |= EXYNOS_VIDCON0_VIDOUT_RGB; -- cgit v1.1