From nobody Tue Apr 7 20:08:12 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F16BA3A6EFB; Tue, 7 Apr 2026 12:26:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775564789; cv=none; b=dPMpZHNaLlJIHV8MsMHiDrZ0nFk+9I5OZUrfcQRBLWfYOCqK2qf7XVZnj2ftqHeqFzywpKncT3nvPVPv/BlQgM8YorO+8wjIsXLvmH9+QKCmM2lriYB/hUr7UWAkIOakqe7q70jWdwTEGDXQOG/d7BRxdBPpruJm5bbkIDOXQXc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775564789; c=relaxed/simple; bh=gDW1kKCDH/hb2Z3qCDf8FgI4nHG9uhNZHyesLtqQ66A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tNzDEOfG6KmMI6PNrywdFSfl/BJ9mHGAZrDhDXDR5hsW/7zj1OWL8V+uimz7cHn799gUaQCjaK8/IylB09HIi8NdRftEwRUF9xFpjVPCa9P0ybu+P4GeKZVmn+r/eJOiwFGVLUXOH770crmd/G3wC+TkYBUR3c4Th1sbEAudNUg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=yT4C2/At; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="yT4C2/At" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 7B0D94E4295E; Tue, 7 Apr 2026 12:26:26 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 4D74C603C7; Tue, 7 Apr 2026 12:26:26 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 4B82C1045020E; Tue, 7 Apr 2026 14:26:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1775564783; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=AlG/dcUK00yA1Ez4jPZ5YroPlq5ftafDx5ata3ZpRRs=; b=yT4C2/AtKdT+ZXrbA+JVrInH4/6v4Eikg+Qfvq9VuhOGFXjFJSK7iLnfW0p9lyMfBKSVzA 4jD5KwyT0x1P16h4YrfpKhBRdxz3XR+avXD4wXj4kSKli5onB/8i/wUZ+F4Lnn/PlVuk2+ w3NWXh/EhqUgfgupcFkiTLyvzdoxuGqveoXcNir2bWRxlIorKCr+K1OtpoBFgR4b+spfv2 K8oB6lhFsHjVX8lsjfkjTq/xV8qiWNufi3J0qFpSrA1YTLcoBY9Q/fgfp3WEUJ6rZmNqCR +evP7IJ06KajPjM9LGC244WXgvVzm8CiuAAZUDXsYROUY+QqvBQ1h5ggNG2v+A== From: Luca Ceresoli Date: Tue, 07 Apr 2026 14:24:25 +0200 Subject: [PATCH v4 11/11] drm/mxsfb/lcdif: use DRM_BRIDGE_ATTACH_NO_CONNECTOR and the bridge-connector Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260407-drm-lcdif-dbanc-v4-11-247a16e61ef9@bootlin.com> References: <20260407-drm-lcdif-dbanc-v4-0-247a16e61ef9@bootlin.com> In-Reply-To: <20260407-drm-lcdif-dbanc-v4-0-247a16e61ef9@bootlin.com> To: Marek Vasut , Stefan Agner , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Liu Ying , Rob Herring , Saravana Kannan Cc: Damon Ding , "Kory Maincent (TI.com)" , =?utf-8?q?Herv=C3=A9_Codina?= , Hui Pu , Ian Ray , Thomas Petazzoni , dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Adam Ford , Alexander Stein , Christopher Obbard , Daniel Scally , Emanuele Ghidoli , Fabio Estevam , Francesco Dolcini , Frieder Schrempf , Gilles Talis , =?utf-8?q?Goran_Ra=C4=91enovi=C4=87?= , Heiko Schocher , Josua Mayer , Kieran Bingham , Marco Felsch , Martyn Welch , Oleksij Rempel , Peng Fan , Richard Hu , Shengjiu Wang , Stefan Eichenberger , Vitor Soares , Luca Ceresoli X-Mailer: b4 0.15.1 X-Last-TLS-Session-Version: TLSv1.3 Convert this driver to DRM_BRIDGE_ATTACH_NO_CONNECTOR and to the drm_bridge_connector framework which is the current DRM bridge best practice. Based on the in-tree dts[i] files this introduces no regression. Based on the kernel doc of drm_bridge_connector.c: * To make use of this helper, all bridges in the chain shall report bridge * operation flags (&drm_bridge->ops) and bridge output type * (&drm_bridge->type), as well as the DRM_BRIDGE_ATTACH_NO_CONNECTOR attach * flag (none of the bridges shall create a DRM connector directly). and each of the 3 LCDIF blocks in the i.MX8MP, all of them comply with the above requirement: * For the LCDIF3, the pipeline is: LCDIF3 -> fsl,imx8mp-hdmi-pvi -> fsl,imx8mp-hdmi-tx -> HDMI connector And the involved bridges are: * fsl,imx8mp-hdmi-pvi has ops =3D 0 (it doesn't set it) because it implements none the optional features mentioned by those flags, and it honors the DRM_BRIDGE_ATTACH_NO_CONNECTOR by propagating it * fsl,imx8mp-hdmi-tx is implemented based on dw-hdmi, which sets ops as appropriate and also propagates the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag * display-connector (enabled via the DT overlay if needed) sets ops and makes DRM_BRIDGE_ATTACH_NO_CONNECTOR mandatory * The LCDIF2 involves the panel-bridge, display-connector and lvds-decoder (even though only the pane-bridge is surrently supported), amd all these three also set ops as needed and propagate DRM_BRIDGE_ATTACH_NO_CONNECTOR or make it mandatory. * The LCDIF1 is used with the adv7511, tc358767 and the panel bridge drivers which also comply with the requirements. Tested-by: Martyn Welch Tested-by: Alexander Stein # TQMa8MPxL/MB= a8MPxL Signed-off-by: Luca Ceresoli --- Changes in v4: - enhance commit message to list all involved peripherals based on my dts review Changes in v2: - Added missing select DRM_DISPLAY_HELPER in Kconfig - Rebased on previous patch changes --- drivers/gpu/drm/mxsfb/Kconfig | 2 ++ drivers/gpu/drm/mxsfb/lcdif_drv.c | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mxsfb/Kconfig b/drivers/gpu/drm/mxsfb/Kconfig index 264e74f45554..31db7a824a93 100644 --- a/drivers/gpu/drm/mxsfb/Kconfig +++ b/drivers/gpu/drm/mxsfb/Kconfig @@ -33,6 +33,8 @@ config DRM_IMX_LCDIF select DRM_GEM_DMA_HELPER select DRM_PANEL select DRM_PANEL_BRIDGE + select DRM_DISPLAY_HELPER + select DRM_BRIDGE_CONNECTOR help Choose this option if you have an LCDIFv3 LCD controller. Those devices are found in various i.MX SoC (i.MX8MP, diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdi= f_drv.c index c8ba8f9b1da8..7f07ae24e0dc 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.c +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -57,6 +58,7 @@ static int lcdif_attach_bridge(struct lcdif_drm_private *= lcdif) struct of_endpoint of_ep; struct drm_bridge *bridge; struct drm_encoder *encoder; + struct drm_connector *connector; int ret; =20 if (!of_device_is_available(remote)) @@ -86,11 +88,23 @@ static int lcdif_attach_bridge(struct lcdif_drm_private= *lcdif) "Failed to initialize encoder for endpoint%u\n", of_ep.id); =20 - ret =3D drm_bridge_attach(encoder, bridge, NULL, 0); + ret =3D drm_bridge_attach(encoder, bridge, NULL, DRM_BRIDGE_ATTACH_NO_CO= NNECTOR); if (ret) return dev_err_probe(dev, ret, "Failed to attach bridge for endpoint%u\n", of_ep.id); + + connector =3D drm_bridge_connector_init(lcdif->drm, encoder); + if (IS_ERR(connector)) + return dev_err_probe(dev, PTR_ERR(connector), + "Failed to init bridge_connector for endpoint%u\n", + of_ep.id); + + ret =3D drm_connector_attach_encoder(connector, encoder); + if (ret) + return dev_err_probe(dev, ret, + "Failed to attach connector for endpoint%u\n", + of_ep.id); } =20 return 0; --=20 2.53.0