All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Luca Ceresoli" <luca.ceresoli@bootlin.com>
To: "Luca Ceresoli" <luca.ceresoli@bootlin.com>,
	"Arnd Bergmann" <arnd@kernel.org>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"Sasha Finkelstein" <k@chaosmail.tech>,
	"Janne Grunau" <j@jannau.net>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Manikandan Muralidharan" <manikandan.m@microchip.com>,
	"Dharma Balasubiramani" <dharma.b@microchip.com>,
	"Nicolas Ferre" <nicolas.ferre@microchip.com>,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
	"Jagan Teki" <jagan@amarulasolutions.com>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Robert Foss" <rfoss@kernel.org>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Liu Ying" <victor.liu@nxp.com>, "Frank Li" <Frank.Li@nxp.com>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Pengutronix Kernel Team" <kernel@pengutronix.de>,
	"Fabio Estevam" <festevam@gmail.com>,
	"Douglas Anderson" <dianders@chromium.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Chun-Kuang Hu" <chunkuang.hu@kernel.org>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Rob Clark" <robin.clark@oss.qualcomm.com>,
	"Dmitry Baryshkov" <lumag@kernel.org>,
	"Abhinav Kumar" <abhinav.kumar@linux.dev>,
	"Jessica Zhang" <jesszhan0024@gmail.com>,
	"Sean Paul" <sean@poorly.run>,
	"Marijn Suijten" <marijn.suijten@somainline.org>,
	"Marek Vasut" <marex@denx.de>, "Stefan Agner" <stefan@agner.ch>,
	"Orson Zhai" <orsonzhai@gmail.com>,
	"Baolin Wang" <baolin.wang@linux.alibaba.com>,
	"Chunyan Zhang" <zhang.lyra@gmail.com>,
	"Jyri Sarha" <jyri.sarha@iki.fi>,
	"Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
	"Icenowy Zheng" <zhengxingda@iscas.ac.cn>,
	<dri-devel@lists.freedesktop.org>, <asahi@lists.linux.dev>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <imx@lists.linux.dev>,
	<linux-mediatek@lists.infradead.org>,
	<linux-arm-msm@vger.kernel.org>,
	<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH] drm/bridge: add missing drm/drm_panel.h inclusions
Date: Tue, 29 Sep 2026 12:39:09 +0200	[thread overview]
Message-ID: <DLRQHX9JC9YJ.1HR59B2KFZ90L@bootlin.com> (raw)
In-Reply-To: <DLRMF4TI56I2.3PTB24KN9ORJ3@bootlin.com>

Hello,

On Tue Sep 29, 2026 at 9:27 AM CEST, Luca Ceresoli wrote:
> Hello Arnd,
>
> On Mon Sep 28, 2026 at 6:04 PM CEST, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> The devm_drm_of_get_bridge() declaration moved to drm_panel.h, but
>> not all callers include this, which leads to build failures in
>> some configurations:
>>
>> drivers/gpu/drm/imx/lcdc/imx-lcdc.c: In function 'imx_lcdc_probe':
>> drivers/gpu/drm/imx/lcdc/imx-lcdc.c:404:18: error: implicit declaration of function 'devm_drm_of_get_bridge' [-Wimplicit-function-declaration]
>>   404 |         bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0);
>>       |                  ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/verisilicon/vs_bridge.c: In function 'vs_bridge_init':
>> drivers/gpu/drm/verisilicon/vs_bridge.c:306:16: error: implicit declaration of function 'devm_drm_of_get_bridge' [-Wimplicit-function-declaration]
>>   306 |         next = devm_drm_of_get_bridge(drm_dev->dev, drm_dev->dev->of_node,
>>       |                ^~~~~~~~~~~~~~~~~~~~~~
>>
>> Include the new header in all files that need it.
>>
>> Fixes: aa8a8c7e4641 ("drm/bridge: panel: move all code to drm_panel.c")
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Thanks for the very quick reaction to this regression! However I think we
> should fix it differently.
>
> I had definitely build-tested most if not all these drivers, and also
> runtime tested a few. Now I realized the build failure actually happens
> only in !OF defconfigs which I haven't build-tested (sorry about
> that!). Here's why:
>
>  * the affected drivers (all or most of them) include drm_of.h
>  * drm_of.h does:
>      #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DRM_PANEL_BRIDGE)
>      #include <linux/of.h>
>      #include <drm/drm_bridge.h>
>      #include <drm/drm_panel.h>
>      #endif
>  * DRM_PANEL_BRIDGE is always set when DRM is set, so not a problem
>  * drivers which don't depend on OF and don't include drm_panel.h now fail
>
> Most of the drivers changed by this patch do 'depend on OF', so they are
> not affected. So the patch could be trimmed significantly. But still I'm
> not in favor of including drm_panel.h in the remaining drivers, because:
>
>  * in the first place most/all of these drivers are now supposed to not use
>    the drm_panel API anymore; thsy should just use the drm_bridge API
>
>  * devm_drm_of_get_bridge() is now a deprecated [0], complicated way of
>    calling of_drm_get_bridge_by_endpoint(), which is rightfully in
>    drm_bridge.h
>    * for this reason Documentation/drm/todo.rst says it must be removed [1]
>    * removal is easy, so I plan to do it in a few weeks globally
>    * after the removal all these #include <drm_panel.h> would have to
>      be removed, but some might easily be forgotten
>
> So I see two option for a better fix:
>
>  * Option 1 -- fix the really affected drivers by switching from the
>    deprecated API to the one they recommended one. Based on quick analysis
>    there are about 6.
>
>  * Option 2 -- a quick surgical fix:
>
>    In drm_of.h:
>
>      #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DRM_PANEL_BRIDGE)
>       #include <linux/of.h>
>       #include <drm/drm_bridge.h>
>      -#include <drm/drm_panel.h>
>       #endif
>      +#include <drm/drm_panel.h> /* Temporary for *_of_get_bridge() */
>
>    This can easily be tracked and reverted once all
>    devm_drm_of_get_bridge() users are converted to
>    of_drm_get_bridge_by_endpoint().
>
> I'm working right now on option 1, hoping to get a series in a few hours
> from now. I can switch to option 2 in case of unexpected issues with option
> 1, or if a fix "really right now" is wanted.

Done [0]. I found only 3 drivers affected, but I fixed all the others that
build without OF.

[0] https://lore.kernel.org/r/20260929-drm-fix-of_get_bridge-build-regression-v1-0-ccb7e602daad@bootlin.com

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


  reply	other threads:[~2026-09-29 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-28 16:04 [PATCH] drm/bridge: add missing drm/drm_panel.h inclusions Arnd Bergmann
2026-09-28 16:31 ` sashiko-bot
2026-09-28 22:20 ` Doug Anderson
2026-09-29  7:27 ` Luca Ceresoli
2026-09-29 10:39   ` Luca Ceresoli [this message]
2026-09-29 11:26   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DLRQHX9JC9YJ.1HR59B2KFZ90L@bootlin.com \
    --to=luca.ceresoli@bootlin.com \
    --cc=Frank.Li@nxp.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=abhinav.kumar@linux.dev \
    --cc=airlied@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=andrzej.hajda@intel.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=asahi@lists.linux.dev \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=chunkuang.hu@kernel.org \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=dharma.b@microchip.com \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=festevam@gmail.com \
    --cc=freedreno@lists.freedesktop.org \
    --cc=imx@lists.linux.dev \
    --cc=j@jannau.net \
    --cc=jagan@amarulasolutions.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jesszhan0024@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=jyri.sarha@iki.fi \
    --cc=k@chaosmail.tech \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=manikandan.m@microchip.com \
    --cc=marex@denx.de \
    --cc=marijn.suijten@somainline.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=orsonzhai@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=rfoss@kernel.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=s.hauer@pengutronix.de \
    --cc=sean@poorly.run \
    --cc=simona@ffwll.ch \
    --cc=stefan@agner.ch \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    --cc=victor.liu@nxp.com \
    --cc=zhang.lyra@gmail.com \
    --cc=zhengxingda@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.