From: Devarsh Thakkar <devarsht@ti.com>
To: <u-boot@lists.denx.de>, <sjg@chromium.org>, <agust@denx.de>,
<trini@konsulko.com>, <bmeng.cn@gmail.com>, <msuchanek@suse.de>,
<rasmus.villemoes@prevas.dk>, <yangshiji66@outlook.com>
Cc: <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 v2 5/6] video: Fill video handoff in video post probe
Date: Fri, 10 Nov 2023 20:59:43 +0530 [thread overview]
Message-ID: <20231110152944.647535-6-devarsht@ti.com> (raw)
In-Reply-To: <20231110152944.647535-1-devarsht@ti.com>
Fill video handoff fields in video_post_probe
as at this point we have full framebuffer-related
information.
Also fill all the fields available in video hand-off
struct as those were missing earlier and U-boot
framework expects them to be filled for some of the
functionalities.
Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
---
V2:
- No change
V3:
- Fix commit message per review comment
- Add a note explaining assumption of single framebuffer
---
drivers/video/video-uclass.c | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index f619b5ae56..edc3376b46 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -154,16 +154,6 @@ int video_reserve(ulong *addrp)
debug("Video frame buffers from %lx to %lx\n", gd->video_bottom,
gd->video_top);
- if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(VIDEO_HANDOFF)) {
- struct video_handoff *ho;
-
- ho = bloblist_add(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho), 0);
- if (!ho)
- return log_msg_ret("blf", -ENOENT);
- ho->fb = *addrp;
- ho->size = size;
- }
-
return 0;
}
@@ -559,6 +549,25 @@ static int video_post_probe(struct udevice *dev)
priv->fb_size = priv->line_length * priv->ysize;
+ /*
+ * Set up video handoff fields for passing video blob to next stage
+ * NOTE:
+ * This assumes that reserved video memory only uses a single framebuffer
+ */
+ if (spl_phase() == PHASE_SPL && CONFIG_IS_ENABLED(BLOBLIST)) {
+ struct video_handoff *ho;
+
+ ho = bloblist_add(BLOBLISTT_U_BOOT_VIDEO, sizeof(*ho), 0);
+ if (!ho)
+ return log_msg_ret("blf", -ENOENT);
+ ho->fb = gd->video_bottom;
+ ho->size = gd->video_top - gd->video_bottom;
+ ho->xsize = priv->xsize;
+ ho->ysize = priv->ysize;
+ ho->line_length = priv->line_length;
+ ho->bpix = priv->bpix;
+ }
+
if (IS_ENABLED(CONFIG_VIDEO_COPY) && plat->copy_base)
priv->copy_fb = map_sysmem(plat->copy_base, plat->size);
--
2.34.1
next prev parent reply other threads:[~2023-11-10 15:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 15:29 [PATCH v2 0/6] Move framebuffer reservation for SPL to RAM end Devarsh Thakkar
2023-11-10 15:29 ` [PATCH v2 1/6] arm: mach-k3: common: Reserve video memory from end of the RAM Devarsh Thakkar
2023-11-12 20:01 ` Simon Glass
2023-12-05 11:33 ` Nikhil Jain
2023-11-10 15:29 ` [PATCH v2 2/6] board: ti: am62x: evm: Remove video_setup from spl_board_init Devarsh Thakkar
2023-11-12 20:01 ` Simon Glass
2023-11-10 15:29 ` [PATCH v2 3/6] common/board_f: Catch bloblist before starting resevations Devarsh Thakkar
2023-11-12 20:01 ` Simon Glass
2023-11-10 15:29 ` [PATCH v2 4/6] video: Skip framebuffer reservation if already reserved Devarsh Thakkar
2023-11-12 20:01 ` Simon Glass
2023-11-10 15:29 ` Devarsh Thakkar [this message]
2023-11-12 20:01 ` [PATCH v2 5/6] video: Fill video handoff in video post probe Simon Glass
2023-11-25 14:27 ` Devarsh Thakkar
2023-12-02 18:23 ` Simon Glass
2023-12-05 10:11 ` Devarsh Thakkar
2023-11-10 15:29 ` [PATCH v2 6/6] doc: spl: Add info regarding memory reservation and missing Kconfigs Devarsh Thakkar
2023-11-12 20:01 ` Simon Glass
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=20231110152944.647535-6-devarsht@ti.com \
--to=devarsht@ti.com \
--cc=a-bhatia1@ti.com \
--cc=agust@denx.de \
--cc=bmeng.cn@gmail.com \
--cc=j-luthra@ti.com \
--cc=msuchanek@suse.de \
--cc=n-jain1@ti.com \
--cc=nm@ti.com \
--cc=nsekhar@ti.com \
--cc=praneeth@ti.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
--cc=yangshiji66@outlook.com \
/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