On 04/25/2025, Luca Ceresoli wrote: > This is the new API for allocating DRM bridges. > > These two drivers are tangled together by the ldb_add_bridge_helper(), so > they are converted at once. > > They also have a similar design, each embedding an array of channels in > their 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 ldb_add_bridge_helper() to not set the funcs pointer > (now done by devm_drm_bridge_alloc()) > * adapt the code wherever using the channels > > Signed-off-by: Luca Ceresoli <luca.ceres...@bootlin.com> > > --- > > Cc: Liu Ying <victor....@nxp.com> > --- > drivers/gpu/drm/bridge/imx/imx-ldb-helper.c | 4 +--- > drivers/gpu/drm/bridge/imx/imx-ldb-helper.h | 3 +-- > drivers/gpu/drm/bridge/imx/imx8qm-ldb.c | 32 > ++++++++++++++++++----------- > drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c | 20 ++++++++++++------ > 4 files changed, 36 insertions(+), 23 deletions(-)
Acked-by: Liu Ying <victor....@nxp.com>