On 26.09.24 15:15, Sascha Hauer wrote:
> 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 3677c63e07..f6310498c8 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) {

Having both screen_base and unadorned base in the same struct is confusing.
How about renaming this to base_plane?

Also, to make this a bit more convenient to use, should we make overlays
a "partition" of the original fb device? /dev/fb0 (base), /dev/fb0.\d 
(overlays).

> +             printf("Type: overlay\n");
> +             printf("base plane: %s\n", dev_name(&info->base->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)
> 


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

Reply via email to