All of lore.kernel.org
 help / color / mirror / Atom feed
From: Devarsh Thakkar <devarsht@ti.com>
To: <u-boot@lists.denx.de>, <trini@konsulko.com>, <bb@ti.com>
Cc: <sjg@chromium.org>, <agust@denx.de>, <praneeth@ti.com>,
	<nm@ti.com>, <vigneshr@ti.com>, <s-jain1@ti.com>,
	<r-donadkar@ti.com>, <j-humphreys@ti.com>,
	<ilias.apalodimas@linaro.org>, <xypron.glpk@gmx.de>,
	<akashi.tkhro@gmail.com>, <mkorpershoek@baylibre.com>,
	<eajames@linux.ibm.com>, <caleb.connolly@linaro.org>,
	<quentin.schulz@cherry.de>, <martinstolpe@gmail.com>,
	<iivanov@suse.de>, <n-jain1@ti.com>, <devarsht@ti.com>
Subject: [PATCH 3/3] board: ti: am62x: evm: Update simple-framebuffer node in device-tree
Date: Wed, 25 Sep 2024 20:43:54 +0530	[thread overview]
Message-ID: <20240925151354.480704-4-devarsht@ti.com> (raw)
In-Reply-To: <20240925151354.480704-1-devarsht@ti.com>

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
-- 
2.39.1


  parent reply	other threads:[~2024-09-25 15:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25 15:13 [PATCH 0/3] Simple-framebuffer node related updates Devarsh Thakkar
2024-09-25 15:13 ` [PATCH 1/3] boot/Kconfig: Add Video Kconfig as dependency for FDT_SIMPLEFB Devarsh Thakkar
2024-09-25 15:13 ` [PATCH 2/3] boot: fdt_simplefb: Remove conditional compilation checks for VIDEO Kconfig Devarsh Thakkar
2024-09-25 15:13 ` Devarsh Thakkar [this message]
2024-10-21 15:17 ` [PATCH 0/3] Simple-framebuffer node related updates Devarsh Thakkar
2024-10-21 20:20   ` Tom Rini
2024-10-22 20:19     ` Anatolij Gustschin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240925151354.480704-4-devarsht@ti.com \
    --to=devarsht@ti.com \
    --cc=agust@denx.de \
    --cc=akashi.tkhro@gmail.com \
    --cc=bb@ti.com \
    --cc=caleb.connolly@linaro.org \
    --cc=eajames@linux.ibm.com \
    --cc=iivanov@suse.de \
    --cc=ilias.apalodimas@linaro.org \
    --cc=j-humphreys@ti.com \
    --cc=martinstolpe@gmail.com \
    --cc=mkorpershoek@baylibre.com \
    --cc=n-jain1@ti.com \
    --cc=nm@ti.com \
    --cc=praneeth@ti.com \
    --cc=quentin.schulz@cherry.de \
    --cc=r-donadkar@ti.com \
    --cc=s-jain1@ti.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.