Thread (35 messages) 35 messages, 6 authors, 2026-04-01

Re: [PATCH 2/8] drm/mxsfb/lcdif: don't unnecessarily loop over ports

From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
Date: 2026-03-27 11:10:49
Also in: dri-devel, imx, lkml

Hello Liu,

thanks for the careful and timely review of this series!

On Thu Mar 26, 2026 at 7:59 AM CET, Liu Ying wrote:
Hi Luca,

On Fri, Mar 20, 2026 at 11:46:13AM +0100, Luca Ceresoli wrote:
quoted
According to the bindings [0] there can be only one port. The in-tree board
device trees also don't contain multiple ports (searched thos matching
s/thos/those/
quoted
'fsl,imx(23|28|6sx|8mp|93)-lcdif').

Avoid an unnecessary loop around multipltle ports. This allows to greatly
s/multipltle/multiple/
quoted
simplify the code.

[0] Documentation/devicetree/bindings/display/fsl,lcdif.yaml

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

---

Viewing this patch with '--ignore-all-space' is recommended
---
 drivers/gpu/drm/mxsfb/lcdif_drv.c | 77 ++++++++++++++-------------------------
 1 file changed, 27 insertions(+), 50 deletions(-)
diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c
index 756ca96373c8..83e134c04882 100644
--- a/drivers/gpu/drm/mxsfb/lcdif_drv.c
+++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c
@@ -48,61 +48,38 @@ static const struct drm_encoder_funcs lcdif_encoder_funcs = {
 static int lcdif_attach_bridge(struct lcdif_drm_private *lcdif)
 {
 	struct device *dev = lcdif->drm->dev;
-	struct device_node *ep;
+	struct drm_encoder *encoder;
 	struct drm_bridge *bridge;
 	int ret;

-	for_each_endpoint_of_node(dev->of_node, ep) {
The single i.MX93 LCDIF may connect with a DPI/LVDS/MIPI DSI encoder.
Each encoder maps to an endpoint in a port, hence 3 endpoints in all.
See lcdif node in imx91_93_common.dtsi and imx93.dtsi in linux-next/master.
My bad, I hadn't realized that, perhaps because it was not yet on
drm-misc-next when I did my research. Thanks for noticing.

Luckily the fundamental reason for which I thought I needed this changed
has vanished even before I sent this v1, so I'll just drop this patch and
adapt the follwing ones as needed.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help