[v3,22/26] video: mxsfb: support simple frame-buffer

Message ID 20261202102716.572884-23-dario.binacchi@amarulasolutions.com
State New
Headers
Series Support display on the BSH SMM S2/PRO boards |

Commit Message

Dario Binacchi Dec. 2, 2026, 10:26 a.m. UTC
If you want to pass the frame-buffer to the kernel, the video output is
initialized by U-Boot, and kept by the kernel. The patch does not turn
off the power domains or reset the peripheral if you want to support
such feature.

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

(no changes since v1)

 drivers/video/mxsfb.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 55ac99bbbf70..f7e8947c5509 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -421,7 +421,8 @@  static int mxs_video_remove(struct udevice *dev)
 	if (priv->disp_dev)
 		device_remove(priv->disp_dev, DM_REMOVE_NORMAL);
 
-	mxs_remove_common(priv->reg_base, plat->base);
+	if (!IS_ENABLED(CONFIG_VIDEO_DT_SIMPLEFB))
+		mxs_remove_common(priv->reg_base, plat->base);
 
 	return 0;
 }
@@ -444,6 +445,10 @@  U_BOOT_DRIVER(mxs_video) = {
 	.bind	= mxs_video_bind,
 	.probe	= mxs_video_probe,
 	.remove = mxs_video_remove,
+#if !IS_ENABLED(CONFIG_VIDEO_DT_SIMPLEFB)
 	.flags	= DM_FLAG_PRE_RELOC | DM_FLAG_OS_PREPARE,
+#else
+	.flags	= DM_FLAG_PRE_RELOC | DM_FLAG_OS_PREPARE | DM_FLAG_LEAVE_PD_ON,
+#endif
 	.priv_auto   = sizeof(struct mxsfb_priv),
 };