[PATCH v2 08/11] video: lcdif: register simplefb fixup and enable framebuffer at probe

Sascha Hauer s.hauer at pengutronix.de
Mon Jun 15 02:16:10 PDT 2026


On 2026-06-04 06:50, Johannes Schneider wrote:
> From: Thomas Haemmerle <thomas.haemmerle at leica-geosystems.com>
> 
> Two changes are needed to use lcdif_drv as the primary barebox boot
> framebuffer:
> 
>   - register_framebuffer() leaves the cdev disabled; the splash command
>     opens fb0 via the fb API and never goes through the cdev open path
>     that triggers fb_enable lazily, so it bails on
>     "fb_open: No such file or directory".  fb_enable() at the end of
>     register_fb so the controller is up by the time anything blits.
> 
>   - Set info->register_simplefb and call fb_register_simplefb() so
>     DRM_SIMPLEDRM in Linux sees the boot framebuffer as a
>     simple-framebuffer DT node and keeps the splash visible until its
>     native LCDIF driver binds.
> 
> Signed-off-by: Thomas Haemmerle <thomas.haemmerle at leica-geosystems.com>
> ---
>  drivers/video/lcdif_kms.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/video/lcdif_kms.c b/drivers/video/lcdif_kms.c
> index 5487d1298c..e3d1985dc9 100644
> --- a/drivers/video/lcdif_kms.c
> +++ b/drivers/video/lcdif_kms.c
> @@ -459,6 +459,16 @@ static int lcdif_register_fb(struct lcdif_drm_private *lcdif)
>  	if (ret)
>  		return ret;
>  
> +	/* expose as simple-framebuffer for Linux DRM_SIMPLEDRM handoff */
> +	info->register_simplefb = 1;
> +	fb_register_simplefb(info);

fb_register_simplefb() is already called during register_framebuffer(),
so it shouldn't be necessary to call it here.

If you wish to actually use simple fb in Linux that's a board specific
decision and you should set nv.dev.fb0.register_simplefb (not sure if
the variable name is 100% correct).

> +
> +	/* enable now so the splash command can blit into a live fb */
> +	ret = fb_enable(info);

The idea is rather that the splash command renders in a disabled
framebuffer so that the splash screen is there immediately when you
enable the framebuffer. This reduces flickering as compared to first
enable the framebuffer and render afterwards.

There might be pieces missing upstream, but these changes shouldn't be
in the driver, but in the generic code.

Sascha

-- 
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 |



More information about the barebox mailing list