Thread (2 messages) 2 messages, 2 authors, 2025-05-27

Re: [PATCH v3 18/22] drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

From: Liu Ying <victor.liu@nxp.com>
Date: 2025-05-27 01:46:42
Also in: asahi, chrome-platform, dri-devel, imx, linux-amlogic, linux-arm-msm, linux-mediatek, linux-renesas-soc, linux-samsung-soc, lkml, platform-driver-x86

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@bootlin.com>

---

Cc: Liu Ying <victor.liu@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@nxp.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help