summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bcc6cc9)
raw | patch | inline | side by side (parent: bcc6cc9)
author | Nikita Kiryanov <nikita@compulab.co.il> | |
Wed, 30 Jan 2013 21:39:57 +0000 (21:39 +0000) | ||
committer | Tom Rini <trini@ti.com> | |
Fri, 8 Mar 2013 21:41:13 +0000 (16:41 -0500) |
Currently there is no logical place to put the code that prepares the
splash image data. The splash image data should be ready in memory
before bmp_display() is called, and after the environment is ready
(since lcd.c looks for the splash image in an address specified by
the environment variable "splashimage").
Our window of opportunity in board_init_r() is therefore: between
env_relocate() and bmp_display(), and from the available options
only the lcd related functions in drv_lcd_init() seem appropriate
for such lcd oriented code.
Add the option to prepare the splash image data in lcd_logo() right
before it is sent to be displayed.
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
splash image data. The splash image data should be ready in memory
before bmp_display() is called, and after the environment is ready
(since lcd.c looks for the splash image in an address specified by
the environment variable "splashimage").
Our window of opportunity in board_init_r() is therefore: between
env_relocate() and bmp_display(), and from the available options
only the lcd related functions in drv_lcd_init() seem appropriate
for such lcd oriented code.
Add the option to prepare the splash image data in lcd_logo() right
before it is sent to be displayed.
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Jeroen Hofstee <jeroen@myspectrum.nl>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
README | patch | blob | history | |
common/lcd.c | patch | blob | history | |
include/lcd.h | patch | blob | history |
index d8cb3940d4f04810dcc6fe88a5f03f0b0cd5d8a8..b8ed1f13db279ba3e6abbd48a1c948a86ea8f884 100644 (file)
--- a/README
+++ b/README
=> vertically centered image
at x = dspWidth - bmpWidth - 9
+ CONFIG_SPLASH_SCREEN_PREPARE
+
+ If this option is set then the board_splash_screen_prepare()
+ function, which must be defined in your code, is called as part
+ of the splash screen display sequence. It gives the board an
+ opportunity to prepare the splash image data before it is
+ processed and sent to the frame buffer by U-Boot.
+
- Gzip compressed BMP image support: CONFIG_VIDEO_BMP_GZIP
If this option is set, additionally to standard BMP
diff --git a/common/lcd.c b/common/lcd.c
index 66d4f94f9eae0dcf8e8d57f9327f29b84f67019f..ba6975be2f8dcdfac0ee30b801d0878dba602b0e 100644 (file)
--- a/common/lcd.c
+++ b/common/lcd.c
}
#endif
+#ifdef CONFIG_SPLASH_SCREEN_PREPARE
+static inline int splash_screen_prepare(void)
+{
+ return board_splash_screen_prepare();
+}
+#else
+static inline int splash_screen_prepare(void)
+{
+ return 0;
+}
+#endif
+
static void *lcd_logo(void)
{
#ifdef CONFIG_SPLASH_SCREEN
int x = 0, y = 0;
do_splash = 0;
+ if (splash_screen_prepare())
+ return (void *)gd->fb_base;
+
addr = simple_strtoul (s, NULL, 16);
#ifdef CONFIG_SPLASH_SCREEN_ALIGN
s = getenv("splashpos");
diff --git a/include/lcd.h b/include/lcd.h
index c24164a9de0c74cf4cfb910ed695b1c6aa71f42d..4ac4ddd1e0edc35648c6e87f44974bdc23846c33 100644 (file)
--- a/include/lcd.h
+++ b/include/lcd.h
extern void lcd_ctrl_init (void *lcdbase);
extern void lcd_enable (void);
+extern int board_splash_screen_prepare(void);
/* setcolreg used in 8bpp/16bpp; initcolregs used in monochrome */
extern void lcd_setcolreg (ushort regno,