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

Jagan Teki jagan at amarulasolutions.com
Wed Jan 17 11:36:32 CET 2024


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.

-- 
Jagan Teki,
Amarula Solutions India Pvt. Ltd.
Co-Founder & Embedded Linux Architect
405/E-Block, Sri Lakshmi Shubham Arcade, Chandanagar, Hyderabad - 500050, India
M. (+91) 910 009 0959
[`as] http://www.amarulasolutions.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rockchip.bmp
Type: image/bmp
Size: 388938 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240117/9111b532/attachment-0001.bin>


More information about the U-Boot mailing list