[U-Boot] splash screen handling in u-boot when booting an OS

some Blackfin boards support CONFIG_VIDEO so there is a splash screen while u- boot is running. however, we dont always boot a Linux image with a video driver enabled. so sometimes a few weird things can occur due to the DMA always running in the background (such as attempting to suspend to RAM).
there doesnt seem to be any support with CONFIG_VIDEO though for turning things off. i can also see cases though where people wouldnt want to turn the video off until the OS is up and running and ready to take over the display ("flicker free" and what not). but on our Blackfin development boards, we arent concerned with that by default.
so should i extend the CONFIG_VIDEO interface to include an option to shut down the video before booting an OS ? similar to the call to usb_stop() in cmd_bootm.c. -mike

From: Michael Hennerich michael.hennerich@analog.com
In case there is no frame buffer driver present in Linux to hand over the PPI LCD DMA upon boot, the DMA initiated by u-boot to display the splash screen runs unattended. Therefore always stop the video driver in u-boot before starting Linux. If people don't want this behavior, then they can simply stub out the video_stop() function in their board video driver.
Signed-off-by: Michael Hennerich michael.hennerich@analog.com Signed-off-by: Mike Frysinger vapier@gentoo.org --- arch/blackfin/lib/boot.c | 9 +++++++++ board/bf527-ezkit/video.c | 11 +++++++++++ board/bf533-stamp/video.c | 6 ++++++ board/bf548-ezkit/video.c | 6 ++++++ board/cm-bf548/video.c | 6 ++++++ 5 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/arch/blackfin/lib/boot.c b/arch/blackfin/lib/boot.c index 37aa82a..768a882 100644 --- a/arch/blackfin/lib/boot.c +++ b/arch/blackfin/lib/boot.c @@ -18,6 +18,10 @@ extern void swap_to(int device_id); #endif
+#ifdef CONFIG_VIDEO +extern void video_stop(void); +#endif + static char *make_command_line(void) { char *dest = (char *)CONFIG_LINUX_CMDLINE_ADDR; @@ -45,6 +49,11 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima swap_to(FLASH); #endif
+#ifdef CONFIG_VIDEO + /* maybe this should be standardized and moved to bootm ... */ + video_stop(); +#endif + appl = (int (*)(char *))images->ep;
printf("Starting Kernel at = %p\n", appl); diff --git a/board/bf527-ezkit/video.c b/board/bf527-ezkit/video.c index 891070b..51bdf02 100644 --- a/board/bf527-ezkit/video.c +++ b/board/bf527-ezkit/video.c @@ -378,6 +378,17 @@ static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y)
}
+void video_stop(void) +{ + DisablePPI(); + DisableDMA(); + DisableTIMER0(); + DisableTIMER1(); +#ifdef CONFIG_MK_BF527_EZKIT_REV_2_1 + lq035q1_control(LQ035_SHUT_CTL, LQ035_SHUT); +#endif +} + void video_putc(const char c) { } diff --git a/board/bf533-stamp/video.c b/board/bf533-stamp/video.c index 939bd35..75b8adc 100644 --- a/board/bf533-stamp/video.c +++ b/board/bf533-stamp/video.c @@ -150,6 +150,12 @@ static void video_init(char *NTSCFrame) bfin_write_PPI_CONTROL(0x0083); }
+void video_stop(void) +{ + bfin_write_PPI_CONTROL(0); + bfin_write_DMA0_CONFIG(0); +} + int drv_video_init(void) { struct stdio_dev videodev; diff --git a/board/bf548-ezkit/video.c b/board/bf548-ezkit/video.c index af3d58b..cde877a 100644 --- a/board/bf548-ezkit/video.c +++ b/board/bf548-ezkit/video.c @@ -224,6 +224,12 @@ int video_init(void *dst) return 0; }
+void video_stop(void) +{ + DisablePPI(); + DisableDMA(); +} + static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y) { if (dcache_status()) diff --git a/board/cm-bf548/video.c b/board/cm-bf548/video.c index d43f5a1..c501697 100644 --- a/board/cm-bf548/video.c +++ b/board/cm-bf548/video.c @@ -225,6 +225,12 @@ int video_init(void *dst) return 0; }
+void video_stop(void) +{ + DisablePPI(); + DisableDMA(); +} + static void dma_bitblit(void *dst, fastimage_t *logo, int x, int y) { if (dcache_status())
participants (1)
-
Mike Frysinger