diff mbox series

[v2,08/13] bbinfo: Show the size of the copy framebuffer

Message ID 20230222191257.1307427-9-sjg@chromium.org
State Changes Requested, archived
Delegated to: Heinrich Schuchardt
Headers show
Series video: efi: Improve the EFI-app video console | expand

Commit Message

Simon Glass Feb. 22, 2023, 7:12 p.m. UTC
If the copy framebuffer is enabled, show its size.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v2:
- Add new patch to show the size of the copy framebuffer with bdinfo

 cmd/bdinfo.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index bf002f84475..a75299f822f 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -83,11 +83,15 @@  static void show_video_info(void)
 		       device_active(dev) ? "" : "in");
 		if (device_active(dev)) {
 			struct video_priv *upriv = dev_get_uclass_priv(dev);
+			struct video_uc_plat *plat = dev_get_uclass_plat(dev);
 
 			bdinfo_print_num_ll("FB base", (ulong)upriv->fb);
-			if (upriv->copy_fb)
+			if (upriv->copy_fb) {
 				bdinfo_print_num_ll("FB copy",
 						    (ulong)upriv->copy_fb);
+				bdinfo_print_num_l(" copy size",
+						   plat->copy_size);
+			}
 			printf("%-12s= %dx%dx%d\n", "FB size", upriv->xsize,
 			       upriv->ysize, 1 << upriv->bpix);
 		}