aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorDevarsh Thakkar2023-12-05 21:25:20 +0530
committerTom Rini2024-01-29 14:49:17 -0500
commiteefe23c12775184b10068fd4f71c42db335ff3e6 (patch)
tree7a1428e4758e7cf64d60d079b693b8719618ec05 /common
parent4ef9c77248c95cd2bc63697084ae82f345e5c6e7 (diff)
video: Skip framebuffer reservation if already reserved
Skip framebufer reservation if it was already reserved from previous stage and whose information was passed using a bloblist. Return error in case framebuffer information received from bloblist is invalid i.e NULL or empty. While at it, improve the debug message to make it more clear that address in discussion is of framebuffer and not bloblist and also match it with printing scheme followed in video_reserve function. Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/common/board_f.c b/common/board_f.c
index acf802c9cb3..442b8349d08 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -407,11 +407,15 @@ static int reserve_video_from_videoblob(void)
{
if (IS_ENABLED(CONFIG_SPL_VIDEO_HANDOFF) && spl_phase() > PHASE_SPL) {
struct video_handoff *ho;
+ int ret = 0;
ho = bloblist_find(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho));
if (!ho)
- return log_msg_ret("blf", -ENOENT);
- video_reserve_from_bloblist(ho);
+ return log_msg_ret("Missing video bloblist", -ENOENT);
+
+ ret = video_reserve_from_bloblist(ho);
+ if (ret)
+ return log_msg_ret("Invalid Video handoff info", ret);
/* Sanity check fb from blob is before current relocaddr */
if (likely(gd->relocaddr > (unsigned long)ho->fb))