summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikhil M Jain <n-jain1@ti.com>2023-06-09 14:52:32 +0530
committerUdit Kumar <u-kumar1@ti.com>2023-06-12 09:49:43 +0530
commit0878bacfa7e9fdd67641c4ea215e41978a2b8461 (patch)
treefadae35ae7cba0dce88d07d6f078598f8b178442
parent2bcfa57f4bbd8fc935b028fe74951a9d32cfeb65 (diff)
include: video: Reserve video using blob
Add method to reserve video framebuffer information using blob, received from previous stage. Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
-rw-r--r--drivers/video/video-uclass.c11
-rw-r--r--include/video.h9
2 files changed, 20 insertions, 0 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index c63343b015b..7901844475a 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -126,6 +126,17 @@ int video_reserve(ulong *addrp)
return 0;
}
+int video_reserve_from_bloblist(struct video_handoff *ho)
+{
+ 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);
+
+ 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 8cd41d0d885..1bf8e78ccc1 100644
--- a/include/video.h
+++ b/include/video.h
@@ -387,4 +387,13 @@ int bmp_display(ulong addr, int x, int y);
*/
int bmp_info(ulong addr);
+/*
+ * video_reserve_from_bloblist()- Reserve frame-buffer memory for video devices
+ * using blobs.
+ *
+ * @ho: video information passed from SPL
+ * Returns: 0 (always)
+ */
+int video_reserve_from_bloblist(struct video_handoff *ho);
+
#endif