* [PATCH v2 01/37] drm/adp: mipi: Add atomic bridge state handlers
2026-07-07 15:11 [PATCH v2 00/37] drm/bridge: Convert all bridges to atomic Maxime Ripard
@ 2026-07-07 15:11 ` Maxime Ripard
2026-07-08 17:12 ` [PATCH v2 00/37] drm/bridge: Convert all bridges to atomic Luca Ceresoli
2026-07-15 7:50 ` Maxime Ripard
2 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2026-07-07 15:11 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Laurent Pinchart, Jonas Karlman, Jernej Skrabec, Luca Ceresoli,
dri-devel, Maxime Ripard, Joshua Peisach, Sasha Finkelstein,
Janne Grunau, asahi
The mipi bridge doesn't implement any enable or disable callbacks, but
is still missing the atomic state handlers.
In order to remove the legacy bridge callback support from the DRM
bridge core, add them.
Generated by the following Coccinelle script:
@ is_bridge @
identifier funcs;
@@
struct drm_bridge_funcs funcs = {
...,
};
@ has_create_state depends on is_bridge @
identifier funcs, f;
@@
struct drm_bridge_funcs funcs = {
...,
.atomic_create_state = f,
...,
};
@ update_struct depends on (is_bridge && !has_create_state) @
identifier is_bridge.funcs;
identifier f;
@@
struct drm_bridge_funcs funcs = {
+ .atomic_create_state = drm_atomic_helper_bridge_create_state,
+ .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
+ .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
...,
};
@ update_pre_enable_struct depends on (is_bridge && !has_create_state) @
identifier is_bridge.funcs;
identifier f;
@@
struct drm_bridge_funcs funcs = {
...,
- .pre_enable = f,
+ .atomic_pre_enable = f,
...,
};
@ update_pre_enable_impl depends on update_pre_enable_struct @
identifier update_pre_enable_struct.f;
identifier b;
@@
-void f(struct drm_bridge *b)
+void f(struct drm_bridge *b, struct drm_atomic_commit *commit)
{
...
}
@ update_enable_struct depends on (is_bridge && !has_create_state) @
identifier is_bridge.funcs;
identifier f;
@@
struct drm_bridge_funcs funcs = {
...,
- .enable = f,
+ .atomic_enable = f,
...,
};
@ update_enable_impl depends on update_enable_struct @
identifier update_enable_struct.f;
identifier b;
@@
-void f(struct drm_bridge *b)
+void f(struct drm_bridge *b, struct drm_atomic_commit *commit)
{
...
}
@ update_disable_struct depends on (is_bridge && !has_create_state) @
identifier is_bridge.funcs;
identifier f;
@@
struct drm_bridge_funcs funcs = {
...,
- .disable = f,
+ .atomic_disable = f,
...,
};
@ update_disable_impl depends on update_disable_struct @
identifier update_disable_struct.f;
identifier b;
@@
-void f(struct drm_bridge *b)
+void f(struct drm_bridge *b, struct drm_atomic_commit *commit)
{
...
}
@ update_post_disable_struct depends on (is_bridge && !has_create_state) @
identifier is_bridge.funcs;
identifier f;
@@
struct drm_bridge_funcs funcs = {
...,
- .post_disable = f,
+ .atomic_post_disable = f,
...,
};
@ update_post_disable_impl depends on update_post_disable_struct @
identifier update_post_disable_struct.f;
identifier b;
@@
-void f(struct drm_bridge *b)
+void f(struct drm_bridge *b, struct drm_atomic_commit *commit)
{
...
}
Reviewed-by: Joshua Peisach <jpeisach@ubuntu.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
To: Sasha Finkelstein <k@chaosmail.tech>
Cc: Janne Grunau <j@jannau.net>
Cc: dri-devel@lists.freedesktop.org
Cc: asahi@lists.linux.dev
---
drivers/gpu/drm/adp/adp-mipi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/adp/adp-mipi.c b/drivers/gpu/drm/adp/adp-mipi.c
index cba7d32150a9..232bb9539423 100644
--- a/drivers/gpu/drm/adp/adp-mipi.c
+++ b/drivers/gpu/drm/adp/adp-mipi.c
@@ -3,10 +3,11 @@
#include <linux/component.h>
#include <linux/iopoll.h>
#include <linux/of.h>
#include <linux/platform_device.h>
+#include <drm/drm_atomic_state_helper.h>
#include <drm/drm_bridge.h>
#include <drm/drm_mipi_dsi.h>
#define DSI_GEN_HDR 0x6c
#define DSI_GEN_PLD_DATA 0x70
@@ -220,10 +221,13 @@ static int adp_dsi_bridge_attach(struct drm_bridge *bridge,
return drm_bridge_attach(encoder, adp->next_bridge, bridge, flags);
}
static const struct drm_bridge_funcs adp_dsi_bridge_funcs = {
+ .atomic_create_state = drm_atomic_helper_bridge_create_state,
+ .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
+ .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
.attach = adp_dsi_bridge_attach,
};
static int adp_mipi_probe(struct platform_device *pdev)
{
--
2.54.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v2 00/37] drm/bridge: Convert all bridges to atomic
2026-07-07 15:11 [PATCH v2 00/37] drm/bridge: Convert all bridges to atomic Maxime Ripard
2026-07-07 15:11 ` [PATCH v2 01/37] drm/adp: mipi: Add atomic bridge state handlers Maxime Ripard
@ 2026-07-08 17:12 ` Luca Ceresoli
2026-07-15 7:50 ` Maxime Ripard
2 siblings, 0 replies; 4+ messages in thread
From: Luca Ceresoli @ 2026-07-08 17:12 UTC (permalink / raw)
To: Maxime Ripard, Andrzej Hajda, Neil Armstrong, Robert Foss,
Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: Laurent Pinchart, Jonas Karlman, Jernej Skrabec, dri-devel,
Joshua Peisach, Sasha Finkelstein, Janne Grunau, asahi,
Benson Leung, Guenter Roeck, chrome-platform, Francesco Dolcini,
Francesco Dolcini, Laurent Pinchart, Ian Ray,
Peter Senna Tschudin, Martyn Welch, Manikandan Muralidharan,
Dharma Balasubiramani, Russell King, Inki Dae, Seung-Woo Kim,
Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar, linux-arm-kernel,
linux-samsung-soc, Linus Walleij, Chun-Kuang Hu, Philipp Zabel,
Matthias Brugger, AngeloGioacchino Del Regno, linux-mediatek,
Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, freedreno, Tomi Valkeinen,
Alain Volmat, Raphael Gallais-Pou
Il 7 luglio 2026 17:11:07 CEST, Maxime Ripard <mripard@kernel.org> ha scritto:
>Hi,
>
>Over the years, most of the bridges have been converted to atomic
>modesetting and hooks, but not all of them. This forces us to maintain
>two different code path in quite a few places, which is pretty
>bothersome. The switch to atomic modesetting for legacy bridges though
>is pretty trivial, and we don't have a lot of drivers still using the
>legacy path.
>
>This series converts all bridges to atomic modesetting and drops the
>legacy codepaths where relevant.
>
>Let me know what you think,
>Maxime
>
>Signed-off-by: Maxime Ripard <mripard@kernel.org>
I'm out of office so I'm afraid I can only reply from mobile, but I reviewed the series on a real laptop:
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Luca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2 00/37] drm/bridge: Convert all bridges to atomic
2026-07-07 15:11 [PATCH v2 00/37] drm/bridge: Convert all bridges to atomic Maxime Ripard
2026-07-07 15:11 ` [PATCH v2 01/37] drm/adp: mipi: Add atomic bridge state handlers Maxime Ripard
2026-07-08 17:12 ` [PATCH v2 00/37] drm/bridge: Convert all bridges to atomic Luca Ceresoli
@ 2026-07-15 7:50 ` Maxime Ripard
2 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2026-07-15 7:50 UTC (permalink / raw)
To: Andrzej Hajda, Neil Armstrong, Robert Foss, Maarten Lankhorst,
Thomas Zimmermann, David Airlie, Simona Vetter, Maxime Ripard
Cc: Laurent Pinchart, Jonas Karlman, Jernej Skrabec, Luca Ceresoli,
dri-devel, Joshua Peisach, Sasha Finkelstein, Janne Grunau, asahi,
Benson Leung, Guenter Roeck, chrome-platform, Francesco Dolcini,
Francesco Dolcini, Laurent Pinchart, Ian Ray,
Peter Senna Tschudin, Martyn Welch, Manikandan Muralidharan,
Dharma Balasubiramani, Russell King, Inki Dae, Seung-Woo Kim,
Kyungmin Park, Krzysztof Kozlowski, Alim Akhtar, linux-arm-kernel,
linux-samsung-soc, Linus Walleij, Chun-Kuang Hu, Philipp Zabel,
Matthias Brugger, AngeloGioacchino Del Regno, linux-mediatek,
Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, freedreno, Tomi Valkeinen,
Alain Volmat, Raphael Gallais-Pou
On Tue, 07 Jul 2026 17:11:07 +0200, Maxime Ripard wrote:
> Over the years, most of the bridges have been converted to atomic
> modesetting and hooks, but not all of them. This forces us to maintain
> two different code path in quite a few places, which is pretty
> bothersome. The switch to atomic modesetting for legacy bridges though
> is pretty trivial, and we don't have a lot of drivers still using the
> legacy path.
>
> [...]
Applied to misc/kernel.git (drm-misc-next).
Thanks!
Maxime
^ permalink raw reply [flat|nested] 4+ messages in thread