All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] DM_VIDEO and splash screen functionality
Date: Tue, 28 May 2019 16:41:01 +0300	[thread overview]
Message-ID: <CAByghJa43xo5G6us+03xDVhq7KBC2gX5V95Equo9jXC5_L8n3A@mail.gmail.com> (raw)
In-Reply-To: <20190528143058.0177736a@crub>

Hi Anatolij,

On Tue, May 28, 2019 at 3:31 PM Anatolij Gustschin <agust@denx.de> wrote:
>
> Hi Igor,
>
> On Tue, 28 May 2019 13:35:13 +0300
> Igor Opaniuk igor.opaniuk at gmail.com wrote:
>
> > Hi all,
> >
> > Just a clarifying question:
> > I assume a splash screen functionality from common/splash.c and
> > common/splash_source.c is marked as deprecated and is not going to be
> > used anymore alongside with DM_VIDEO enabled, right?
>
> no, this is still used with DM_VIDEO enabled. This splash image
> loading code is for pre-loading the bitmap (file) from configurable
> storage source before drawing it (see also doc/README.splashprepare).
>
> The bitmap drawing code is currently at 3 different locations,
> depending on the board and/or video driver configuration:
>  common/lcd.c
>  drivers/video/cfb_console.c (!DM_VIDEO)
>  drivers/video/video_bmp.c (DM_VIDEO)

Actually I meant the difference in behavior I'm observing between
DM_VIDEO enabled drivers and legacy ones.
For example, for legacy lcd video stack drawing of boot logo is a part
of initialization process, where
the main condition is a sane value of env("splashimage"):
lcd_init() (common/lcd.c:245) -> lcd_clear() -> lcd_splash() ->
bmp_display(addr, x, y)

Also I'm observing the same behavior for cfb_console (also with the
same check if env("splashimage") is defined):
cfg_video_init(cfb_console.c:2018) -> video_logo() ->video_display_bitmap()

But for DM_VIDEO enabled drivers there is no any signs of invocation
of bmp_display()/other wrappers during
the overall initialization  (I've followed all possible paths starting
from stdio_add_devices()), and probing of
of DM_VIDEO enabled drivers are deferred till I explicitly invoke
something like `bmp` command), so
I assumed that not adding the same check for env("splashimage") and
further bmp_display() invocation was done for
some purpose (for example, to deprecate and remove splash.c
functionality in the future).

>
> We will most probably remove cfb_console when all remaining users
> are converted to DM_VIDEO. lcd.c can co-exist with DM_VIDEO enabled
> drivers and is still used for some boards. Maybe we will drop it as
> well, unless LCD console for older boards with limited resources must
> be supported.
>
> > I understand that the same result can be achieved (showing a boot
> > logo) using CONFIG_PREBOOT define and with an invocation of something
> > like "bmp display <addr>" in "preboot" env variable, but just wanted
> > to know if splashscreen legacy stuff (common/splash.c) is going to be
> > somehow integrated into the new video stack in the future.
>
> Yes, you can load the .bmp file to memory first via commands in "preboot"
> and display it with "bmp" command then. But it would be better to
> implement it in common way reusable for other boards and independent
> of "preboot" configuration. We already have the necessary functions
> splash_screen_prepare() and bmp_display(). The first loads the file
> to memory address defined in "splashimage" env variable. This address
> can be passed to bmp_display(). We can add a common function which
> checks "splashimage" and sets it if not defined, then calls prepare/
> display functions. No other integration is required.

Yeah, this was my initial point that it doesn't work now and there is no such
function for DM_VIDEO configurations. I just assumed that following steps from
doc/README.splashprepare, adding CONFIG_SPLASH_SOURCE define
and providing proper values for splashsource/splashimage env vars
should make a deal, but
obviously it doesn't.

I'll send a patch if don't mind.

>
> --
> Anatolij

Thanks for your reply!

-- 
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk

      reply	other threads:[~2019-05-28 13:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 10:35 [U-Boot] DM_VIDEO and splash screen functionality Igor Opaniuk
2019-05-28 12:30 ` Anatolij Gustschin
2019-05-28 13:41   ` Igor Opaniuk [this message]

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=CAByghJa43xo5G6us+03xDVhq7KBC2gX5V95Equo9jXC5_L8n3A@mail.gmail.com \
    --to=igor.opaniuk@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.