[PATCH 0/3] Simple-framebuffer node related updates

This series fixes some compilation issues related to FDT_SIMPLEFB and VIDEO and along with that enables support for dynamic simplefb node enablement for AM62x platform.
Devarsh Thakkar (3): boot/Kconfig: Add Video Kconfig as dependency for FDT_SIMPLEFB boot: fdt_simplefb: Remove conditional compilation checks for VIDEO Kconfig board: ti: am62x: evm: Update simple-framebuffer node in device-tree
board/ti/am62x/evm.c | 21 +++++++++++++++++++++ boot/Kconfig | 1 + boot/fdt_simplefb.c | 2 -- 3 files changed, 22 insertions(+), 2 deletions(-)

The fdt_simplefb.c APIs rely on video-uclass APIs and structures to fill/update framebuffer information, so compile it only when VIDEO Kconfig is enabled, as otherwise below warning can be seen if VIDEO Kconfig is disabled:
"boot/fdt_simplefb.c:96:12: warning: fdt_simplefb_enable_existing_node defined but not used [-Wunused-function] 96 | static int fdt_simplefb_enable_existing_node(void *blob)"
Reported-by: Mattijs Korpershoek mkorpershoek@baylibre.com Signed-off-by: Devarsh Thakkar devarsht@ti.com Reviewed-by: Mattijs Korpershoek mkorpershoek@baylibre.com --- boot/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/boot/Kconfig b/boot/Kconfig index de277d2ba50d..56f2bb59a1e5 100644 --- a/boot/Kconfig +++ b/boot/Kconfig @@ -1583,6 +1583,7 @@ config FDT_FIXUP_PARTITIONS
config FDT_SIMPLEFB bool "FDT tools for simplefb support" + depends on VIDEO help Enable the fdt tools to manage the simple fb nodes in device tree. These functions can be used by board to indicate to the OS

CONFIG_VIDEO conditional compilation checks are no longer needed since FDT_SIMPLEFB Kconfig now depends on VIDEO Kconfig.
Signed-off-by: Devarsh Thakkar devarsht@ti.com Reviewed-by: Mattijs Korpershoek mkorpershoek@baylibre.com --- boot/fdt_simplefb.c | 2 -- 1 file changed, 2 deletions(-)
diff --git a/boot/fdt_simplefb.c b/boot/fdt_simplefb.c index 53415548459a..fbb67f281a04 100644 --- a/boot/fdt_simplefb.c +++ b/boot/fdt_simplefb.c @@ -103,7 +103,6 @@ static int fdt_simplefb_enable_existing_node(void *blob) return fdt_simplefb_configure_node(blob, off); }
-#if IS_ENABLED(CONFIG_VIDEO) int fdt_simplefb_enable_and_mem_rsv(void *blob) { int ret; @@ -118,4 +117,3 @@ int fdt_simplefb_enable_and_mem_rsv(void *blob)
return fdt_add_fb_mem_rsv(blob); } -#endif

Update simple-framebuffer device-tree node by enumerating framebuffer related information in existing simple-framebuffer node in Linux device-tree file and enabling it.
In case there is no simple-framebuffer stub detected in Linux kernel device-tree and video is still active, then update the device-tree to reserve the framebuffer region for the active splash screen.
This helps preserve the splash screen till the display server takes over after OS is booted.
Signed-off-by: Devarsh Thakkar devarsht@ti.com --- board/ti/am62x/evm.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
diff --git a/board/ti/am62x/evm.c b/board/ti/am62x/evm.c index 9bdd0223cdb6..be0447f6e9ea 100644 --- a/board/ti/am62x/evm.c +++ b/board/ti/am62x/evm.c @@ -16,6 +16,7 @@ #include <cpu_func.h> #include <k3-ddrss.h> #include <fdt_support.h> +#include <fdt_simplefb.h> #include <asm/io.h> #include <asm/arch/hardware.h> #include <dm/uclass.h> @@ -162,3 +163,23 @@ void spl_perform_fixups(struct spl_image_info *spl_image) #endif } #endif + +#if defined(CONFIG_OF_BOARD_SETUP) +int ft_board_setup(void *blob, struct bd_info *bd) +{ + int ret = -1; + + if (IS_ENABLED(CONFIG_FDT_SIMPLEFB)) + ret = fdt_simplefb_enable_and_mem_rsv(blob); + + /* If simplefb is not enabled and video is active, then at least reserve + * the framebuffer region to preserve the splash screen while OS is booting + */ + if (IS_ENABLED(CONFIG_VIDEO) && IS_ENABLED(CONFIG_OF_LIBFDT)) { + if (ret && video_is_active()) + return fdt_add_fb_mem_rsv(blob); + } + + return 0; +} +#endif

Gentle reminder.
Hi Tom, Bryan,
On 25/09/24 20:43, Devarsh Thakkar wrote:
This series fixes some compilation issues related to FDT_SIMPLEFB and VIDEO and along with that enables support for dynamic simplefb node enablement for AM62x platform.
Devarsh Thakkar (3): boot/Kconfig: Add Video Kconfig as dependency for FDT_SIMPLEFB boot: fdt_simplefb: Remove conditional compilation checks for VIDEO Kconfig board: ti: am62x: evm: Update simple-framebuffer node in device-tree
Is it possible to pull in this series for -next branch ? It is already carrying a R-B for first two patches and last one was peer reviewed informally too [1].
[1]: https://lore.kernel.org/all/CAPHZmLZopucK5uMwENuF83pRMLYR2A5sC7fes4-1JXE4jX7...
Regards Devarsh

On Mon, Oct 21, 2024 at 08:47:55PM +0530, Devarsh Thakkar wrote:
Gentle reminder.
Hi Tom, Bryan,
On 25/09/24 20:43, Devarsh Thakkar wrote:
This series fixes some compilation issues related to FDT_SIMPLEFB and VIDEO and along with that enables support for dynamic simplefb node enablement for AM62x platform.
Devarsh Thakkar (3): boot/Kconfig: Add Video Kconfig as dependency for FDT_SIMPLEFB boot: fdt_simplefb: Remove conditional compilation checks for VIDEO Kconfig board: ti: am62x: evm: Update simple-framebuffer node in device-tree
Is it possible to pull in this series for -next branch ? It is already carrying a R-B for first two patches and last one was peer reviewed informally too [1].
Anatolij, do you have time to pick up some patches for v2025.01? Thanks.

On Mon, 21 Oct 2024 14:20:56 -0600 Tom Rini trini@konsulko.com wrote:
On Mon, Oct 21, 2024 at 08:47:55PM +0530, Devarsh Thakkar wrote:
Gentle reminder.
Hi Tom, Bryan,
On 25/09/24 20:43, Devarsh Thakkar wrote:
This series fixes some compilation issues related to FDT_SIMPLEFB and VIDEO and along with that enables support for dynamic simplefb node enablement for AM62x platform.
Devarsh Thakkar (3): boot/Kconfig: Add Video Kconfig as dependency for FDT_SIMPLEFB boot: fdt_simplefb: Remove conditional compilation checks for VIDEO Kconfig board: ti: am62x: evm: Update simple-framebuffer node in device-tree
Is it possible to pull in this series for -next branch ? It is already carrying a R-B for first two patches and last one was peer reviewed informally too [1].
Anatolij, do you have time to pick up some patches for v2025.01? Thanks.
series applied to u-boot-video/master, thanks!
-- Anatolij
participants (3)
-
Anatolij Gustschin
-
Devarsh Thakkar
-
Tom Rini