]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: Assume video to be active if SPL is passing video hand-off
authorDevarsh Thakkar <devarsht@ti.com>
Thu, 22 Feb 2024 13:08:09 +0000 (18:38 +0530)
committerAnatolij Gustschin <agust@denx.de>
Sun, 21 Apr 2024 07:07:02 +0000 (09:07 +0200)
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>
drivers/video/video-uclass.c

index 3571e62ba2d9937d8b05150d98f015387d1a39f7..7b5d1dfbb3bdb2ea0d35137c73674c040b6b8fca 100644 (file)
@@ -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)) {