Print some more information about the framebuffer in the devinfo output:
- x/y resolution
- line_length
- type of framebuffer (overlay, base plane)
- if it's an overlay, print the base plane

Signed-off-by: Sascha Hauer <s.ha...@pengutronix.de>
---
 drivers/video/fb.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index ccc755322e..65afaa57d9 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -264,6 +264,15 @@ static void fb_info(struct device *dev)
        printf("Available modes:\n");
        fb_print_modes(&info->modes);
        fb_print_modes(&info->edid_modes);
+       if (info->base_plane) {
+               printf("Type: overlay\n");
+               printf("base plane: %s\n", dev_name(&info->base_plane->dev));
+       } else {
+               printf("Type: primary\n");
+       }
+       printf("xres: %u\n", info->xres);
+       printf("yres: %u\n", info->yres);
+       printf("line_length: %u\n", info->line_length);
 }
 
 void *fb_get_screen_base(struct fb_info *info)

-- 
2.39.5


Reply via email to