summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-07-30 11:16:05 -0600
committerBin Meng <bmeng.cn@gmail.com>2023-08-09 23:31:11 +0800
commitb7080bfceb35cba3a460decb04a9fc3d6dbba511 (patch)
tree24213cc6bbb0967aa5dead7f9d664b5d8e578f41
parent4099df48a68fdfdc4b1d57a503679b35e724de4e (diff)
downloadu-boot-b7080bfceb35cba3a460decb04a9fc3d6dbba511.tar.gz
u-boot-b7080bfceb35cba3a460decb04a9fc3d6dbba511.tar.bz2
u-boot-b7080bfceb35cba3a460decb04a9fc3d6dbba511.zip
video: Add a Kconfig option for SPL video handoff
At present this feature is enabled in SPL if a bloblist is available. Some platforms may not want to use this, so add an option to allow the feature to be disabled. Note that the feature unfortunately only fills in part of the video-handoff information, so causes failures on x86 platforms. For now, disable it there. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com> # qemu-x86_64
-rw-r--r--common/board_f.c3
-rw-r--r--drivers/video/Kconfig10
-rw-r--r--drivers/video/video-uclass.c2
3 files changed, 12 insertions, 3 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 7d2c380e91..791c1e601c 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -411,8 +411,7 @@ __weak int arch_reserve_mmu(void)
static int reserve_video(void)
{
- if (IS_ENABLED(CONFIG_SPL_VIDEO) && spl_phase() > PHASE_SPL &&
- CONFIG_IS_ENABLED(BLOBLIST)) {
+ if (IS_ENABLED(CONFIG_SPL_VIDEO_HANDOFF) && spl_phase() > PHASE_SPL) {
struct video_handoff *ho;
ho = bloblist_find(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho));
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index e32ce13fb6..2a37d026bc 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -1011,6 +1011,16 @@ config SPL_VIDEO
if SPL_VIDEO
source "drivers/video/tidss/Kconfig"
+config SPL_VIDEO_HANDOFF
+ bool "Pass the video frame-buffer through to U-Boot proper"
+ depends on SPL_BLOBLIST
+ default y if !X86
+ help
+ Enable this to set up video-handoff information in SPL which can be
+ picked up in U-Boot proper. This includes the frame buffer and
+ various other pieces of information. With this enabled, SPL can set
+ up video and avoid re-initing it later.
+
config SPL_VIDEO_LOGO
bool "Show the U-Boot logo on the display at SPL"
default y if !SPL_SPLASH_SCREEN
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 8f268fc406..f743ed74c8 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -141,7 +141,7 @@ 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)) {
+ if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(VIDEO_HANDOFF)) {
struct video_handoff *ho;
ho = bloblist_add(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho), 0);