Black and White Artifact on BMP (24BPP) logo during boot

Kever Yang kever.yang at rock-chips.com
Wed Jan 17 19:38:45 PST 2024


Hi Jagan,

     Have you check the memory area, does it maybe overlap with other 
area? eg. heap, stack, malloc area and etc.


Thanks,

- Kever

On 2024/1/17 18:36, Jagan Teki wrote:
> Hi All,
>
> Artifact occurred only during boot but loading via the bmp command on
> the u-boot console seems fine.
>
> I have observed the contents of bmp hex codes have changed during the
> function switch after memory to ddr address. (The same cannot happen
> on downstream u-boot)
>
> diff --git a/common/splash.c b/common/splash.c
> index 6820db683b..f97edf8732 100644
> --- a/common/splash.c
> +++ b/common/splash.c
> @@ -175,6 +175,11 @@ int splash_display(void)
>
>          splash_get_pos(&x, &y);
>
> +       if (memcmp((void *)addr, bmp_logo_bitmap, len2) == 0)
> +               printf("%s: SAME\n", __func__);
> +       else
> +               printf("%s: NOTSAME\n", __func__);
> +
>          if (CONFIG_IS_ENABLED(BMP))
>                  ret = bmp_display(addr, x, y);
>          else
> diff --git a/drivers/video/bmp.c b/drivers/video/bmp.c
> index bab6fa7265..dc2928ccdb 100644
> --- a/drivers/video/bmp.c
> +++ b/drivers/video/bmp.c
> @@ -111,10 +111,15 @@ int bmp_display(ulong addr, int x, int y)
>   {
>          struct udevice *dev;
>          int ret;
> -       struct bmp_image *bmp = map_sysmem(addr, 0);
>          void *bmp_alloc_addr = NULL;
>          unsigned long len;
>
> +       if (memcmp((void *)addr, bmp_logo_bitmap, len2) == 0)
> +               printf("%s: SAME\n", __func__);
> +       else
> +               printf("%s: NOTSAME\n", __func__);
> +
> +       struct bmp_image *bmp = map_sysmem(addr, 0);
>          if (!((bmp->header.signature[0] == 'B') &&
>                (bmp->header.signature[1] == 'M')))
>                  bmp = gunzip_bmp(addr, &len, &bmp_alloc_addr);
>
> So, the contents in splash_display show SAME and the contents in
> bmp_display show NOTSAME.
>
> This issue is reproducing on specifics like
> - 24-bit BMP (attached).
> rockchip.bmp: PC bitmap, Windows 98/2000 and newer format, 480 x 270 x 24
> - Rockchip 64-bit SoC (32-bit, RK3288 has no issue).
> - Allwinner 64-bit SoC seems no issues.
> - Downstream u-boot rockchip has no issues. (with mainline vide
> drivers not with drm drivers)
> - Issue observed in boot but loading via bmp command on u-boot console
> seems no issue.
>
> I did check the clock, cache, and memory but none of them showed any
> clue. I did port clock, mach-rockchip code to rockchip u-boot but none
> of the cases resulted in the same.
>
> Any input on this is appreciated.
>
> Thanks,
> Jagan.
>



More information about the Linux-rockchip mailing list