From: Devarsh Thakkar <devarsht@ti.com>
To: <sjg@chromium.org>, <ovpanait@gmail.com>, <pali@kernel.org>,
<u-boot@lists.denx.de>, <trini@konsulko.com>
Cc: <praneeth@ti.com>, <nm@ti.com>, <vigneshr@ti.com>,
<a-bhatia1@ti.com>, <j-luthra@ti.com>, <devarsht@ti.com>,
<nsekhar@ti.com>
Subject: [PATCH] common: board_f: Move relocation address after framebuffer
Date: Tue, 1 Aug 2023 19:34:14 +0530 [thread overview]
Message-ID: <20230801140414.76216-1-devarsht@ti.com> (raw)
When passing framebuffer address using bloblist, check
that passed address is overlapping with current relocation
address, if so move the relocation address after the framebuffer
region to avoid overlap.
Fixes: 5bc610a7d9d ("common: board_f: Pass frame buffer info from
SPL to u-boot")
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
---
common/board_f.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/common/board_f.c b/common/board_f.c
index 7d2c380e91..20fa17207a 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -419,7 +419,10 @@ static int reserve_video(void)
if (!ho)
return log_msg_ret("blf", -ENOENT);
video_reserve_from_bloblist(ho);
- gd->relocaddr = ho->fb;
+ /* Relocate after framebuffer area to avoid overlap */
+ if (gd->relocaddr > (unsigned long)ho->fb)
+ gd->relocaddr = ho->fb;
+
} else if (CONFIG_IS_ENABLED(VIDEO)) {
ulong addr;
int ret;
--
2.34.1
next reply other threads:[~2023-08-01 14:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 14:04 Devarsh Thakkar [this message]
2023-08-03 14:02 ` [PATCH] common: board_f: Move relocation address after framebuffer Simon Glass
2023-08-03 14:28 ` Devarsh Thakkar
2023-08-03 23:28 ` Simon Glass
2023-08-04 7:40 ` Devarsh Thakkar
2023-08-04 11:39 ` Devarsh Thakkar
2023-08-04 18:19 ` Tom Rini
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=20230801140414.76216-1-devarsht@ti.com \
--to=devarsht@ti.com \
--cc=a-bhatia1@ti.com \
--cc=j-luthra@ti.com \
--cc=nm@ti.com \
--cc=nsekhar@ti.com \
--cc=ovpanait@gmail.com \
--cc=pali@kernel.org \
--cc=praneeth@ti.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox