All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: Anatolij Gustschin <agust@denx.de>,
	Simon Glass <sjg@chromium.org>,
	 Kever Yang <kever.yang@rock-chips.com>,
	Andy Yan <andyshrk@163.com>,
	 Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	 Nikhil M Jain <n-jain1@ti.com>,
	Andre Przywara <andre.przywara@arm.com>
Cc: U-Boot-Denx <u-boot@lists.denx.de>,
	 "open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>
Subject: Black and White Artifact on BMP (24BPP) logo during boot
Date: Wed, 17 Jan 2024 16:06:32 +0530	[thread overview]
Message-ID: <CAMty3ZCq_d24p68fg1EfWCqmHyDVKZ54UgPDF09GVy0mh4ME=Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2485 bytes --]

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

[-- Attachment #2: rockchip.bmp --]
[-- Type: image/bmp, Size: 388938 bytes --]

[-- Attachment #3: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Jagan Teki <jagan@amarulasolutions.com>
To: Anatolij Gustschin <agust@denx.de>,
	Simon Glass <sjg@chromium.org>,
	 Kever Yang <kever.yang@rock-chips.com>,
	Andy Yan <andyshrk@163.com>,
	 Michael Nazzareno Trimarchi <michael@amarulasolutions.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	 Nikhil M Jain <n-jain1@ti.com>,
	Andre Przywara <andre.przywara@arm.com>
Cc: U-Boot-Denx <u-boot@lists.denx.de>,
	 "open list:ARM/Rockchip SoC..."
	<linux-rockchip@lists.infradead.org>
Subject: Black and White Artifact on BMP (24BPP) logo during boot
Date: Wed, 17 Jan 2024 16:06:32 +0530	[thread overview]
Message-ID: <CAMty3ZCq_d24p68fg1EfWCqmHyDVKZ54UgPDF09GVy0mh4ME=Q@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2485 bytes --]

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

[-- Attachment #2: rockchip.bmp --]
[-- Type: image/bmp, Size: 388938 bytes --]

             reply	other threads:[~2024-01-17 10:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-17 10:36 Jagan Teki [this message]
2024-01-17 10:36 ` Black and White Artifact on BMP (24BPP) logo during boot Jagan Teki
2024-01-18  3:38 ` Kever Yang
2024-01-18  3:38   ` Kever Yang
2024-01-18  7:22   ` Jagan Teki
2024-01-18  7:22     ` Jagan Teki

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='CAMty3ZCq_d24p68fg1EfWCqmHyDVKZ54UgPDF09GVy0mh4ME=Q@mail.gmail.com' \
    --to=jagan@amarulasolutions.com \
    --cc=agust@denx.de \
    --cc=andre.przywara@arm.com \
    --cc=andyshrk@163.com \
    --cc=kever.yang@rock-chips.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael@amarulasolutions.com \
    --cc=n-jain1@ti.com \
    --cc=neil.armstrong@linaro.org \
    --cc=sjg@chromium.org \
    --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.