]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
include: video: Reserve video using blob
authorNikhil M Jain <n-jain1@ti.com>
Tue, 18 Jul 2023 08:57:30 +0000 (14:27 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 21 Jul 2023 19:32:12 +0000 (15:32 -0400)
Add method to reserve video framebuffer information using blob,
received from previous stage.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/video/video-uclass.c
include/video.h

index 95e874b770b28c446cf81c37250a7f29153c2125..435dab1f195c40c32659150345add3754a516781 100644 (file)
@@ -194,6 +194,17 @@ int video_fill_part(struct udevice *dev, int xstart, int ystart, int xend,
        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);
index 9729fa348aa5da9d48539ab6fb0a12983dfed98c..269915160b4b8489a4df977a1eaecdb362c87254 100644 (file)
@@ -406,4 +406,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