public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] common: board_f: Move relocation address after framebuffer
@ 2023-08-01 14:04 Devarsh Thakkar
  2023-08-03 14:02 ` Simon Glass
  0 siblings, 1 reply; 7+ messages in thread
From: Devarsh Thakkar @ 2023-08-01 14:04 UTC (permalink / raw)
  To: sjg, ovpanait, pali, u-boot, trini
  Cc: praneeth, nm, vigneshr, a-bhatia1, j-luthra, devarsht, nsekhar

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-08-04 18:20 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-01 14:04 [PATCH] common: board_f: Move relocation address after framebuffer Devarsh Thakkar
2023-08-03 14:02 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox