mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Johannes Schneider <johannes.schneider@leica-geosystems.com>
To: barebox@lists.infradead.org, a.fatoum@pengutronix.de,
	mgr@kernel.org, l.stach@pengutronix.de
Cc: thomas.haemmerle@leica-geosystems.com,
	Johannes Schneider <johannes.schneider@leica-geosystems.com>
Subject: [PATCH v2 05/11] video: lcdif: make functional on i.MX8MP
Date: Thu,  4 Jun 2026 06:50:00 +0000	[thread overview]
Message-ID: <20260604065006.2933142-6-johannes.schneider@leica-geosystems.com> (raw)
In-Reply-To: <20260604065006.2933142-1-johannes.schneider@leica-geosystems.com>

The driver matches fsl,imx8mp-lcdif and its help text mentions i.MX8MP,
but two oversights left it unusable on that SoC:

  - Kconfig depends on ARCH_IMX9 || ARCH_IMX93, so setting
    CONFIG_DRIVER_VIDEO_LCDIF=y in an IMX8MP defconfig is silently
    forced back to n and the driver is never built.

  - lcdif_probe() acquires clk references but never ungates them.  In
    Linux runtime PM via the LCDIF power-domain genpd handles that;
    barebox has no runtime_pm wiring, so the LCDIF clock domain stays
    gated and the MMIO setup in atomic_enable silently no-ops --
    /dev/fb0 registers correctly but DISP_PARA / CTRLDESCL stay at 0
    and the panel is dark.

Add ARCH_IMX8MP to the depends-on clause, update the menu prompt to
match the help text, and clk_prepare_enable() the three clocks at the
start of lcdif_crtc_atomic_enable, after the pixel-clock rate is set.

Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
---
 drivers/video/Kconfig     | 4 ++--
 drivers/video/lcdif_kms.c | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index ce10237221..2faad19a99 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -67,8 +67,8 @@ config DRIVER_VIDEO_IMX_IPU_OVERLAY
 	depends on DRIVER_VIDEO_IMX_IPU && (ARCH_IMX35 || ARCH_IMX31)
 
 config DRIVER_VIDEO_LCDIF
-	bool "i.MX9 framebuffer driver"
-	depends on ARCH_IMX9 || ARCH_IMX93
+	bool "i.MX8MP/9/93 LCDIFv3 framebuffer driver"
+	depends on ARCH_IMX8MP || ARCH_IMX9 || ARCH_IMX93
 	help
 	  Add support for the LCDIFv3 LCD controller found on
 	  i.MX8MP and i.MX93 SoCs.
diff --git a/drivers/video/lcdif_kms.c b/drivers/video/lcdif_kms.c
index 033df23186..3a31633818 100644
--- a/drivers/video/lcdif_kms.c
+++ b/drivers/video/lcdif_kms.c
@@ -326,6 +326,11 @@ static void lcdif_crtc_atomic_enable(struct lcdif_drm_private *lcdif,
 
 	clk_set_rate(lcdif->clk, mode->clock * 1000);
 
+	/* no runtime PM; ungate the LCDIF clocks ourselves */
+	clk_prepare_enable(lcdif->clk_axi);
+	clk_prepare_enable(lcdif->clk_disp_axi);
+	clk_prepare_enable(lcdif->clk);
+
 	lcdif_crtc_mode_set_nofb(lcdif, mode, vcstate);
 
 	/* Write cur_buf as well to avoid an initial corrupt frame */
-- 
2.43.0




  parent reply	other threads:[~2026-06-04  6:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04  6:49 [PATCH v2 00/11] video: enable boot splash on i.MX8MP with LVDS panel Johannes Schneider
2026-06-04  6:49 ` [PATCH v2 01/11] clk: imx8mp: add 700 MHz rate entry for VIDEO_PLL1 Johannes Schneider
2026-06-04  6:49 ` [PATCH v2 02/11] clk: imx8mp: add 1039.5 MHz and 519.75 MHz rate entries " Johannes Schneider
2026-06-04  6:49 ` [PATCH v2 03/11] pmdomain: imx8mp-blk-ctrl: add media blk-ctrl power domain support Johannes Schneider
2026-06-04  6:49 ` [PATCH v2 04/11] video: backlight-pwm: make power-supply and enable-gpio optional Johannes Schneider
2026-06-04  6:50 ` Johannes Schneider [this message]
2026-06-04  6:50 ` [PATCH v2 06/11] video: lcdif: use 128B AXI bursts to avoid right-edge gap Johannes Schneider
2026-06-04  6:50 ` [PATCH v2 07/11] video: lcdif: default to RGB888_1X24 on VPL_GET_BUS_FORMAT failure Johannes Schneider
2026-06-04  6:50 ` [PATCH v2 08/11] video: lcdif: register simplefb fixup and enable framebuffer at probe Johannes Schneider
2026-06-04  6:50 ` [PATCH v2 09/11] video: lcdif: drain write-combine framebuffer in fb_damage Johannes Schneider
2026-06-04  6:50 ` [PATCH v2 10/11] video: simple-panel: support panel-lvds DT bindings Johannes Schneider
2026-06-04  6:50 ` [PATCH v2 11/11] video: simple-panel: lazily resolve backlight without failing Johannes Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260604065006.2933142-6-johannes.schneider@leica-geosystems.com \
    --to=johannes.schneider@leica-geosystems.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=l.stach@pengutronix.de \
    --cc=mgr@kernel.org \
    --cc=thomas.haemmerle@leica-geosystems.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox