summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevarsh Thakkar <devarsht@ti.com>2024-02-22 18:38:09 +0530
committerAnatolij Gustschin <agust@denx.de>2024-04-21 09:07:02 +0200
commit4ac7ffb60ee9a342337dce6e4fda3cbac827c398 (patch)
tree352726a16c36ade74d74cf227bd54f2ce6ad39a2
parent86281e4705418b54404889c290ef3154fb1ebafc (diff)
video: Assume video to be active if SPL is passing video hand-off
If SPL is passing video handoff structure to U-boot then it is safe to assume that SPL has already enabled video and that's why it is passing video handoff structure to U-boot so that U-boot can preserve the framebuffer. Signed-off-by: Devarsh Thakkar <devarsht@ti.com> Reviewed-by: Nikhil M Jain <n-jain1@ti.com>
-rw-r--r--drivers/video/video-uclass.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 3571e62ba2d..7b5d1dfbb3b 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -404,6 +404,10 @@ bool video_is_active(void)
{
struct udevice *dev;
+ /* Assume video to be active if SPL passed video hand-off to U-boot */
+ if (IS_ENABLED(CONFIG_SPL_VIDEO_HANDOFF) && spl_phase() > PHASE_SPL)
+ return true;
+
for (uclass_find_first_device(UCLASS_VIDEO, &dev);
dev;
uclass_find_next_device(&dev)) {