[PATCH 5/6] board: ti: am62x: evm: Add splash screen support

Simon Glass sjg at chromium.org
Mon Jan 23 19:42:40 CET 2023


Hi Nikhil,

On Mon, 23 Jan 2023 at 01:07, Nikhil M Jain <n-jain1 at ti.com> wrote:
>
> Splash screen function needs splash source information
> to load image and display it, splash_location provides
> the necessary info, Set default_splash_location to MMC
> at partition 1:1. Probe DSS for splash screen display.
>
> Signed-off-by: Nikhil M Jain <n-jain1 at ti.com>
> ---
>  board/ti/am62x/evm.c | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>
> diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c
> index d65ee1d696..a75c5365c8 100644
> --- a/board/ti/am62x/evm.c
> +++ b/board/ti/am62x/evm.c
> @@ -10,6 +10,8 @@
>  #include <asm/io.h>
>  #include <spl.h>
>  #include <dm/uclass.h>
> +#include <video.h>
> +#include <splash.h>
>  #include <k3-ddrss.h>
>  #include <fdt_support.h>
>  #include <asm/arch/hardware.h>
> @@ -18,8 +20,37 @@
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> +#ifdef CONFIG_SPLASH_SCREEN
> +       static struct splash_location default_splash_locations[] = {
> +               {
> +                       .name           = "mmc",
> +                       .storage        = SPLASH_STORAGE_MMC,
> +                       .flags          = SPLASH_STORAGE_FS,
> +                       .devpart        = "1:1",
> +               },
> +       };
> +
> +int splash_screen_prepare(void)
> +{
> +       return splash_source_load(default_splash_locations,
> +                               ARRAY_SIZE(default_splash_locations));
> +}
> +#endif
> +
>  int board_init(void)
>  {
> +       if (IS_ENABLED(CONFIG_VIDEO_TIDSS)) {
> +               int ret;
> +               struct udevice *dev;
> +
> +               ret = uclass_get_device_by_name(UCLASS_VIDEO, "dss at 30200000", &dev);

This is bound by stdio so you should not need this. What is going
wrong? Does the display not appear?

Also, please drop getting devices by name...it is really not nice.

> +               if (ret) {
> +                       debug("%s: Error device dss at 30200000 tree not node added %d\n"
> +                               , __func__, ret);
> +                       if (ret != -ENODEV)
> +                               panic("Cannot get DSS device: %d\n", ret);
> +               }
> +       }
>         return 0;
>  }
>
> --
> 2.17.1
>

Regards,
Simon


More information about the U-Boot mailing list