[PATCH] board: stm32mp1: add splash screen on dk2

Grzegorz Szymaszek gszymaszek at short.pl
Tue Jul 4 11:35:46 CEST 2023


On Tue, Jul 04, 2023 at 11:14:39AM +0200, Dario Binacchi wrote:
> On Tue, Jul 4, 2023 at 10:11 AM Grzegorz Szymaszek <gszymaszek at short.pl> wrote:
> > > +			ulong logo =
> > > +				(ulong)stmicroelectronics_uboot_logo_8bit_rle;
> > > +			bmp_display(logo, BMP_ALIGN_CENTER, BMP_ALIGN_CENTER);
> > 
> > Technically logo is const.
> 
> int bmp_display(ulong addr, int x, int y);
> And throughout the code, I only find ulong parameters being passed to
> this function.
> Perhaps I can replace "logo" with "addr".

I'm afraid my comment was perhaps too terse: I wanted to point out that
your "ulong logo" variable is assigned to only once, its value is never
changed, so instead of plain "ulong", you could declare its type as
"const ulong". I won't insist on this change since the code is trivial.

Consider simply removing the new variable and just passing
"(ulong)stmicroelectronics_uboot_logo_8bit_rle" directly as the
bmp_display()'s argument, like in
board/st/stm32f746-disco/stm32f746-disco.c.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230704/b27a4884/attachment.sig>


More information about the U-Boot mailing list