Skip to contentSkip to conversation

Add splash screen support via loading from flash

PATCH New Robert Winkler 4 participants 14 messages May 30, 2013 – Jun 4, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add splash screen support via loading from flash

---
 board/boundary/nitrogen6x/nitrogen6x.c | 22 ++++++++++++++++++++++
 include/configs/nitrogen6x.h           | 11 ++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)
board/boundary/nitrogen6x/nitrogen6x.c +22 -0
index 3b228cf..648b877 100644
@@ -401,6 +401,24 @@ int board_eth_init(bd_t *bis)
 	return 0;
 }
 
+
+void splash_screen_prepare(void)
+{
+	char *env_loadsplash;
+
+	if (!getenv("splashimage") || !getenv("splashsize"))
+		return;
+
+	env_loadsplash = getenv("loadsplash");
+	if (!env_loadsplash) {
+		printf("Environment variable loadsplash not found!\n");
+		return;
+	}
+
+	if (run_command_list(env_loadsplash, -1, 0))
+		printf("failed to run loadsplash %s\n\n", env_loadsplash);
+}
+
 static void setup_buttons(void)
 {
 	imx_iomux_v3_setup_multiple_pads(button_pads,
@@ -661,6 +679,10 @@ int board_video_skip(void)
 		printf("unsupported panel %s\n", panel);
 		ret = -EINVAL;
 	}
+
+	if (!ret)
+		splash_screen_prepare();
+
 	return (0 != ret);
 }
 
include/configs/nitrogen6x.h +10 -1
index 2c904d3..011666f 100644
@@ -38,7 +38,7 @@
 #define CONFIG_REVISION_TAG
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(10 * 1024 * 1024)
+#define CONFIG_SYS_MALLOC_LEN		(12 * 1024 * 1024)
 
 #define CONFIG_BOARD_EARLY_INIT_F
 #define CONFIG_MISC_INIT_R
@@ -151,6 +151,13 @@
 #define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_SPLASH_SCREEN
+#define CONFIG_SPLASH_SCREEN_ALIGN
+
+ #define CONFIG_VIDEO_BMP_GZIP
+#ifdef CONFIG_VIDEO_BMP_GZIP
+#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (6 * 1024 * 1024)
+#endif
+
 #define CONFIG_BMP_16BPP
 #define CONFIG_VIDEO_LOGO
 #define CONFIG_IPUV3_CLK 260000000
@@ -211,5 +218,7 @@
 		"echo details at http://boundarydevices.com/6q_bootscript ; " \
 		"setenv stdout serial\0" \
+	"loadsplash=if sf probe ; then " \
+		"sf read ${splashimage} c2000 ${splashsize} ; fi\0" \
 	"upgradeu=for dtype in " CONFIG_DRIVE_TYPES \
 		"; do " \
 		"for disk in 0 1 ; do ${dtype} dev ${disk} ;" \
Signature · 1 line
1.8.2.3
#1 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Dear Robert Winkler,

Quoted 5 lines · In message <1369947781-25077-1-git-send-email-robert.winkler@boundarydevices.co…
---
 board/boundary/nitrogen6x/nitrogen6x.c | 22 ++++++++++++++++++++++
 include/configs/nitrogen6x.h           | 11 ++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)

Could you please explain why you need custom code here?

What exactly cannot be done wioth the existing features?

BTW: it would be nice if you flag board specific code in the Subject:, and it is considered mandatory to Cc: the respective board maintainer.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Doubt isn't the opposite of faith; it is an element of faith.
- Paul Tillich, German theologian and historian
#2 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Quoted 5 lines · Wolfgang Denk

Dear Robert Winkler,

In message <
1369947781-25077-1-git-send-email-robert.winkler at boundarydevices.com> you wrote:

Quoted 8 lines
Quoted 5 lines
---
 board/boundary/nitrogen6x/nitrogen6x.c | 22 ++++++++++++++++++++++
 include/configs/nitrogen6x.h           | 11 ++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)

Could you please explain why you need custom code here?

I originally tried to use the CONFIG_SPLASH_SCREEN_PREPARE functionality. After some frustration, I figured out that without CONFIG_LCD, it is never actually called.
http://git.denx.de/?p=u-boot/u-boot-imx.git;a=blob;f=common/stdio.c;h=5d5117c0ed838195a2caad7c28c128247771cd92;hb=HEAD#l216

It does seem odd that there are 2 totally different paths and the other splash screen related macros are used in both but the prepare function is only called in the LCD case.

Since we use CONFIG_VIDEO and not CONFIG_LCD, this seemed to be the best, or at least the least invasive, solution.

Quoted 7 lines

What exactly cannot be done wioth the existing features?

BTW: it would be nice if you flag board specific code in the Subject:, and it is considered mandatory to Cc: the respective board maintainer.

I apologize for that. I'm new and didn't know till after I'd already sent it. I did CC the board maintainer, Eric. We also went over the code in person.

Quoted 12 lines

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Doubt isn't the opposite of faith; it is an element of faith.
- Paul Tillich, German theologian and historian

#3 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Dear Robert,

Quoted 7 lines · In message <CAMDMJ5PJ_AqZaxTRdnvS8ju_SkVHV7zoDrBUyhgjt2jfr4Ok4Q@mail.gmail.com>…
Quoted 6 lines
Quoted 4 lines
 board/boundary/nitrogen6x/nitrogen6x.c | 22 ++++++++++++++++++++++
 include/configs/nitrogen6x.h           | 11 ++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)

Could you please explain why you need custom code here?

Quoted 8 lines

I originally tried to use the CONFIG_SPLASH_SCREEN_PREPARE functionality. After some frustration, I figured out that without CONFIG_LCD, it is never actually called.
http://git.denx.de/?p=u-boot/u-boot-imx.git;a=blob;f=common/stdio.c;h=5d5117c0ed838195a2caad7c28c128247771cd92;hb=HEAD#l216

It does seem odd that there are 2 totally different paths and the other splash screen related macros are used in both but the prepare function is only called in the LCD case.

OK, so this is a bug that needs to be fixed - but for all boards.

Quoted 2 lines

Since we use CONFIG_VIDEO and not CONFIG_LCD, this seemed to be the best, or at least the least invasive, solution.

No, this is definitely not the "best" solution, as it keeps the bug, so the next one who tries to do what you are doing will run into it again.

Pleast let's fix the problem at the cause.

Please fix the video code to also run splash_screen_prepare() at the appropriate place. While you are at it, please also replace this construct

	1071 #ifdef CONFIG_SPLASH_SCREEN_PREPARE
	1072 static inline int splash_screen_prepare(void)
	1073 {
	1074         return board_splash_screen_prepare();
	1075 }
	1076 #else
	1077 static inline int splash_screen_prepare(void)
	1078 {
	1079         return 0;
	1080 }
	1081 #endif

(in "common/lcd.c") and use a "weak" function for splash_screen_prepare(). board_splash_screen_prepare() is no longer needed, then (the boards can provide their own implementation of splash_screen_prepare()).

Thanks.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Es ist offensichtlich, dass das menschliche Gehirn wie  ein  Computer
funktioniert.  Da  es  keine  dummen Computer gibt, gibt es also auch
keine dummen Menschen. Nur ein paar Leute, die unter DOS laufen.
                                                       -- <unbekannt>
#4 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Quoted 48 lines · Wolfgang Denk

Dear Robert,

Quoted 7 lines · In message <CAMDMJ5PJ_AqZaxTRdnvS8ju_SkVHV7zoDrBUyhgjt2jfr4Ok4Q@mail.gmail.com>…
Quoted 6 lines
Quoted 4 lines
 board/boundary/nitrogen6x/nitrogen6x.c | 22 ++++++++++++++++++++++
 include/configs/nitrogen6x.h           | 11 ++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)

Could you please explain why you need custom code here?

Quoted 8 lines

I originally tried to use the CONFIG_SPLASH_SCREEN_PREPARE functionality. After some frustration, I figured out that without CONFIG_LCD, it is never actually called.
http://git.denx.de/?p=u-boot/u-boot-imx.git;a=blob;f=common/stdio.c;h=5d5117c0ed838195a2caad7c28c128247771cd92;hb=HEAD#l216

It does seem odd that there are 2 totally different paths and the other splash screen related macros are used in both but the prepare function is only called in the LCD case.

OK, so this is a bug that needs to be fixed - but for all boards.

Quoted 2 lines

Since we use CONFIG_VIDEO and not CONFIG_LCD, this seemed to be the best, or at least the least invasive, solution.

No, this is definitely not the "best" solution, as it keeps the bug, so the next one who tries to do what you are doing will run into it again.

Pleast let's fix the problem at the cause.

Please fix the video code to also run splash_screen_prepare() at the appropriate place. While you are at it, please also replace this construct

        1071 #ifdef CONFIG_SPLASH_SCREEN_PREPARE
        1072 static inline int splash_screen_prepare(void)
        1073 {
        1074         return board_splash_screen_prepare();
        1075 }
        1076 #else
        1077 static inline int splash_screen_prepare(void)
        1078 {
        1079         return 0;
        1080 }
        1081 #endif
Quoted 4 lines

(in "common/lcd.c") and use a "weak" function for splash_screen_prepare(). board_splash_screen_prepare() is no longer needed, then (the boards can provide their own implementation of splash_screen_prepare()).

I'm not quite clear on how it should be.

So if I were just fixing lcd.c to use a weak function it would look like this:
#ifdef CONFIG_SPLASH_SCREEN_PREPARE
int __splash_screen_prepare(void)

{
    return 0;
}

int splash_screen_prepare(void)

    __attribute__ ((weak, alias("__splash_screen_prepare")));

#endif

But it'd also have to go in cfb_console.c. Is it possible for a board to ever use both CONFIG_LCD and CONFIG_VIDEO and if ?

Also are prototypes necessary? Looking at cfb_console for example weak functions I see a prototype for video_set_lut in video_fb.h but I can't find any for board_video_skip.

Quoted 8 lines

Thanks.

Best regards,

Wolfgang Denk

Quoted 8 lines

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Es ist offensichtlich, dass das menschliche Gehirn wie ein Computer funktioniert. Da es keine dummen Computer gibt, gibt es also auch keine dummen Menschen. Nur ein paar Leute, die unter DOS laufen.

                                                       -- <unbekannt>

Thanks,

Robert Winkler

#5 lore raw

PATCH 1/1 Add splash screen support via loading from flash

In reply to Robert Winkler

Hi Robert,

Quoted 22 lines · Robert Winkler
---
 board/boundary/nitrogen6x/nitrogen6x.c | 22 ++++++++++++++++++++++
 include/configs/nitrogen6x.h           | 11 ++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)
board/boundary/nitrogen6x/nitrogen6x.c +8 -0
index 3b228cf..648b877 100644
@@ -401,6 +401,24 @@ int board_eth_init(bd_t *bis)
 	return 0;
 }
 
+
+void splash_screen_prepare(void)
+{
+	char *env_loadsplash;
+
+	if (!getenv("splashimage") || !getenv("splashsize"))
+		return;
+

board/boundary/nitrogen6x/nitrogen6x.c int board_eth_init(bd_t *bis) · line 421

Quoted 10 lines
board/boundary/nitrogen6x/nitrogen6x.c +10 -0
+	env_loadsplash = getenv("loadsplash");
+	if (!env_loadsplash) {
+		printf("Environment variable loadsplash not found!\n");
+		return;
+	}
+
+	if (run_command_list(env_loadsplash, -1, 0))
+		printf("failed to run loadsplash %s\n\n", env_loadsplash);
+}
+

Which is the advantage instead of using the "preboot" variable setting CONFIG_PREBOOT ? It does pretty the same and you can move the whole script outside of board code.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#6 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Hello Stefano

Quoted 33 lines · Stefano Babic

Hi Robert,

Quoted 29 lines · Robert Winkler
---
 board/boundary/nitrogen6x/nitrogen6x.c | 22 ++++++++++++++++++++++
 include/configs/nitrogen6x.h           | 11 ++++++++++-
 2 files changed, 32 insertions(+), 1 deletion(-)
board/boundary/nitrogen6x/nitrogen6x.c +15 -0
index 3b228cf..648b877 100644
@@ -401,6 +401,24 @@ int board_eth_init(bd_t *bis)
      return 0;
 }
 
+
+void splash_screen_prepare(void)
+{
+     char *env_loadsplash;
+
+     if (!getenv("splashimage") || !getenv("splashsize"))
+             return;
+
+     env_loadsplash = getenv("loadsplash");
+     if (!env_loadsplash) {
+             printf("Environment variable loadsplash not found!\n");
+             return;
+     }
+
+     if (run_command_list(env_loadsplash, -1, 0))
Quoted 8 lines

board/boundary/nitrogen6x/nitrogen6x.c int board_eth_init(bd_t *bis) · line 421

Quoted 3 lines
board/boundary/nitrogen6x/nitrogen6x.c +3 -0
+             printf("failed to run loadsplash %s\n\n", env_loadsplash);
+}
+

Which is the advantage instead of using the "preboot" variable setting CONFIG_PREBOOT ? It does pretty the same and you can move the whole script outside of board code.

The preboot command is run too late. It looks like it is run in main_loop but U-Boot looks for the splash image
at the address in the splashimage variable in board_init_r -> stdio_init -> drv_lcd_init or drv_video_init (depending on whether you have CONFIG_LCD or CONFIG_VIDEO).

I have a patch ready that will fix the underlying problem with CONFIG_SPLASH_SCREEN_PREPARE not working
for CONFIG_VIDEO so the nitrogen specific code (in a separate patch of course) will change to use the provided callback instead of just calling it in our own board_video_skip, but other than that it'll be the same as the patch I already submitted.

Quoted 11 lines

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

Thanks,

Robert Winkler

#7 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Hi Robert,

Quoted 9 lines · Robert Winkler
Quoted 3 lines

Which is the advantage instead of using the "preboot" variable setting CONFIG_PREBOOT ? It does pretty the same and you can move the whole script outside of board code.

The preboot command is run too late. It looks like it is run in main_loop but U-Boot looks for the splash image
at the address in the splashimage variable in board_init_r -> stdio_init -> drv_lcd_init or drv_video_init (depending on whether you have CONFIG_LCD or CONFIG_VIDEO).

You are describing a bug - then it should be fixed globally, not only for this board.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#8 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Hi Stefano,

Quoted 8 lines · Stefano Babic

Hi Robert,

Quoted 4 lines · Robert Winkler
Quoted 3 lines

Which is the advantage instead of using the "preboot" variable setting CONFIG_PREBOOT ? It does pretty the same and you can move the whole script outside of board code.

Quoted 9 lines
Quoted 5 lines

The preboot command is run too late. It looks like it is run in main_loop but U-Boot looks for the splash image
at the address in the splashimage variable in board_init_r -> stdio_init -> drv_lcd_init or drv_video_init (depending on whether you have CONFIG_LCD or CONFIG_VIDEO).

You are describing a bug - then it should be fixed globally, not only for this board.

What's the bug?
- preboot being called too late, or
- splash_screen_prepare() being called too early

It seems that having splash_screen_prepare() called early makes sense, because stdout could be set to include VGA and having access to stdout is very useful in preboot commands.

Please advise,

Eric

#9 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Hi Eric,

Quoted 17 lines · Eric Nelson

Hi Stefano,

Quoted 14 lines · Stefano Babic

Hi Robert,

Quoted 9 lines · Robert Winkler
Quoted 3 lines

Which is the advantage instead of using the "preboot" variable setting CONFIG_PREBOOT ? It does pretty the same and you can move the whole script outside of board code.

The preboot command is run too late. It looks like it is run in main_loop but U-Boot looks for the splash image
at the address in the splashimage variable in board_init_r -> stdio_init -> drv_lcd_init or drv_video_init (depending on whether you have CONFIG_LCD or CONFIG_VIDEO).

Quoted 6 lines
Quoted 3 lines

You are describing a bug - then it should be fixed globally, not only for this board.

What's the bug?
- preboot being called too late, or

preboot is not called too late. The behavior is correct and wanted, as the name says, and the variable is evaluated during the main loop before booting. My suggestion comes because it is possible to implement a splashscreen (even if the name can be misleading..), setting preboot to something like "nand read <address> <offset>;bmp display <address>". In your case (with a bmp image), it could be:

	"preboot=if sf probe ; then " \
		"sf read ${splashimage} c2000 ${splashsize} ; bmp display

${splashimage}; fi\0"

The behavior is exactly as the subject in the patch, the delay is from power-on until main loop is called. It can be on some boards acceptable, sometimes not.

Quoted 6 lines

- splash_screen_prepare() being called too early

It seems that having splash_screen_prepare() called early makes sense, because stdout could be set to include VGA and having access to stdout is very useful in preboot commands.

You mention that it does not work, and then I assume that it is a bug, because an image should be displayed. But again, if it does not work, the issue is related to the video subsystem and should be fixed there and not in board code - this is my point.

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#10 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Hi Stefano,

Quoted 33 lines · Stefano Babic

Hi Eric,

Quoted 17 lines · Eric Nelson

Hi Stefano,

Quoted 14 lines · Stefano Babic

Hi Robert,

Quoted 9 lines · Robert Winkler
Quoted 3 lines

Which is the advantage instead of using the "preboot" variable setting CONFIG_PREBOOT ? It does pretty the same and you can move the whole script outside of board code.

The preboot command is run too late. It looks like it is run in main_loop but U-Boot looks for the splash image
at the address in the splashimage variable in board_init_r -> stdio_init -> drv_lcd_init or drv_video_init (depending on whether you have CONFIG_LCD or CONFIG_VIDEO).

Quoted 6 lines
Quoted 3 lines

You are describing a bug - then it should be fixed globally, not only for this board.

What's the bug?
- preboot being called too late, or

preboot is not called too late. The behavior is correct and wanted, as the name says, and the variable is evaluated during the main loop before booting. My suggestion comes because it is possible to implement a splashscreen (even if the name can be misleading..), setting preboot to something like "nand read <address> <offset>;bmp display <address>". In your case (with a bmp image), it could be:

Quoted 8 lines
	"preboot=if sf probe ; then " \
		"sf read ${splashimage} c2000 ${splashsize} ; bmp display

${splashimage}; fi\0"

The behavior is exactly as the subject in the patch, the delay is from power-on until main loop is called. It can be on some boards acceptable, sometimes not.

Gotcha. This method doesn't involve splash_screen_prepare() though.

It also will blink the display since the splash screen will paint after the the compiled-in logo case.

	http://git.denx.de/u-boot.git/?p=u-boot.git;a=blob;f=common/lcd.c#l1085
Quoted 7 lines
Quoted 6 lines

- splash_screen_prepare() being called too early

It seems that having splash_screen_prepare() called early makes sense, because stdout could be set to include VGA and having access to stdout is very useful in preboot commands.

Quoted 5 lines

You mention that it does not work, and then I assume that it is a bug, because an image should be displayed. But again, if it does not work, the issue is related to the video subsystem and should be fixed there and not in board code - this is my point.

This works with Robert's latest patch, which implements splash_screen_prepare() for boards that use cfb_console.

It just wasn't implemented there.

Regards,

Eric

#11 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Stefano

Quoted 52 lines · Eric Nelson

Hi Stefano,

Quoted 39 lines · Stefano Babic

Hi Eric,

Quoted 21 lines · Eric Nelson

Hi Stefano,

Quoted 17 lines · Stefano Babic

Hi Robert,

Quoted 10 lines · Robert Winkler
Quoted 3 lines

Which is the advantage instead of using the "preboot" variable setting CONFIG_PREBOOT ? It does pretty the same and you can move the whole script outside of board code.

The preboot command is run too late. It looks like it is run in main_loop but U-Boot looks for the splash image
at the address in the splashimage variable in board_init_r -> stdio_init -> drv_lcd_init or drv_video_init (depending on whether you have CONFIG_LCD or CONFIG_VIDEO).

Quoted 6 lines
Quoted 3 lines

You are describing a bug - then it should be fixed globally, not only for this board.

What's the bug?
- preboot being called too late, or

preboot is not called too late. The behavior is correct and wanted, as the name says, and the variable is evaluated during the main loop before booting. My suggestion comes because it is possible to implement a splashscreen (even if the name can be misleading..), setting preboot to something like "nand read <address> <offset>;bmp display <address>". In your case (with a bmp image), it could be:

Quoted 8 lines
        "preboot=if sf probe ; then " \
                "sf read ${splashimage} c2000 ${splashsize} ; bmp display

${splashimage}; fi\0"

The behavior is exactly as the subject in the patch, the delay is from power-on until main loop is called. It can be on some boards acceptable, sometimes not.

Quoted 21 lines

Gotcha. This method doesn't involve splash_screen_prepare() though.

It also will blink the display since the splash screen will paint after the the compiled-in logo case.

http://git.denx.de/u-boot.git/?p=u-boot.git;a=blob;f=common/lcd.c#l1085

Quoted 13 lines
Quoted 6 lines

- splash_screen_prepare() being called too early

It seems that having splash_screen_prepare() called early makes sense, because stdout could be set to include VGA and having access to stdout is very useful in preboot commands.

You mention that it does not work, and then I assume that it is a bug, because an image should be displayed. But again, if it does not work, the issue is related to the video subsystem and should be fixed there and not in board code - this is my point.

Yes, as Eric mentioned I submitted a patch yesterday which fixes splash screen prepare not working
with CONFIG_VIDEO and will submit a separate patch to add the function to nitrogen6x.c once that goes through.

The only difference is that we won't call it in board_video_skip in nitrogen6x.c, it'll be called in
drv_video_init similar to the way it is called in lcd_logo from drv_lcd_init.

Another thing that Eric pointed out that is a difference between PREBOOT and SPLASH_SCREEN_PREPARE
is the former will always run but the latter will only run if there's a display which is preferable.

If I had submitted the fix first instead of just working around the bug I would probably have saved
some confusion. Sorry about that.

Quoted 11 lines

This works with Robert's latest patch, which implements splash_screen_prepare() for boards that use cfb_console.

It just wasn't implemented there.

Regards,

Eric

#12 lore raw

PATCH 1/1 Add splash screen support via loading from flash

Hi Robert,

Quoted 4 lines · Robert Winkler

Yes, as Eric mentioned I submitted a patch yesterday which fixes splash screen prepare not working
with CONFIG_VIDEO and will submit a separate patch to add the function to nitrogen6x.c once that goes through.

Ok, understood.

Quoted 5 lines

The only difference is that we won't call it in board_video_skip in nitrogen6x.c, it'll be called in
drv_video_init similar to the way it is called in lcd_logo from drv_lcd_init.

Quoted 8 lines

Another thing that Eric pointed out that is a difference between PREBOOT and SPLASH_SCREEN_PREPARE
is the former will always run but the latter will only run if there's a display which is preferable.

If I had submitted the fix first instead of just working around the bug I would probably have saved
some confusion. Sorry about that.

No worry - thanks for explanation, now we have better understood the issue.

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
#13 lore raw

PATCH 1/1 Add splash screen support via loading from flash

In reply to Eric Nelson

Hi Eric,

Quoted 5 lines · Eric Nelson

Gotcha. This method doesn't involve splash_screen_prepare() though.

It also will blink the display since the splash screen will paint after the the compiled-in logo case.

    http://git.denx.de/u-boot.git/?p=u-boot.git;a=blob;f=common/lcd.c#l1085

Right, this methods has drawbacks in your case.

Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================