[PATCH v3 18/22] drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API
Liu Ying
victor.liu at nxp.com
Tue May 27 01:48:05 UTC 2025
On 05/09/2025, Luca Ceresoli wrote:
> This is the new API for allocating DRM bridges.
>
> This driver embeds an array of channels in the main struct, and each
> channel embeds a drm_bridge. This prevents dynamic, refcount-based
> deallocation of the bridges.
>
> To make the new, dynamic bridge allocation possible:
>
> * change the array of channels into an array of channel pointers
> * allocate each channel using devm_drm_bridge_alloc()
> * adapt the code wherever using the channels
> * remove the is_available flag, now "ch != NULL" is equivalent
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
>
> ---
>
> Cc: Liu Ying <victor.liu at nxp.com>
>
> Changes in v3:
> - fix NULL pointer deref in .remove and remove is_available bool
>
> Changes in v2: none
> ---
> .../gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 27 +++++++++++-----------
> 1 file changed, 14 insertions(+), 13 deletions(-)
Reviewed-by: Liu Ying <victor.liu at nxp.com>
More information about the dri-devel
mailing list