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

Dario Binacchi
2024-09-13T10:00:52Z

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

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

diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c
index 45431f0a1047..06b2a2461246 100644
--- a/drivers/video/mxsfb.c
+++ b/drivers/video/mxsfb.c
@@ -422,7 +422,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;
}
@@ -445,6 +446,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),
};
--
2.43.0