[PATCH v3 00/22] drm: convert all bridges to devm_drm_bridge_alloc()

Liu Ying victor.liu at nxp.com
Thu May 22 03:20:17 UTC 2025


On 05/21/2025, Luca Ceresoli wrote:
> Hello Maxime, Shawn, Liu, all,
> 
> On Fri, 09 May 2025 15:53:26 +0200
> Luca Ceresoli <luca.ceresoli at bootlin.com> wrote:
> 
>> devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM
>> bridge, and the only one supported from now on. It is the first milestone
>> towards removal of bridges from a still existing DRM pipeline without
>> use-after-free.
> 
> I applied on drm-misc-next patches 3-17,20-21 as they match all the
> criteria:
>  - At least a Acked-by (or R-by maintainers)
>  - patch is for drm-misc
> 
> Being my very first commits to drm-misc, I tried to be careful, and
> double checked all the patches with Louis (thanks!).
> 
> Here are the pending questions and plan for the remaining patches.
> 
>>       Revert "drm/exynos: mic: convert to devm_drm_bridge_alloc() API"
> 
> This reverts the commit applied my mistake:
> https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/91c5c7b5bb2dd09b43b025bce6d790d3c79f4518
> 
> Neither the  original patch nor the revert has been reviewed/acked.
> 
> As the commit was a mistake, I'm applying the revert by the end of this
> week (i.e. on Friday) unless there are better instructions.
> 
>>       drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API
> 
> This patch affects multiple drivers. Running get_maintainers.pl
> points at Shawn Guo's repository. After reviewing the MAINTAINERS file,
> this looks like due to the 'N:' line in:
> 
> ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
> M:	Shawn Guo <shawnguo at kernel.org>
> M:	Sascha Hauer <s.hauer at pengutronix.de>
> R:	Pengutronix Kernel Team <kernel at pengutronix.de>
> ...
> T:	git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
> N:	imx
> ...
> 
> (https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next/MAINTAINERS?ref_type=heads#L2511-2528)
> 
> Here 'imx' matches the 'drivers/gpu/drm/bridge/imx/imx-legacy-bridge.c'
> file that is touched by the patch. That regexp appears overly generic to me.
> 
> Shawn, can it be fixed by making it less generic?
> 
> If not, can we at least add a band-aid 'X:' entry for
> drivers/gpu/drm/bridge/imx?
> 
> I think the other matching entry is the one to consider:
> 
> DRM DRIVERS FOR FREESCALE IMX BRIDGE
> M:	Liu Ying <victor.liu at nxp.com>
> L:	dri-devel at lists.freedesktop.org
> S:	Maintained
> F:	Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-ldb.yaml
> F:	Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-combiner.yaml
> F:	Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pixel-link.yaml
> F:	Documentation/devicetree/bindings/display/bridge/fsl,imx8qxp-pxl2dpi.yaml
> F:	drivers/gpu/drm/bridge/imx/
> 
> (https://gitlab.freedesktop.org/drm/misc/kernel/-/blob/drm-misc-next/MAINTAINERS?ref_type=heads#L7940-7948)
> 
> However it does not list any trees. I _guess_ drm-misc applies here as
> a fallback as well as common sense.
> 
> Liu, should this entry have a 'T:' line for drm/misc?

These bridge drivers also don't have a 'T:' line:

DRM DRIVER FOR CHIPONE ICN6211 MIPI-DSI to RGB CONVERTER BRIDGE
DRM DRIVER FOR PARADE PS8640 BRIDGE CHIP
DRM DRIVER FOR TI DLPC3433 MIPI DSI TO DMD BRIDGE
DRM DRIVER FOR TI SN65DSI86 BRIDGE CHIP
LONTIUM LT8912B MIPI TO HDMI BRIDGE
MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES
MICROCHIP SAM9x7-COMPATIBLE LVDS CONTROLLER

I think that they fallback to drm-misc since "DRM DRIVERS FOR BRIDGE CHIPS"
covers them.  I don't have strong opinion on adding a "T" line to them, at
least to "DRM DRIVERS FOR FREESCALE IMX BRIDGE".  Anyway, it would be good
to know comments from maintainers for "DRM DRIVERS FOR BRIDGE CHIPS" and
"DRM DRIVERS".

> 
>>       drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API
> 
> Not acked/reviewed, some discussion happened. I am resending it in v4,
> possibly with updates based on the discussion.

I still think the main structures in imx8qxp-pixel-combiner.c and imx*-ldb.c
should have the same lifetime with the allocated bridges.  I added a new
comment on this driver in v2 just now.

> 
> But it has the same issue discussed above, with get_maintiners.pl
> pointing at Shawn Guo's tree, so in the future I'm assuming this goes
> to drm-misc unless there are news about that.
> 
>>       drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API
> 
> No feedback, resending in v4.
> 
>>       drm/todo: add entry to remove devm_drm_put_bridge()
> 
> This involves documentation maintained on another tree. Where should it
> be applied? There are two matching entries in MAINTAINERS:
> 
>  * DRM DRIVERS -> the drm tree
>  * DRM DRIVERS AND MISC GPU PATCHES -> the drm-misc tree
> 
> To me it looks like the second is obviously the closest match as we are
> dealing with DRM bridges, so I'm applying this as well on Friday unless
> there are better instructions.
> 
> Best regards,
> Luca
> 

-- 
Regards,
Liu Ying


More information about the dri-devel mailing list