
Hi Nikhil,
Thanks for the patch.
On 11/05/23 15:29, Nikhil M Jain wrote:
Add method to reserve video using blob.
reserve memory for video using blob received from previous stage.
Mention what info is updated.
Signed-off-by: Nikhil M Jain n-jain1@ti.com
drivers/video/video-uclass.c | 12 ++++++++++++ include/video.h | 9 +++++++++ 2 files changed, 21 insertions(+)
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index 8396bdfb11..1264ad1101 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -142,6 +142,18 @@ int video_reserve(ulong *addrp) return 0; }
+int video_reserve_from_blob(struct video_handoff *ho) +{
video_reserve_from_bloblist would be better name imho as bloblist is used elsewhere too.
+#if CONFIG_IS_ENABLED(VIDEO)
This CONFIG may not be required as file is video-uclass, so I assume CONFIG_VIDEO is always enabled.
Regards Devarsh
- gd->video_bottom = ho->fb;
- gd->fb_base = ho->fb;
- gd->video_top = ho->fb + ho->size;
- debug("Reserving %luk for video using blob at: %08x\n",
((unsigned long)ho->size) >> 10, (u32)ho->fb);
+#endif
- return 0;
+}
int video_fill(struct udevice *dev, u32 colour) { struct video_priv *priv = dev_get_uclass_priv(dev); diff --git a/include/video.h b/include/video.h index 18ed159b8d..13460adc45 100644 --- a/include/video.h +++ b/include/video.h @@ -389,4 +389,13 @@ int bmp_display(ulong addr, int x, int y); */ int bmp_info(ulong addr);
+/*
- video_reserve_from_blob()- Reserve frame-buffer memory for video devices
- using blobs.
- @ho: video information passed from SPL
- Returns: 0 (always)
- */
+int video_reserve_from_blob(struct video_handoff *ho);
#endif