diff mbox series

[V2,4/8] include: video: Reserve video using blob

Message ID 20230609115122.14791-5-n-jain1@ti.com
State Superseded
Delegated to: Tom Rini
Headers show
Series Update SPL splashscreen framework for AM62x | expand

Commit Message

Nikhil Jain June 9, 2023, 11:51 a.m. UTC
Add method to reserve video framebuffer information using blob,
recieved from previous stage.

Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
---
V2:
- Remove #if CONFIG_IS_ENABLED(VIDEO) in video_reserve_from_blob.

 drivers/video/video-uclass.c | 11 +++++++++++
 include/video.h              |  9 +++++++++
 2 files changed, 20 insertions(+)

Comments

Tom Rini June 9, 2023, 3:39 p.m. UTC | #1
On Fri, Jun 09, 2023 at 05:21:18PM +0530, Nikhil M Jain wrote:

> Add method to reserve video framebuffer information using blob,
> recieved from previous stage.
> 
> Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
> ---
> V2:
> - Remove #if CONFIG_IS_ENABLED(VIDEO) in video_reserve_from_blob.
> 
>  drivers/video/video-uclass.c | 11 +++++++++++
>  include/video.h              |  9 +++++++++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
> index 8396bdfb11..68ce681bb9 100644
> --- a/drivers/video/video-uclass.c
> +++ b/drivers/video/video-uclass.c
> @@ -142,6 +142,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 18ed159b8d..5f3010d641 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_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

Anatolij any thoughts?
Simon Glass June 12, 2023, 9:17 p.m. UTC | #2
On Fri, 9 Jun 2023 at 12:51, Nikhil M Jain <n-jain1@ti.com> wrote:
>
> Add method to reserve video framebuffer information using blob,
> recieved from previous stage.
>
> Signed-off-by: Nikhil M Jain <n-jain1@ti.com>
> ---
> V2:
> - Remove #if CONFIG_IS_ENABLED(VIDEO) in video_reserve_from_blob.
>
>  drivers/video/video-uclass.c | 11 +++++++++++
>  include/video.h              |  9 +++++++++
>  2 files changed, 20 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
diff mbox series

Patch

diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 8396bdfb11..68ce681bb9 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -142,6 +142,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 18ed159b8d..5f3010d641 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_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