]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API
authorLuca Ceresoli <luca.ceresoli@bootlin.com>
Fri, 9 May 2025 13:53:44 +0000 (15:53 +0200)
committerLuca Ceresoli <luca.ceresoli@bootlin.com>
Tue, 27 May 2025 09:35:20 +0000 (11:35 +0200)
commit99764593528f9e0ee9509f9e4a4eb21db99d0681
tree950cefc4e5dfafc7786aa1cbdfefac342f782c50
parenta3f7d26dfce9e2d547a58f4941881843a391a6cc
drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

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

Reviewed-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-18-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c