From: Devarsh Thakkar <devarsht@ti.com>
To: <u-boot@lists.denx.de>, <sjg@chromium.org>, <agust@denx.de>,
<trini@konsulko.com>
Cc: <bmeng@tinylab.org>, <xypron.glpk@gmx.de>,
<patrick.delaunay@foss.st.com>, <patrice.chotard@foss.st.com>,
<hvilleneuve@dimonoff.com>, <michal.simek@amd.com>,
<troykiskyboundary@gmail.com>, <j-humphreys@ti.com>, <afd@ti.com>,
<praneeth@ti.com>, <nm@ti.com>, <vigneshr@ti.com>,
<a-bhatia1@ti.com>, <j-luthra@ti.com>, <nsekhar@ti.com>,
<n-jain1@ti.com>, <devarsht@ti.com>
Subject: [PATCH 1/4] boot: fdt_simplefb: Enumerate framebuffer info from video handoff
Date: Thu, 22 Feb 2024 18:38:08 +0530 [thread overview]
Message-ID: <20240222130811.3878567-2-devarsht@ti.com> (raw)
In-Reply-To: <20240222130811.3878567-1-devarsht@ti.com>
Enable and update simple-framebuffer node using the video handoff
bloblist if video was enabled at SPL stage and corresponding video
bloblist was received at u-boot proper with necessary parameters.
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
---
boot/fdt_simplefb.c | 34 +++++++++++++++++++++++++---------
1 file changed, 25 insertions(+), 9 deletions(-)
diff --git a/boot/fdt_simplefb.c b/boot/fdt_simplefb.c
index 069ced75a7..b0221eaf2a 100644
--- a/boot/fdt_simplefb.c
+++ b/boot/fdt_simplefb.c
@@ -12,6 +12,8 @@
#include <asm/global_data.h>
#include <linux/libfdt.h>
#include <video.h>
+#include <spl.h>
+#include <bloblist.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -26,15 +28,29 @@ static int fdt_simplefb_configure_node(void *blob, int off)
struct udevice *dev;
int ret;
- ret = uclass_first_device_err(UCLASS_VIDEO, &dev);
- if (ret)
- return ret;
- uc_priv = dev_get_uclass_priv(dev);
- plat = dev_get_uclass_plat(dev);
- xsize = uc_priv->xsize;
- ysize = uc_priv->ysize;
- bpix = uc_priv->bpix;
- fb_base = plat->base;
+ if (IS_ENABLED(CONFIG_SPL_VIDEO_HANDOFF) && spl_phase() > PHASE_SPL) {
+ struct video_handoff *ho;
+
+ ho = bloblist_find(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho));
+ if (!ho)
+ return log_msg_ret("Missing video bloblist", -ENOENT);
+
+ xsize = ho->xsize;
+ ysize = ho->ysize;
+ bpix = ho->bpix;
+ fb_base = ho->fb;
+ } else {
+ ret = uclass_first_device_err(UCLASS_VIDEO, &dev);
+ if (ret)
+ return ret;
+ uc_priv = dev_get_uclass_priv(dev);
+ plat = dev_get_uclass_plat(dev);
+ xsize = uc_priv->xsize;
+ ysize = uc_priv->ysize;
+ bpix = uc_priv->bpix;
+ fb_base = plat->base;
+ }
+
switch (bpix) {
case 4: /* VIDEO_BPP16 */
name = "r5g6b5";
--
2.34.1
next prev parent reply other threads:[~2024-02-22 13:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 13:08 [PATCH 0/4] Simplefb and fb reservation related updates Devarsh Thakkar
2024-02-22 13:08 ` Devarsh Thakkar [this message]
2024-03-06 10:42 ` [PATCH 1/4] boot: fdt_simplefb: Enumerate framebuffer info from video handoff Nikhil Jain
2024-02-22 13:08 ` [PATCH 2/4] video: Assume video to be active if SPL is passing video hand-off Devarsh Thakkar
2024-03-06 10:46 ` Nikhil Jain
2024-02-22 13:08 ` [PATCH 3/4] boot: Move framebuffer reservation to separate helper Devarsh Thakkar
2024-03-06 10:51 ` Nikhil Jain
2024-02-22 13:08 ` [PATCH 4/4] board: ti: am62x: evm: Update simple-framebuffer node in device-tree Devarsh Thakkar
2024-03-05 10:28 ` Devarsh Thakkar
2024-03-08 11:08 ` [PATCH 0/4] Simplefb and fb reservation related updates Devarsh Thakkar
2024-04-05 14:49 ` Devarsh Thakkar
2024-04-20 23:09 ` 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=20240222130811.3878567-2-devarsht@ti.com \
--to=devarsht@ti.com \
--cc=a-bhatia1@ti.com \
--cc=afd@ti.com \
--cc=agust@denx.de \
--cc=bmeng@tinylab.org \
--cc=hvilleneuve@dimonoff.com \
--cc=j-humphreys@ti.com \
--cc=j-luthra@ti.com \
--cc=michal.simek@amd.com \
--cc=n-jain1@ti.com \
--cc=nm@ti.com \
--cc=nsekhar@ti.com \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=praneeth@ti.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=troykiskyboundary@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox