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.ceres...@bootlin.com>
> 
> ---
> 
> Cc: Liu Ying <victor....@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....@nxp.com>

Reply via email to