From: Jeroen Hofstee <jeroen@myspectrum.nl>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/5] lcd: add option for board specific splash screen preparation
Date: Sun, 20 Jan 2013 21:34:04 +0100 [thread overview]
Message-ID: <50FC54BC.3070101@myspectrum.nl> (raw)
In-Reply-To: <1356246228-26732-3-git-send-email-nikita@compulab.co.il>
On 12/23/2012 08:03 AM, Nikita Kiryanov wrote:
> 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.
>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
> ---
> README | 8 ++++++++
> common/lcd.c | 15 +++++++++++++++
> include/lcd.h | 1 +
> 3 files changed, 24 insertions(+)
>
> diff --git a/README b/README
> index 78f40df..cffc016 100644
> --- a/README
> +++ b/README
> @@ -1541,6 +1541,14 @@ CBFS (Coreboot Filesystem) support
> => 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 66d4f94..129cf7e 100644
> --- a/common/lcd.c
> +++ b/common/lcd.c
> @@ -1034,6 +1034,18 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
> }
> #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
> @@ -1045,6 +1057,9 @@ static void *lcd_logo(void)
> int x = 0, y = 0;
> do_splash = 0;
>
> + if (splash_screen_prepare())
> + return (void *)lcd_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 c24164a..4ac4ddd 100644
> --- a/include/lcd.h
> +++ b/include/lcd.h
> @@ -47,6 +47,7 @@ extern struct vidinfo panel_info;
>
> 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,
Other boards seem to do this in lcd_enable. Perhaps that is also an option.
Regards,
Jeroen
next prev parent reply other threads:[~2013-01-20 20:34 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-23 7:03 [U-Boot] [PATCH 0/5] Add splash screen for CM-T35 Nikita Kiryanov
2012-12-23 7:03 ` [U-Boot] [PATCH 1/5] omap3: add useful dss defines Nikita Kiryanov
2013-01-20 21:42 ` Jeroen Hofstee
2013-01-21 7:53 ` Nikita Kiryanov
2013-01-21 18:38 ` Jeroen Hofstee
2013-01-23 8:23 ` Nikita Kiryanov
2012-12-23 7:03 ` [U-Boot] [PATCH 2/5] lcd: add option for board specific splash screen preparation Nikita Kiryanov
2013-01-20 20:34 ` Jeroen Hofstee [this message]
2013-01-21 7:51 ` Nikita Kiryanov
2013-01-21 19:14 ` Jeroen Hofstee
2013-01-23 8:31 ` Nikita Kiryanov
2013-01-23 22:13 ` Jeroen Hofstee
2013-01-24 8:35 ` Igor Grinberg
2013-01-24 22:34 ` Jeroen Hofstee
2013-01-25 6:45 ` Igor Grinberg
2013-01-26 13:33 ` Jeroen Hofstee
2012-12-23 7:03 ` [U-Boot] [PATCH 3/5] cm-t35: add support for dvi displays Nikita Kiryanov
2013-01-20 20:59 ` Jeroen Hofstee
2013-01-21 8:12 ` Nikita Kiryanov
2013-01-23 21:39 ` Jeroen Hofstee
2013-01-24 9:02 ` Igor Grinberg
2012-12-23 7:03 ` [U-Boot] [PATCH 4/5] cm-t35: add support for user defined lcd parameters Nikita Kiryanov
2013-01-20 21:08 ` Jeroen Hofstee
2013-01-21 8:25 ` Nikita Kiryanov
2013-01-23 22:36 ` Jeroen Hofstee
2013-01-24 9:12 ` Igor Grinberg
2012-12-23 7:03 ` [U-Boot] [PATCH 5/5] cm-t35: add support for loading splash image from NAND Nikita Kiryanov
2012-12-24 8:55 ` Jeroen Hofstee
2012-12-25 8:56 ` Nikita Kiryanov
2012-12-26 14:27 ` Jeroen Hofstee
2012-12-30 14:39 ` Nikita Kiryanov
2013-01-22 7:37 ` Albert ARIBAUD
2013-01-23 10:47 ` Nikita Kiryanov
2013-01-23 11:07 ` Nikita Kiryanov
2013-03-26 14:51 ` [U-Boot] [U-Boot, " Tom Rini
2013-01-20 12:25 ` [U-Boot] [PATCH 0/5] Add splash screen for CM-T35 Nikita Kiryanov
2013-01-20 20:31 ` Jeroen Hofstee
2013-01-21 14:10 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50FC54BC.3070101@myspectrum.nl \
--to=jeroen@myspectrum.nl \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox