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 D8DDC2DCF58 for ; Mon, 19 Jan 2026 21:18:25 +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=1768857507; cv=none; b=kr4V/X5RXdUpZMFIi2nemuxYsqqOPAkqrPuZgMWxYtSHusfgbvtWG+FEXX06oh+6lVlsr/z25AVWZ+xU5m3mHcJFVqUO9HNeBDHbJhB95HUXbzp/QB3kRXuR6hDTaTeH5bdddDUwilzOOUceogfzgBX/1m6d6bNt67ggkt9VC+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768857507; c=relaxed/simple; bh=HYIpTWOelTu+f2mRc3+nNuEa15fJDpwoLyxr/fKPdkw=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:To:From:Subject: References:In-Reply-To; b=nWcYIIG0yo/IJNUdD8HikXJ1IE8jzUkDbVTohB9X6+8aAZfbjPgBYqVg/tXyak31mwlkH3wthGBfyAhDPWSaO3NWG3TW52g+7HcQ8VAd+ik27/gbdsGbShYyH6567nk0aKCcP/22Tcw1r6Zi0PGY/E4yWGWMTey7ECGywV/Ttl8= 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=p/IKxkR8; 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="p/IKxkR8" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 146B5C214DA; Mon, 19 Jan 2026 21:17:57 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id EA16460731; Mon, 19 Jan 2026 21:18:23 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 965DE10B68B2D; Mon, 19 Jan 2026 22:18:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1768857502; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=dccIYLuOl9zFcSjOIfL/wJ5qKBUv5KOPn4Dk/51P1ro=; b=p/IKxkR85xBhtvnXMQJ+Z0lHSsJWSaFvuppJJ4ZXkuadRGQIpoG7bnPV0UcyCtmbOdTWgQ 0rn135SAWYO3qRVYhojkKTXg4SgVukMsCF8fAnnYneY75QRWh33r6hYsTy1ipD8hz8+nSA ZVQqTI5bKwqe1m+dcloKK2QMWzcF+RQu9PLeDgTq/oxMrpjLo+sDKd+NhHj6tR9ryA4+EV u77RNcwnEkPc0EzXmFMRuXXu+I8911O4ebAx7XT/9gagAC1hJDDVfI3CO9WS6qTn9A7Zs9 jCCeC/x+rj727+a1JkODsgA2nO0mzW4GuhY7YK926s+DDvrWm4YSHuBAke+MMg== 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: Mon, 19 Jan 2026 22:18:12 +0100 Message-Id: Cc: "Markus Schneider-Pargmann" , "Bajjuri Praneeth" , "Louis Chauvet" , "Thomas Petazzoni" , "Miguel Gazquez" , "Herve Codina" , , , , , To: "Kory Maincent (TI.com)" , "Jyri Sarha" , "Tomi Valkeinen" , "Maarten Lankhorst" , "Maxime Ripard" , "Thomas Zimmermann" , "David Airlie" , "Simona Vetter" , "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Russell King" , "Bartosz Golaszewski" , "Tony Lindgren" , "Andrzej Hajda" , "Neil Armstrong" , "Robert Foss" , "Laurent Pinchart" , "Jonas Karlman" , "Jernej Skrabec" From: "Luca Ceresoli" Subject: Re: [PATCH v4 20/25] drm/tilcdc: Use devm_drm_of_get_bridge() helper X-Mailer: aerc 0.20.1 References: <20260116-feature_tilcdc-v4-0-2c1c22143087@bootlin.com> <20260116-feature_tilcdc-v4-20-2c1c22143087@bootlin.com> In-Reply-To: <20260116-feature_tilcdc-v4-20-2c1c22143087@bootlin.com> X-Last-TLS-Session-Version: TLSv1.3 Hi K=C3=B6ry, Maxime, Maxime, I'd appreciate your opinion about the topic below. On Fri Jan 16, 2026 at 6:02 PM CET, Kory Maincent (TI.com) wrote: > Replace drm_of_find_panel_or_bridge() with the newer > devm_drm_of_get_bridge() helper which simplifies the code by: > - Automatically handling both panel and bridge cases internally > - Managing the panel-to-bridge conversion when needed > - Using devres for resource management, eliminating manual cleanup > > This removes the need for explicit panel-to-bridge conversion via > devm_drm_panel_bridge_add_typed() and the associated error handling path. > > Signed-off-by: Kory Maincent (TI.com) > --- > > Change in v4: > - New patch > --- > drivers/gpu/drm/tilcdc/tilcdc_encoder.c | 18 ++++-------------- > 1 file changed, 4 insertions(+), 14 deletions(-) > > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_encoder.c b/drivers/gpu/drm/ti= lcdc/tilcdc_encoder.c > index a34a10337f6a8..546fe7e6ee815 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_encoder.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_encoder.c > @@ -55,15 +55,12 @@ int tilcdc_encoder_create(struct drm_device *ddev) > struct tilcdc_drm_private *priv =3D ddev_to_tilcdc_priv(ddev); > struct tilcdc_encoder *encoder; > struct drm_bridge *bridge; > - struct drm_panel *panel; > - int ret; > > - ret =3D drm_of_find_panel_or_bridge(ddev->dev->of_node, 0, 0, > - &panel, &bridge); > - if (ret =3D=3D -ENODEV) > + bridge =3D devm_drm_of_get_bridge(ddev->dev, ddev->dev->of_node, 0, 0); > + if (PTR_ERR(bridge) =3D=3D -ENODEV) This patch is technically OK in the sense that the code before and after would be equivalent. However if it were me I would not do this change. The reason is that both drm_of_find_panel_or_bridge() and *_of_get_bridge() are problematic when introducing drm_bridge hotplug, which is the long-term goal I am working for, but *_of_get_bridge() is more problematic than drm_of_find_panel_or_bridge(). These functions are still there and not deprecated because there is currently no better replacement (and drm_bridge hotplug is not yet supported because of this and other things still to be done). To have a replacement, the panel_bridge lifetime needs to be reworked first and that's not going to happen overnight. So, all in all, if this patch is not crucial to your series I'd consider dropping it. But if it is important I'm fine with applying it, it won't make a huge difference. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com