From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Tue, 02 Jun 2026 09:17:36 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wUJNX-001VNo-3A for lore@lore.pengutronix.de; Tue, 02 Jun 2026 09:17:35 +0200 Received: from bombadil.infradead.org ([2607:7c80:54:3::133]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wUJNW-0000le-8g for lore@pengutronix.de; Tue, 02 Jun 2026 09:17:35 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QNgyLOjeHCDmqv5aywHPVMWQYC3oM56q9iUJh/Z5bwk=; b=ox1RWDXqsSrLXefCGc/zoMzL4m rexGDrOSbsDz7fivYdryKnP7QyNbngkKwEhT81f4kVaH26RHWAAq1R1dqngxMK/P2MsVbaQzePwFI fLQpm2Pm25MACwuIhXvecz8VhTbIKjm/y7Ylyvsdgl//IuRFRH2NwjntOjrgObTM1RXuT94sedr3+ Euq5d2JcYxaKfCNNZ2rdkuJhbU6+kvoGK7jEECMyt3TYOPWvMP+/RYknqCOrmNYoG+Ia7adkBsD+t fphbQMak5Hk4zHj9EDWtac8nzbW6LQUQd4bdmlrTkfoGVt0iVgeA2zrhCc+sqaR9gk2SIfucIuwuF DOSLQXcg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1wUJMV-0000000CRNa-1hBv; Tue, 02 Jun 2026 07:16:31 +0000 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1wUJMI-0000000CR74-2m2g for barebox@lists.infradead.org; Tue, 02 Jun 2026 07:16:21 +0000 Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=[127.0.0.1]) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1wUJMH-0000bN-1z; Tue, 02 Jun 2026 09:16:17 +0200 Message-ID: <13cf5be3-8bcd-444f-96fc-6deb0f3a9067@pengutronix.de> Date: Tue, 2 Jun 2026 09:16:16 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Johannes Schneider , barebox@lists.infradead.org Cc: thomas.haemmerle@leica-geosystems.com, mgr@kernel.org References: <20260602040953.1060278-1-johannes.schneider@leica-geosystems.com> <20260602040953.1060278-5-johannes.schneider@leica-geosystems.com> From: Ahmad Fatoum Content-Language: en-US, de-DE, de-BE In-Reply-To: <20260602040953.1060278-5-johannes.schneider@leica-geosystems.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260602_001619_141375_98E966A8 X-CRM114-Status: GOOD ( 37.63 ) X-BeenThere: barebox@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "barebox" X-SA-Exim-Connect-IP: 2607:7c80:54:3::133 X-SA-Exim-Mail-From: barebox-bounces+lore=pengutronix.de@lists.infradead.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.whiteo.stw.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-5.2 required=4.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 Subject: Re: [PATCH 4/6] video: add i.MX8MP LCDIF2 V8 framebuffer driver X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000) X-SA-Exim-Scanned: Yes (on metis.whiteo.stw.pengutronix.de) Hello, On 6/2/26 6:09 AM, Johannes Schneider wrote: > From: Thomas Haemmerle > > The i.MX8MP has a new LCDIF V8 display controller with a different > register layout from the older mxsfb-based LCDIF found on i.MX6/7/8MM. > The existing DRIVER_VIDEO_LCDIF driver does not support this variant, > leaving the i.MX8MP without a barebox framebuffer and no way to show a > boot splash. > > The driver: > - Programs LCDIF V8 timing registers for the configured video mode. > - Uses 128B DMA burst size (P_SIZE=1, T_SIZE=1) so that 800-pixel rows > (3200 bytes) divide into exactly 25 complete bursts; 256B bursts leave > a partial burst and produce a ~32px black strip at the right edge. > - Sets correct CTRL polarity bit positions (INV_HS=bit0, INV_VS=bit1, > INV_DE=bit2, INV_PXCK=bit3); the i.MX8MP TRM places these at bits 0-3, > not 2-5 as a naive port from mxsfb would suggest. > - Allocates a write-combine DMA framebuffer and registers a simplefb DT > fixup for Linux DRM_SIMPLEDRM to inherit the boot image. > - Enables the framebuffer at probe time so the splash command only needs > to blit pixels; fb_enable() is not called per-splash. > > Assisted-by: Claude:claude-sonnet-4-6 > Signed-of-by: Thomas Haemmerle Michael had introduced this driver already into barebox v2026.01.0, see drivers/video/lcdif_drv.c. It matches both i.MX8MP and i.MX93 already, but has been tested only on i.MX93 so far as I am aware. Please try again with the upstream driver and extend it as needed. Cheers, Ahmad > --- > drivers/video/Kconfig | 10 + > drivers/video/Makefile | 1 + > drivers/video/imx-lcdif.c | 378 ++++++++++++++++++++++++++++++++++++++ > 3 files changed, 389 insertions(+) > create mode 100644 drivers/video/imx-lcdif.c > > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig > index ce10237221..fbcec6fd67 100644 > --- a/drivers/video/Kconfig > +++ b/drivers/video/Kconfig > @@ -194,6 +194,16 @@ config DRIVER_VIDEO_TC358767 > help > The TC358767A is a DSI/DPI to eDP video encoder chip > > +config DRIVER_VIDEO_IMX_LCDIF > + bool "i.MX8MP LCDIF V8 framebuffer driver" > + select VIDEO_VPL > + select DRIVER_VIDEO_SIMPLEFB > + depends on OFTREE && OFDEVICE > + help > + Framebuffer driver for the i.MX8MP/i.MX93 LCDIF V8 display controller. > + Supports the "fsl,imx8mp-lcdif" compatible. Creates a simple-framebuffer > + device tree node for kernel handoff via DRM_SIMPLEDRM. > + > config DRIVER_VIDEO_SIMPLE_PANEL > bool "Simple panel support" > select VIDEO_VPL > diff --git a/drivers/video/Makefile b/drivers/video/Makefile > index 7b10eda0d8..9957ff5ad2 100644 > --- a/drivers/video/Makefile > +++ b/drivers/video/Makefile > @@ -9,6 +9,7 @@ obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbconsole.o > obj-$(CONFIG_VIDEO_VPL) += vpl.o > obj-$(CONFIG_DRIVER_VIDEO_MTL017) += mtl017.o > obj-$(CONFIG_DRIVER_VIDEO_TC358767) += tc358767.o > +obj-$(CONFIG_DRIVER_VIDEO_IMX_LCDIF) += imx-lcdif.o > obj-$(CONFIG_DRIVER_VIDEO_SIMPLE_PANEL) += simple-panel.o > obj-$(CONFIG_DRIVER_VIDEO_MIPI_DBI) += mipi_dbi.o > obj-$(CONFIG_DRIVER_VIDEO_MIPI_DSI) += mipi_dsi.o > diff --git a/drivers/video/imx-lcdif.c b/drivers/video/imx-lcdif.c > new file mode 100644 > index 0000000000..ae5976c771 > --- /dev/null > +++ b/drivers/video/imx-lcdif.c > @@ -0,0 +1,378 @@ > +// SPDX-License-Identifier: GPL-2.0-or-later > +/* > + * i.MX8MP LCDIF V8 framebuffer driver for barebox > + * > + * Based on Linux drivers/gpu/drm/mxsfb/lcdif_drv.c and lcdif_kms.c > + * Copyright (C) 2022 Marek Vasut > + * > + * Copyright Leica Geosystems AG > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include