summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNikhil M Jain <[email protected]>2023-07-18 14:27:31 +0530
committerTom Rini <[email protected]>2023-07-21 15:32:12 -0400
commit5bc610a7d9d1ea1b83aaab7ca54ef847087d7167 (patch)
treebeb45ba8319ce2a6bbc5573793d21f3f34391ba6 /drivers
parentccd21ee50e41305ec3d35d5dc2b40277102cfd85 (diff)
common: board_f: Pass frame buffer info from SPL to u-boot
U-boot proper can use frame buffer address passed from SPL to reserve the memory area used by framebuffer set in SPL so that splash image set in SPL continues to get displayed while u-boot proper is running. Put the framebuffer address and size in a bloblist to make them available at u-boot proper, if in u-boot proper CONFIG_VIDEO is defined. Signed-off-by: Nikhil M Jain <[email protected]> Reviewed-by: Devarsh Thakkar <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/video-uclass.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 435dab1f195..949595f1bc6 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -6,12 +6,14 @@
#define LOG_CATEGORY UCLASS_VIDEO
#include <common.h>
+#include <bloblist.h>
#include <console.h>
#include <cpu_func.h>
#include <dm.h>
#include <log.h>
#include <malloc.h>
#include <mapmem.h>
+#include <spl.h>
#include <stdio_dev.h>
#include <video.h>
#include <video_console.h>
@@ -139,6 +141,16 @@ int video_reserve(ulong *addrp)
debug("Video frame buffers from %lx to %lx\n", gd->video_bottom,
gd->video_top);
+ if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(BLOBLIST)) {
+ struct video_handoff *ho;
+
+ ho = bloblist_add(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho), 0);
+ if (!ho)
+ return log_msg_ret("blf", -ENOENT);
+ ho->fb = *addrp;
+ ho->size = size;
+ }
+
return 0;
}