[26/29] video: bridge: samsung: support simple frame-buffer

Message ID 20240903153100.918077-26-dario.binacchi@amarulasolutions.com
State New
Headers show
Series
  • [01/29] clk: Propagate clk_set_rate() if CLK_SET_PARENT_RATE present for gate and mux
Related show

Commit Message

Dario Binacchi Sept. 3, 2024, 3:30 p.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 disable the peripheral if you want to support
such feature.

Co-Developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 drivers/video/bridge/samsung-dsi-host.c | 7 +++++++
 drivers/video/bridge/samsung-dsim.c     | 3 +++
 2 files changed, 10 insertions(+)

Patch

diff --git a/drivers/video/bridge/samsung-dsi-host.c b/drivers/video/bridge/samsung-dsi-host.c
index dd3e33c4edc7..01385f30fce4 100644
--- a/drivers/video/bridge/samsung-dsi-host.c
+++ b/drivers/video/bridge/samsung-dsi-host.c
@@ -1515,6 +1515,12 @@  static int samsung_dsi_enable(struct udevice *dev)
 	return 0;
 }
 
+#if IS_ENABLED(CONFIG_VIDEO_DT_SIMPLEFB)
+static int samsung_dsi_disable(struct udevice *dev)
+{
+	return 0;
+}
+#else
 static int samsung_dsi_disable(struct udevice *dev)
 {
 	u32 intsrc;
@@ -1532,6 +1538,7 @@  static int samsung_dsi_disable(struct udevice *dev)
 
 	return 0;
 }
+#endif
 
 struct dsi_host_ops samsung_dsi_ops = {
 	.init = samsung_dsi_init,
diff --git a/drivers/video/bridge/samsung-dsim.c b/drivers/video/bridge/samsung-dsim.c
index 986f1d830844..6e5a12218315 100644
--- a/drivers/video/bridge/samsung-dsim.c
+++ b/drivers/video/bridge/samsung-dsim.c
@@ -144,5 +144,8 @@  U_BOOT_DRIVER(samsung_dsim) = {
 	.remove				= samsung_dsim_remove,
 	.probe				= samsung_dsim_probe,
 	.ops				= &samsung_dsim_ops,
+#if IS_ENABLED(CONFIG_VIDEO_DT_SIMPLEFB)
+        .flags                          = DM_FLAG_LEAVE_PD_ON,
+#endif
 	.priv_auto		= sizeof(struct samsung_dsim_priv),
 };