diff mbox series

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

Message ID CAMty3ZCq_d24p68fg1EfWCqmHyDVKZ54UgPDF09GVy0mh4ME=Q@mail.gmail.com (mailing list archive)
State New
Headers show
Series Black and White Artifact on BMP (24BPP) logo during boot | expand

Commit Message

Jagan Teki Jan. 17, 2024, 10:36 a.m. UTC
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)


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.

Comments

Jagan Teki Jan. 18, 2024, 7:22 a.m. UTC | #1
Hi Kever,

On Thu, Jan 18, 2024 at 9:09 AM Kever Yang <kever.yang@rock-chips.com> wrote:
>
> Hi Jagan,
>
>      Have you check the memory area, does it maybe overlap with other
> area? eg. heap, stack, malloc area and etc.

Start with GD all memory map seems proper before and after relocation.
I did load U-Boot proper of rockchip with mainline and vice-versa. The
issue persists.

Jagan.
diff mbox series

Patch

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);