From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 179A93E5EE8 for ; Fri, 27 Mar 2026 11:10:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774609856; cv=none; b=CmL1GcIp7cXaDoUpwgDkYHWCYITRlu8544XZyCSsuArMWWalaFS2QXq2IiQR0WCeI14vR37OxGYc1wN4BKyDk2riGsV5DtGVwoNcYVJ8cepBmpSTZTq6YVxFElpWsT0Vz/NtxIGHdYyL5VEdSfGdvb0rOmGbGbHTosCMxGBSCTM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774609856; c=relaxed/simple; bh=Vn6YW6xx/qbRyIbtZy+pHHO5XxFB/kiDhoHenQM9bjE=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=VjdTa7hsDjJgKQ/KWvi8s+vvFU5utv0J72oDGLYlF89+piu6xWs3Xij3sBBHvFwC4Yg7rATsdaptO+EpiyackS+/ncOhkQq4kUd6ipUWwqzjFC3LSd5FyM7f8C1NBciHp7U/XA4T8eoUxol2NSNrjUlJetLMO86gBWKkggml/V0= 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=gAroRVxD; arc=none smtp.client-ip=185.171.202.116 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="gAroRVxD" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id B8CA7C58744; Fri, 27 Mar 2026 11:11:14 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0E9ED60230; Fri, 27 Mar 2026 11:10:46 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 208FD1045116C; Fri, 27 Mar 2026 12:10:29 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1774609843; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ivVZrNHVuLE7L07Vcqm3cEhovIGG3NxlMH+ON4o2wYA=; b=gAroRVxDKBMWxOgvewR23uQHXW9xAU/MNSGXkPTTC23oT/5FXuA97wX7krVS4mQkGkffsN G/Xb+qyT7GEae1pgl+k3JxZI/Cv1pG5vNJ2/x/wV15du+QmUVb8SRk9s5VQaYfKOquoiaU jw81ThVsg6+0WySTK5NG+FZTWLzzykSJGpbrueHKnV5n0qeqJ3tojDkR+JQ6P/OdFKL6Nl +k8KWA89ojc+vsgW9zZHFmTqOskJSzpFFZ/KIX9sq5lJZdOmnNfiiKtyBdHPUE/mM7x4WC TCBRxoebM09VUO5rd5r++WRhx0hSFC7lkYZYcfCGGdqMQlNp81tuqcd6/jMBsg== Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 27 Mar 2026 12:10:28 +0100 Message-Id: Subject: Re: [PATCH 2/8] drm/mxsfb/lcdif: don't unnecessarily loop over ports Cc: "Kory Maincent (TI.com)" , =?utf-8?q?Herv=C3=A9_Codina?= , "Hui Pu" , "Ian Ray" , "Thomas Petazzoni" , , , , , , "Adam Ford" , "Alexander Stein" , "Anson Huang" , "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" , "Joao Paulo Goncalves" , "Josua Mayer" , "Kieran Bingham" , "Marco Felsch" , "Martyn Welch" , "Oleksij Rempel" , "Peng Fan" , "Philippe Schenker" , "Richard Hu" , "Shengjiu Wang" , "Stefan Eichenberger" , "Vitor Soares" To: "Liu Ying" , "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" , "Rob Herring" , "Saravana Kannan" From: "Luca Ceresoli" X-Mailer: aerc 0.20.1 References: <20260320-drm-lcdif-dbanc-v1-0-479a04133e70@bootlin.com> <20260320-drm-lcdif-dbanc-v1-2-479a04133e70@bootlin.com> <299ea117-c628-4094-88f3-47c8d898e15e@nxp.com> In-Reply-To: <299ea117-c628-4094-88f3-47c8d898e15e@nxp.com> X-Last-TLS-Session-Version: TLSv1.3 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: >> According to the bindings [0] there can be only one port. The in-tree bo= ard >> device trees also don't contain multiple ports (searched thos matching > > s/thos/those/ > >> 'fsl,imx(23|28|6sx|8mp|93)-lcdif'). >> >> Avoid an unnecessary loop around multipltle ports. This allows to greatl= y > > s/multipltle/multiple/ > >> simplify the code. >> >> [0] Documentation/devicetree/bindings/display/fsl,lcdif.yaml >> >> Signed-off-by: Luca Ceresoli >> >> --- >> >> 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/l= cdif_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 =3D { >> static int lcdif_attach_bridge(struct lcdif_drm_private *lcdif) >> { >> struct device *dev =3D 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/maste= r. 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