[PATCH v3 22/22] drm/todo: add entry to remove devm_drm_put_bridge()

2025-05-09 Thread Luca Ceresoli
devm_drm_put_bridge() is a temporary workaround waiting for the panel bridge lifetime rework. Add a TODO entry to not forget it must be removed after such rework. Suggested-by: Maxime Ripard Signed-off-by: Luca Ceresoli --- To: Jonathan Corbet Cc: linux-...@vger.kernel.org This patch was

[PATCH v3 21/22] drm/bridge: panel: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
ree() the panel_bridge in current code, so update it as well to put the bridge reference instead. This is a temporary solution until the panel lifetime is reworked, which should make this workaround unnecessary, so add a comment to clarify that. Signed-off-by: Luca Ceresoli --- Changes in v3: -

[PATCH v3 20/22] drm/bridge: add devm_drm_put_bridge()

2025-05-09 Thread Luca Ceresoli
afterwards. Signed-off-by: Luca Ceresoli --- Changes in v3: - document this function is a temporary workaround, not to be used (in kerneldoc and commit message) Changes in v2: none --- drivers/gpu/drm/drm_bridge.c | 17 + include/drm/drm_bridge.h | 4 2 files changed, 21

[PATCH v3 19/22] drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
happening after allocation, directly into the private struct data, as they used to. This solution is chosen to minimize the changes in the driver logical code flow. The drawback is we now iterate twice over the endpoints. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/tc358767.c | 56

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

2025-05-09 Thread Luca Ceresoli
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 --- Cc: Liu Ying Changes in v3: - fix NULL pointe

[PATCH v3 17/22] drm: zynqmp_dp: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
drm_bridge_add(). Hence, following carefully the code flow, it is correct to change the allocation function and .funcs assignment in the submodule, while the drm_bridge_add() is not in that submodule. Signed-off-by: Luca Ceresoli --- Cc: Laurent Pinchart Cc: Michal Simek Cc: Tomi Valkeinen Changes in v2

[PATCH v3 13/22] drm/omap: dss: venc: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Switching from a non-devm to a devm allocation allows removing the kfree() in the remove function and in the probe error management code, and as a consequence to simplify the code flow by removing now unnecessary gotos. Signed-off-by: Luca Ceresoli

[PATCH v3 15/22] drm/bridge: stm_lvds: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Philippe Cornu Cc: Raphael Gallais-Pou Cc: Yannick Fertre --- drivers/gpu/drm/stm/lvds.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH v3 16/22] drm/sti: dvo: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
private struct, to make use of the new API with the same code flow. Signed-off-by: Luca Ceresoli --- Cc: Alain Volmat Cc: Raphael Gallais-Pou Changed in v2: - fix typos in commit message --- drivers/gpu/drm/sti/sti_dvo.c | 29 +++-- 1 file changed, 11 insertions

[PATCH v3 11/22] drm/omap: dss: hdmi5: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Switching from a non-devm to a devm allocation allows removing the kfree() in the remove function and in the probe error management code, and as a consequence to simplify the code flow by removing now unnecessary gotos. Signed-off-by: Luca Ceresoli

[PATCH v3 14/22] drm/rcar-du: dsi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Kieran Bingham Cc: Laurent Pinchart Cc: Tomi Valkeinen --- drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 12/22] drm/omap: dss: sdi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Switching from a non-devm to a devm allocation allows removing the kfree() in the remove function and in the probe error management code, and as a consequence to simplify the code flow by removing now unnecessary gotos. Signed-off-by: Luca Ceresoli

[PATCH v3 10/22] drm/omap: dss: hdmi4: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Switching from a non-devm to a devm allocation allows removing the kfree() in the remove function and in the probe error management code, and as a consequence to simplify the code flow by removing now unnecessary gotos. Signed-off-by: Luca Ceresoli

[PATCH v3 04/22] drm/bridge: cdns-dsi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Aradhya Bhatia Cc: Tomi Valkeinen --- drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi

[PATCH v3 06/22] drm/bridge: nxp-ptn3460: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/nxp-ptn3460.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c index

[PATCH v3 09/22] drm/omap: dss: dsi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dsi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index

[PATCH v3 08/22] drm/omap: dss: dpi: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: "Rob Herring (Arm)" Cc: Helge Deller Cc: Kuninori Morimoto Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dpi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/d

[PATCH v3 07/22] drm/bridge: sii902x: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/sii902x.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index

[PATCH v3 05/22] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Ian Ray Cc: Martyn Welch Cc: Peter Senna Tschudin Changed in v3: - updated Ian Ray's e-mail (old one is bouncing Changed in v2: none --- drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c

[PATCH v3 03/22] drm/bridge: anx7625: convert to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: "Rob Herring (Arm)" Cc: Hsin-Te Yuan Cc: Jani Nikula Cc: Pin-yen Lin Cc: Sui Jingfeng Cc: Xin Ji --- drivers/gpu/drm/bridge/analogix/anx7625.c | 7 +++ 1 file changed, 3 insertions(+), 4

[PATCH v3 02/22] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-05-09 Thread Luca Ceresoli
)) + return PTR_ERR(C); ) ... -C->BR.funcs = FUNCS; Reviewed-by: Manikandan Muralidharan # microchip-lvds.c Reviewed-by: Douglas Anderson # parade-ps8640 Tested-by: Douglas Anderson # parade-ps8640 Signed-off-by: Luca Ceresoli --- Cc: Adam Ford Cc: Adrien Grassein Cc: Aleksa

[PATCH v3 01/22] Revert "drm/exynos: mic: convert to devm_drm_bridge_alloc() API"

2025-05-09 Thread Luca Ceresoli
This reverts commit 3be618fab0e31b086cd6456280293119bb20fd41. This patch has been applied by mistake without needed review/ack by maintainers. --- Cc: Louis Chauvet Cc: Alim Akhtar Cc: Inki Dae Cc: Kyungmin Park Cc: Seung-Woo Kim --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 7 --- 1 f

[PATCH v3 00/22] drm: convert all bridges to devm_drm_bridge_alloc()

2025-05-09 Thread Luca Ceresoli
2-0-8f91a404d...@bootlin.com/ Signed-off-by: Luca Ceresoli --- Changes in v3: - Fixed issues reported for some patches - Added review tags - Removed patches that have been applied - Added revert for the exynos patch, applied by mistake - Update cover with grand plan info and trim some of it - Updated bo

Re: [PATCH v2 30/34] drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

2025-05-07 Thread Luca Ceresoli
a49d9@houat/ > > > >> which means > >> the main structures should have the same life time with the DRM bridges. > > > > The word "lifetime" mean two things for bridges: > > > > * the time span during which memory is allocated for a struct > >drm_bridge (along with the embedding struct) > > Note that with your patch set the imx8*-ldb drivers and this bridge driver > won't allocate the DRM bridge along with the embedding struct. By "embedding struct" I mean the struct imx8qxp_pc_channel that embeds the struct drm_bridge. Sorry, I realize my wording was ambiguous. > This makes > me worry, because maybe these drivers are the only "special" ones in this > patch set and I don't want them to be "special" after your patch set is > applied. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 30/34] drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

2025-05-07 Thread Luca Ceresoli
Hello Liu, On Wed, 7 May 2025 10:10:53 +0800 Liu Ying wrote: > On 05/07/2025, Luca Ceresoli wrote: > > Hello Liu, > > Hi Luca, > > > > > thanks for your further feedback. > > > > On Tue, 6 May 2025 10:24:18 +0800 > > Liu Ying wrote

Re: [PATCH v2 30/34] drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

2025-05-06 Thread Luca Ceresoli
Hello Liu, thanks for your further feedback. On Tue, 6 May 2025 10:24:18 +0800 Liu Ying wrote: > On 04/30/2025, Luca Ceresoli wrote: > > Hello Liu, > > Hi Luca, > > > > > On Tue, 29 Apr 2025 10:10:55 +0800 > > Liu Ying wrote: > > > >&g

Re: (subset) [PATCH v2 00/34] drm: convert all bridges to devm_drm_bridge_alloc()

2025-05-05 Thread Luca Ceresoli
be reverted, and then sent again to go through all the review process to be hopefully re-applied in the future. If you agree with keeping it in drm-misc-next, that would be less noise for everybody. I'm going to send v3 very soon, so it would be good to decide what to do before that.

Re: [PATCH v2 34/34] drm/bridge: panel: convert to devm_drm_bridge_alloc() API

2025-05-05 Thread Luca Ceresoli
On Mon, 5 May 2025 08:23:26 +0200 Maxime Ripard wrote: > On Mon, Apr 28, 2025 at 05:25:16PM +0200, Luca Ceresoli wrote: > > Hi Maxime, > > > > On Mon, 28 Apr 2025 13:39:23 +0200 > > Maxime Ripard wrote: > > > > > On Thu, Apr 24, 2025 at 10:05:49PM

Re: (subset) [PATCH v2 00/34] drm: convert all bridges to devm_drm_bridge_alloc()

2025-05-05 Thread Luca Ceresoli
Hi Dmitry, On Mon, 5 May 2025 14:58:58 +0300 Dmitry Baryshkov wrote: > On 05/05/2025 14:06, Luca Ceresoli wrote: > > Inki, Kyungmin, Seung-Woo, Alim, > > > > On Wed, 30 Apr 2025 10:08:14 +0200 > > Maxime Ripard wrote: > > > >> Inki, Kyungmin, Seu

Re: [PATCH v2 01/34] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-04-30 Thread Luca Ceresoli
Hello Doug, On Wed, 30 Apr 2025 08:51:52 -0700 Doug Anderson wrote: > Hi, > > On Wed, Apr 30, 2025 at 3:36 AM Luca Ceresoli > wrote: > > > > Hello Doug, > > > > On Mon, 28 Apr 2025 13:59:50 -0700 > > Doug Anderson wrote: > > > > [..

Re: [PATCH v2 01/34] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-04-30 Thread Luca Ceresoli
v); > > Reviewed-by: Manikandan Muralidharan Thanks for reviewing! In v3 this patch will be slightly different from v2. See the reply I just sent to Doug for the details. If your Reviewed-by tag refers only to the microchip-lvds driver, for which there will be no change in v3, I think it&

Re: [PATCH v2 01/34] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-04-30 Thread Luca Ceresoli
nclude your tags in v3. Let me know if you think I should do differently. Sorry about that. Best regards, Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH v2 30/34] drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

2025-04-30 Thread Luca Ceresoli
Hello Liu, On Tue, 29 Apr 2025 10:10:55 +0800 Liu Ying wrote: > Hi, > > On 04/25/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

Re: [PATCH v2 01/34] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-04-29 Thread Luca Ceresoli
And I see similar > situations where lines are unnecessarily deleted by this patch, so this > applies > to the entire patch. I agree some empty lines removals are not nice in this patch. However I have no idea how to avoid that with spatch, so I'd have to redo [a part of] the chan

Re: [PATCH v2 00/34] drm: convert all bridges to devm_drm_bridge_alloc()

2025-04-28 Thread Luca Ceresoli
Hi Maxime, other DRM maintainers, On Thu, 24 Apr 2025 20:59:07 +0200 Luca Ceresoli wrote: > devm_drm_bridge_alloc() [0] is the new API to allocate and initialize a DRM > bridge, and the only one supported from now on. It is also necessary for > implementing reference counting and thus

Re: [PATCH v2 00/34] drm: convert all bridges to devm_drm_bridge_alloc()

2025-04-28 Thread Luca Ceresoli
Hi Maxime, On Mon, 28 Apr 2025 17:42:46 +0200 Maxime Ripard wrote: > On Mon, Apr 28, 2025 at 05:24:57PM +0200, Luca Ceresoli wrote: > > Hi Maxime, other DRM maintainers, > > > > On Thu, 24 Apr 2025 20:59:07 +0200 > > Luca Ceresoli wrote: > > > > >

Re: [PATCH v2 34/34] drm/bridge: panel: convert to devm_drm_bridge_alloc() API

2025-04-28 Thread Luca Ceresoli
Hi Maxime, On Mon, 28 Apr 2025 13:39:23 +0200 Maxime Ripard wrote: > On Thu, Apr 24, 2025 at 10:05:49PM +0200, Luca Ceresoli wrote: > > This is the new API for allocating DRM bridges. > > > > The devm lifetime management of this driver is peculiar. The underlyi

Re: [PATCH v2 01/34] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-04-28 Thread Luca Ceresoli
Hallo Andy, On Mon, 28 Apr 2025 20:44:03 +0800 (CST) "Andy Yan" wrote: > Hi , > > At 2025-04-25 02:59:08, "Luca Ceresoli" wrote: > >devm_drm_bridge_alloc() is the new API to be used for allocating (and > >partially initializing) a private drive

[PATCH v2 00/34] drm: convert all bridges to devm_drm_bridge_alloc()

2025-04-25 Thread Luca Ceresoli
add get/put to drm_bridge_add/remove() + attach/detech() E. after (B), convert accessors; this is a large work and can be done in chunks Luca [0] https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/0cc6aadd7fc1e629b715ea3d1ba537ef2da95eec Signed-off-by: Luca Ceresoli --- Chang

[PATCH v2 34/34] drm/bridge: panel: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
ree() the panel_bridge in current code, so update it as well to put the bridge reference instead. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/panel.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bri

[PATCH v2 21/34] drm/omap: dss: hdmi4: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Switching from a non-devm to a devm allocation allows removing the kfree() in the remove function and in the probe error management code, and as a consequence to simplify the code flow by removing now unnecessary gotos. Signed-off-by: Luca Ceresoli

[PATCH v2 32/34] drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
happening after allocation, directly into the private struct data, as they used to. This solution is chosen to minimize the changes in the driver logical code flow. The drawback is we now iterate twice over the endpoints. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/tc358767.c | 56

[PATCH v2 33/34] drm/bridge: add devm_drm_put_bridge()

2025-04-24 Thread Luca Ceresoli
implemented by the driver itself and which might be removed at a different time, such as bridge/panel.c. Add devm_drm_put_bridge() to manually release a devm-obtained bridge in such cases. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/drm_bridge.c | 14 ++ include/drm/drm_bridge.h | 4

[PATCH v2 31/34] drm/bridge: imx8*-ldb: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
by devm_drm_bridge_alloc()) * adapt the code wherever using the channels Signed-off-by: Luca Ceresoli --- Cc: Liu Ying --- 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

[PATCH v2 29/34] drm: zynqmp_dp: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
drm_bridge_add(). Hence, following carefully the code flow, it is correct to change the allocation function and .funcs assignment in the submodule, while the drm_bridge_add() is not in that submodule. Signed-off-by: Luca Ceresoli --- Cc: Laurent Pinchart Cc: Michal Simek Cc: Tomi Valkeinen Changes in v2

[PATCH v2 27/34] drm/vc4: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
and get rid of the driver-specific refcounting implementation. Signed-off-by: Luca Ceresoli --- Cc: "Maíra Canal" Cc: Dave Stevenson Cc: Raspberry Pi Kernel Maintenance Changed in v2: - fix error code checking --- drivers/gpu/drm/vc4/vc4_dsi.c | 34 +---

[PATCH v2 26/34] drm/bridge: stm_lvds: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Alexandre Torgue Cc: Maxime Coquelin Cc: Philippe Cornu Cc: Raphael Gallais-Pou Cc: Yannick Fertre --- drivers/gpu/drm/stm/lvds.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git

[PATCH v2 30/34] drm/bridge: imx8qxp-pixel-combiner: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
channels into an array of channel pointers * allocate each channel using devm_drm_bridge_alloc() * adapt the code wherever using the channels Signed-off-by: Luca Ceresoli --- Cc: Liu Ying --- drivers/gpu/drm/bridge/imx/imx8qxp-pixel-combiner.c | 18 -- 1 file changed, 12 insertions

[PATCH v2 28/34] drm/sti: dvo: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
private struct, to make use of the new API with the same code flow. Signed-off-by: Luca Ceresoli --- Cc: Alain Volmat Cc: Raphael Gallais-Pou Changed in v2: - fix typos in commit message --- drivers/gpu/drm/sti/sti_dvo.c | 29 +++-- 1 file changed, 11 insertions

[PATCH v2 25/34] drm/rcar-du: dsi: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Kieran Bingham Cc: Laurent Pinchart Cc: Tomi Valkeinen --- drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v2 24/34] drm/omap: dss: venc: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Switching from a non-devm to a devm allocation allows removing the kfree() in the remove function and in the probe error management code, and as a consequence to simplify the code flow by removing now unnecessary gotos. Signed-off-by: Luca Ceresoli

[PATCH v2 22/34] drm/omap: dss: hdmi5: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Switching from a non-devm to a devm allocation allows removing the kfree() in the remove function and in the probe error management code, and as a consequence to simplify the code flow by removing now unnecessary gotos. Signed-off-by: Luca Ceresoli

[PATCH v2 17/34] drm/msm/dsi: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli --- Cc: Abhinav Kumar Cc: Marijn Suijten Cc: Rob Clark Cc: Sean Paul --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff

[PATCH v2 23/34] drm/omap: dss: sdi: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Switching from a non-devm to a devm allocation allows removing the kfree() in the remove function and in the probe error management code, and as a consequence to simplify the code flow by removing now unnecessary gotos. Signed-off-by: Luca Ceresoli

[PATCH v2 18/34] drm/msm/hdmi: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli --- Cc: Abhinav Kumar Cc: Marijn Suijten Cc: Rob Clark Cc: Sean Paul --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff

[PATCH v2 20/34] drm/omap: dss: dsi: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dsi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index

[PATCH v2 19/34] drm/omap: dss: dpi: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: "Rob Herring (Arm)" Cc: Helge Deller Cc: Kuninori Morimoto Cc: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dpi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/d

[PATCH v2 15/34] drm/mcde: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Linus Walleij --- drivers/gpu/drm/mcde/mcde_dsi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index

[PATCH v2 06/34] drm/bridge: display-connector: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/display-connector.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/display-connector.c b/drivers/gpu/drm

[PATCH v2 16/34] drm/msm/dp: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli --- Cc: Abhinav Kumar Cc: Bjorn Andersson Cc: Marijn Suijten Cc: Rob Clark Cc: Sean Paul --- drivers/gpu/drm/msm/dp/dp_drm.c | 9 + 1 file changed, 5 insertions(+), 4

[PATCH v2 13/34] drm/bridge: ti-sn65dsi86: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Reviewed-by: Herve Codina Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti

[PATCH v2 10/34] drm/bridge: sii902x: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/sii902x.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index

[PATCH v2 14/34] drm/exynos: mic: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Alim Akhtar Cc: Inki Dae Cc: Kyungmin Park Cc: Seung-Woo Kim --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos

[PATCH v2 11/34] drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Cristian Ciocaltea --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge

[PATCH v2 07/34] drm/bridge: lt9611uxc: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm

[PATCH v2 12/34] drm/bridge: tda998x: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli --- Cc: Russell King --- drivers/gpu/drm/bridge/tda998x_drv.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/tda998x_drv.c b/drivers

[PATCH v2 09/34] drm/bridge: nxp-ptn3460: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/bridge/nxp-ptn3460.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c index

[PATCH v2 08/34] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Ian Ray Cc: Martyn Welch Cc: Peter Senna Tschudin --- drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu

[PATCH v2 05/34] drm/bridge: cdns-dsi: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Aradhya Bhatia Cc: Tomi Valkeinen --- drivers/gpu/drm/bridge/cadence/cdns-dsi-core.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-dsi

[PATCH v2 04/34] drm/bridge: anx7625: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: "Rob Herring (Arm)" Cc: Hsin-Te Yuan Cc: Jani Nikula Cc: Pin-yen Lin Cc: Sui Jingfeng Cc: Xin Ji --- drivers/gpu/drm/bridge/analogix/anx7625.c | 7 +++ 1 file changed, 3 insertions(+), 4

[PATCH v2 03/34] drm/bridge: analogix-anx6345: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: "Uwe Kleine-König" Cc: Andy Yan Cc: Dmitry Baryshkov Cc: Jani Nikula Cc: Sui Jingfeng --- drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v2 01/34] drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
-by: Luca Ceresoli --- Cc: Adam Ford Cc: Adrien Grassein Cc: Aleksandr Mishin Cc: Andy Yan Cc: AngeloGioacchino Del Regno Cc: Benson Leung Cc: Biju Das Cc: Christoph Fritz Cc: Cristian Ciocaltea Cc: Detlev Casanova Cc: Dharma Balasubiramani Cc: Guenter Roeck Cc: Heiko Stuebner Cc: J

[PATCH v2 02/34] platform: arm64: acer-aspire1-ec: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Acked-by: Ilpo Järvinen Signed-off-by: Luca Ceresoli --- Cc: "Bryan O'Donoghue" Cc: "Ilpo Järvinen" Cc: Hans de Goede --- drivers/platform/arm64/acer-aspire1-ec.c | 7 +++ 1 file changed, 3 insertions(+), 4 d

Re: [PATCH 34/34] drm/bridge: panel: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
Hi Maxime, On Tue, 8 Apr 2025 17:51:08 +0200 Maxime Ripard wrote: > Hi, > > On Mon, Apr 07, 2025 at 05:27:39PM +0200, Luca Ceresoli wrote: > > This is the new API for allocating DRM bridges. > > > > The devm lifetime management of this driver is peculiar. The un

Re: [PATCH 29/34] drm: zynqmp_dp: convert to devm_drm_bridge_alloc() API

2025-04-24 Thread Luca Ceresoli
Hello Tomi, On Wed, 16 Apr 2025 15:31:41 +0300 Tomi Valkeinen wrote: > Hi, > > On 07/04/2025 17:23, Luca Ceresoli wrote: > > This is the new API for allocating DRM bridges. > > > > This driver has a peculiar structure. zynqmp_dpsub.c is the actual driver, > &g

Re: [PATCH v7 2/2] drm/tests: bridge: add a KUnit test for devm_drm_bridge_alloc()

2025-04-15 Thread Luca Ceresoli
Hi Maxime, thanks for the careful review. On Mon, 14 Apr 2025 17:49:16 +0200 Maxime Ripard wrote: > Hi, > > On Wed, Apr 09, 2025 at 04:50:35PM +0200, Luca Ceresoli wrote: > > Add a basic KUnit test for the newly introduced drm_bridge_alloc(). > > > > S

Re: [PATCH v7 1/2] drm/bridge: documentat bridge allocation and lifecycle

2025-04-15 Thread Luca Ceresoli
On Mon, 14 Apr 2025 17:40:46 +0200 Maxime Ripard wrote: > Hi, > > On Wed, Apr 09, 2025 at 04:50:34PM +0200, Luca Ceresoli wrote: > > Document in detail the DRM bridge allocation and refcounting process based > > on the recently introduced devm_drm_bridge_alloc(). > &g

[PATCH v3 1/3] dt-bindings: display: simple: Add Tianma P0700WXF1MBAA panel

2025-04-11 Thread Luca Ceresoli
Add the Tianma Micro-electronics P0700WXF1MBAA 7.0" LVDS LCD TFT panel. Acked-by: Conor Dooley Signed-off-by: Luca Ceresoli --- Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/di

[PATCH v3 0/3] drm/panel: simple: add Tianma P0700WXF1MBAA and improve Tianma TM070JDHG34-00

2025-04-11 Thread Luca Ceresoli
This short series adds power on/off timings to the Tianma TM070JDHG34-00 panel and adds support for the the Tianma P0700WXF1MBAA panel. Signed-off-by: Luca Ceresoli --- Changes in v3: - add Fixes: and Cc: - remove regulator delay - add R-by tag by Dmitry - Link to v2: https://lore.kernel.org/r

[PATCH v3 3/3] drm/panel: simple: add Tianma P0700WXF1MBAA panel

2025-04-11 Thread Luca Ceresoli
that. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/panel/panel-simple.c | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c

[PATCH v3 2/3] drm/panel: simple: Tianma TM070JDHG34-00: add delays

2025-04-11 Thread Luca Ceresoli
Add power on/off delays for the Tianma TM070JDHG34-00. Fixes: bf6daaa281f7 ("drm/panel: simple: Add Tianma TM070JDHG34-00 panel support") Cc: sta...@vger.kernel.org Signed-off-by: Luca Ceresoli --- Changed in v3: - add Fixes: and Cc: - remove regulator delay --- drivers/gpu/drm/p

[PATCH v7 2/2] drm/tests: bridge: add a KUnit test for devm_drm_bridge_alloc()

2025-04-10 Thread Luca Ceresoli
Add a basic KUnit test for the newly introduced drm_bridge_alloc(). Signed-off-by: Luca Ceresoli --- Changed in v7: - rebase on current drm-misc-next, which now has a drm_bridge_test.c file - cleanup commit message Changed in v6: - update to new devm_drm_bridge_alloc() API - remove

Re: [PATCH v2 2/3] drm/panel: simple: Tianma TM070JDHG34-00: add delays

2025-04-10 Thread Luca Ceresoli
Hi Dmitry, Thanks for reviewing. On Tue, 8 Apr 2025 15:52:19 +0300 Dmitry Baryshkov wrote: > On Mon, Apr 07, 2025 at 06:34:00PM +0200, Luca Ceresoli wrote: > > Add power on/off delays for the Tianma TM070JDHG34-00. > > > > Signed-off-by: Luca Ceresoli > > --- >

[PATCH 22/34] drm/omap: dss: hdmi5: convert to devm_drm_bridge_alloc() API

2025-04-10 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Switching from a non-devm to a devm allocation allows removing the kfree() in the remove function and in the probe error management code, and as a consequence to simplify the code flow by removing now unnecessary gotos. Signed-off-by: Luca Ceresoli

[PATCH 04/34] drm/bridge: anx7625: convert to devm_drm_bridge_alloc() API

2025-04-10 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: "Rob Herring (Arm)" Cc: Hsin-Te Yuan Cc: Jani Nikula Cc: Pin-yen Lin Cc: Sui Jingfeng Cc: Xin Ji --- drivers/gpu/drm/bridge/analogix/anx7625.c | 7 +++ 1 file changed, 3 insertions(+), 4

[PATCH v7 1/2] drm/bridge: documentat bridge allocation and lifecycle

2025-04-09 Thread Luca Ceresoli
Document in detail the DRM bridge allocation and refcounting process based on the recently introduced devm_drm_bridge_alloc(). Signed-off-by: Luca Ceresoli --- Changes in v7: - remove mention of "legacy mode", we now support only refcounted bridges - rename patch title from &

[PATCH v7 0/2] drm/bridge: add docs and kunit test for devm_drm_bridge_alloc()

2025-04-09 Thread Luca Ceresoli
-alloc-api-v1-0-42113ff8d...@bootlin.com/ Signed-off-by: Luca Ceresoli --- Luca Ceresoli (2): drm/bridge: documentat bridge allocation and lifecycle drm/tests: bridge: add a KUnit test for devm_drm_bridge_alloc() Documentation/gpu/drm-kms-helpers.rst | 6 +++ drivers/gpu/drm

[PATCH 08/34] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: convert to devm_drm_bridge_alloc() API

2025-04-09 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Ian Ray Cc: Martyn Welch Cc: Peter Senna Tschudin --- drivers/gpu/drm/bridge/megachips-stdp-ge-b850v3-fw.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu

[PATCH 27/34] drm/vc4: convert to devm_drm_bridge_alloc() API

2025-04-07 Thread Luca Ceresoli
and get rid of the driver-specific refcounting implementation. Signed-off-by: Luca Ceresoli --- Cc: "Maíra Canal" Cc: Dave Stevenson Cc: Raspberry Pi Kernel Maintenance --- drivers/gpu/drm/vc4/vc4_dsi.c | 30 +++--- 1 file changed, 3 insertions(+), 27

[PATCH 00/34] drm: convert all bridges to devm_drm_bridge_alloc()

2025-04-07 Thread Luca Ceresoli
d/remove() + attach/detech() E. after (B), convert accessors; this is a large work and can be done in chunks Luca Signed-off-by: Luca Ceresoli --- Luca Ceresoli (34): drm: convert many bridge drivers from devm_kzalloc() to devm_drm_bridge_alloc() API platform: arm64: acer-as

Re: [PATCH 02/34] platform: arm64: acer-aspire1-ec: convert to devm_drm_bridge_alloc() API

2025-04-07 Thread Luca Ceresoli
Hello Ilpo, On Mon, 7 Apr 2025 19:46:59 +0300 (EEST) Ilpo Järvinen wrote: > On Mon, 7 Apr 2025, Luca Ceresoli wrote: > > > This is the new API for allocating DRM bridges. > > > > Signed-off-by: Luca Ceresoli > > > > --- > > > > Cc: "Bry

[PATCH v2 0/3] drm/panel: simple: add Tianma P0700WXF1MBAA and improve Tianma TM070JDHG34-00

2025-04-07 Thread Luca Ceresoli
This short series adds power on/off timings to the Tianma TM070JDHG34-00 panel and adds support for the the Tianma P0700WXF1MBAA panel. Signed-off-by: Luca Ceresoli --- Changes in v2: - Rebased on current drm-misc-next - Added Conor's R-by on the bindings - Link to v1: https://lore.kernel.

[PATCH 16/34] drm/msm/dp: convert to devm_drm_bridge_alloc() API

2025-04-07 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Abhinav Kumar Cc: Bjorn Andersson Cc: Marijn Suijten Cc: Rob Clark Cc: Sean Paul --- drivers/gpu/drm/msm/dp/dp_drm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH v2 1/3] dt-bindings: display: simple: Add Tianma P0700WXF1MBAA panel

2025-04-07 Thread Luca Ceresoli
Add the Tianma Micro-electronics P0700WXF1MBAA 7.0" LVDS LCD TFT panel. Acked-by: Conor Dooley Signed-off-by: Luca Ceresoli --- Documentation/devicetree/bindings/display/panel/panel-simple.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/di

[PATCH v2 3/3] drm/panel: simple: add Tianma P0700WXF1MBAA panel

2025-04-07 Thread Luca Ceresoli
that. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/panel/panel-simple.c | 33 + 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c

[PATCH v2 2/3] drm/panel: simple: Tianma TM070JDHG34-00: add delays

2025-04-07 Thread Luca Ceresoli
Add power on/off delays for the Tianma TM070JDHG34-00. Signed-off-by: Luca Ceresoli --- drivers/gpu/drm/panel/panel-simple.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index

[PATCH 33/34] drm/bridge: add devm_drm_put_bridge()

2025-04-07 Thread Luca Ceresoli
implemented by the driver itself and which might be removed at a different time, such as bridge/panel.c. Add devm_drm_put_bridge() to manually release a devm-obtained bridge in such cases. Signed-off-by: Luca Ceresoli --- To: Maarten Lankhorst To: Maxime Ripard To: Thomas Zimmermann To: David Airlie

[PATCH 34/34] drm/bridge: panel: convert to devm_drm_bridge_alloc() API

2025-04-07 Thread Luca Ceresoli
ree() the panel_bridge in current code, so update it as well to put the bridge reference instead. Signed-off-by: Luca Ceresoli --- To: Maarten Lankhorst To: Maxime Ripard To: Thomas Zimmermann To: David Airlie To: Simona Vetter To: Andrzej Hajda To: Neil Armstrong To: Robert Foss To: Laur

[PATCH 32/34] drm/bridge: tc358767: convert to devm_drm_bridge_alloc() API

2025-04-07 Thread Luca Ceresoli
happening after allocation, directly into the private struct data, as they used to. This solution is chosen to minimize the changes in the driver logical code flow. The drawback is we now iterate twice over the endpoints. Signed-off-by: Luca Ceresoli --- To: Maarten Lankhorst To: Maxime Ripard To

[PATCH 11/34] drm/bridge: dw-hdmi: convert to devm_drm_bridge_alloc() API

2025-04-07 Thread Luca Ceresoli
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli --- Cc: Cristian Ciocaltea --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge

  1   2   3   4   5   6   >