* [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
@ 2026-10-30 15:13 Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 18/37] drm/sun4i: Switch to drm_atomic_helper_connector_create_state Maxime Ripard
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:13 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Christian König, Alex Deucher,
amd-gfx, Russell King, Alim Akhtar, Inki Dae, Krzysztof Kozlowski,
Kyungmin Park, Peter Griffin, Seung-Woo Kim, linux-samsung-soc,
Alison Wang, Stefan Agner, Huacai Chen, Icenowy Zheng, Jianmin Lv,
Mingcong Bai, Qianhai Wu, Xi Ruoyao, Geert Uytterhoeven,
linux-renesas-soc, Marcus Folkesson, Alain Volmat,
Raphael Gallais-Pou, Chen-Yu Tsai, Samuel Holland, linux-sunxi,
Jonathan Hunter, Mikko Perttunen, Thierry Reding, linux-tegra,
Alexey Brodkin, Alex Lanzano, Chia-I Wu, David Airlie,
Dmitry Osipenko, Gerd Hoffmann, Gurchetan Singh, virtualization,
Haneen Mohammed, Louis Chauvet, Melissa Wen,
Oleksandr Andrushchenko, Jerome Brunet, Kevin Hilman,
Martin Blumenstingl, linux-amlogic, Harry Wentland, Leo Li,
Rodrigo Siqueira, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, intel-gfx, intel-xe, Danilo Krummrich, Lyude Paul,
nouveau
This is a follow-up to the plane and CRTC reset removal series, and
part of a larger effort to remove the reset hook from all KMS objects.
The connector reset hook is overloaded: it is called both at probe
time to create the initial software state and during suspend/resume to
reset hardware and software state. These two roles have different
requirements, and the reset hook is not fallible, making error
handling difficult for the initial state allocation path.
While reset has the semantics to reset both the software and hardware
state, the vast majority of implementations and all the helpers only
reset the software state, making them equivalent to
atomic_create_state in practice. The atomic_create_state hook makes
this explicit: it only allocates and initializes a pristine state
without any side effect, and returns the state pointer or an ERR_PTR
on failure.
This series converts all connector drivers tree-wide from the reset hook
to atomic_create_state, then removes the reset hook from struct
drm_connector_funcs entirely. The conversions were done using a
combination of Coccinelle semantic patches, mechanical one-line
replacements and manual adjustments.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Changes in v3:
- Fix error path in dw-hdmi
- Fix test error path for amdgpu kunit tests
- Fix nouveau legacy path
- Link to v2: https://lore.kernel.org/r/20261022-drm-no-more-connector-reset-v2-0-0b7e4e85b1e8@kernel.org
Changes in v2:
- Change the parameter order of __drm_atomic_helper_connector_hdmi_state_init
- Fixed state argument casing for drm_atomic_helper_connector_tv_margins_state_init
and drm_atomic_helper_connector_tv_state_init
- Put atomic_create_state before atomic_duplicate_state
- Fix state allocation for MST and WB connectors
- Link to v1:
https://lore.kernel.org/r/20261014-drm-no-more-connector-reset-v1-0-586c9c026823@kernel.org
---
Maxime Ripard (37):
drm/amdgpu: vkms: Switch to drm_atomic_helper_connector_create_state
drm/bridge: analogix-anx6345: Switch to drm_atomic_helper_connector_create_state
drm/bridge: analogix-anx78xx: Switch to drm_atomic_helper_connector_create_state
drm/bridge: chrontel-ch7033: Switch to drm_atomic_helper_connector_create_state
drm/bridge: nxp-ptn3460: Switch to drm_atomic_helper_connector_create_state
drm/panel: Switch to drm_atomic_helper_connector_create_state
drm/bridge: synopsys: dw-hdmi: Switch to drm_atomic_helper_connector_create_state
drm/bridge: tc358767: Switch to drm_atomic_helper_connector_create_state
drm/bridge: tda998x: Switch to drm_atomic_helper_connector_create_state
drm/bridge: ti-tfp410: Switch to drm_atomic_helper_connector_create_state
drm/exynos: Switch to drm_atomic_helper_connector_create_state
drm/fsl-dcu: Switch to drm_atomic_helper_connector_create_state
drm/loongson: Switch to drm_atomic_helper_connector_create_state
drm/mipi-dbi: Switch to drm_atomic_helper_connector_create_state
drm/renesas: shmobile: Switch to drm_atomic_helper_connector_create_state
drm/sitronix: st7571: Switch to drm_atomic_helper_connector_create_state
drm/sti: Switch to drm_atomic_helper_connector_create_state
drm/sun4i: Switch to drm_atomic_helper_connector_create_state
drm/tegra: Switch to drm_atomic_helper_connector_create_state
drm/tests: Switch to drm_atomic_helper_connector_create_state
drm/tiny: arcpgu: Switch to drm_atomic_helper_connector_create_state
drm/tiny: sharp: Switch to drm_atomic_helper_connector_create_state
drm/virtio: Switch to drm_atomic_helper_connector_create_state
drm/vkms: Switch to drm_atomic_helper_connector_create_state
drm/xen: Switch to drm_atomic_helper_connector_create_state
drm/bridge: synopsys: dw-hdmi: Convert to atomic_create_state
drm/meson: Convert to atomic_create_state
drm/sun4i: hdmi: Convert to atomic_create_state
drm/sun4i: tv: Convert to atomic_create_state
drm/tests: hdmi: Convert to atomic_create_state
drm/connector: Remove drm_atomic_helper_connector_reset()
drm/amdgpu: dm: Convert to atomic_create_state
drm/i915: Convert to atomic_create_state
drm/nouveau: Convert to atomic_create_state
drm/tegra: Convert to atomic_create_state
drm/connector: Remove __drm_atomic_helper_connector_reset()
drm/connector: Remove reset
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 +-
.../amd/display/amdgpu_dm/amdgpu_dm_connector.c | 32 ++---
.../amd/display/amdgpu_dm/amdgpu_dm_connector.h | 3 +-
.../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 11 +-
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 17 ++-
.../amdgpu_dm/tests/amdgpu_dm_connector_test.c | 102 +++++++++++-----
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 2 +-
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 2 +-
drivers/gpu/drm/bridge/chrontel-ch7033.c | 2 +-
drivers/gpu/drm/bridge/nxp-ptn3460.c | 2 +-
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 14 ++-
drivers/gpu/drm/bridge/tc358767.c | 2 +-
drivers/gpu/drm/bridge/tda998x_drv.c | 2 +-
drivers/gpu/drm/bridge/ti-tfp410.c | 2 +-
drivers/gpu/drm/display/drm_hdmi_state_helper.c | 3 +-
drivers/gpu/drm/drm_atomic_state_helper.c | 43 -------
drivers/gpu/drm/drm_connector.c | 8 --
drivers/gpu/drm/drm_mode_config.c | 4 +-
drivers/gpu/drm/drm_panel.c | 4 +-
drivers/gpu/drm/exynos/exynos_drm_dpi.c | 2 +-
drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 +-
drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 2 +-
drivers/gpu/drm/i915/display/intel_connector.c | 6 +-
drivers/gpu/drm/i915/display/intel_sdvo.c | 6 +-
drivers/gpu/drm/loongson/lsdc_output_7a1000.c | 2 +-
drivers/gpu/drm/loongson/lsdc_output_7a2000.c | 4 +-
drivers/gpu/drm/meson/meson_encoder_hdmi.c | 12 +-
drivers/gpu/drm/nouveau/dispnv50/disp.c | 25 ++--
drivers/gpu/drm/nouveau/nouveau_connector.c | 129 ++++++++++++++++-----
drivers/gpu/drm/nouveau/nouveau_connector.h | 3 +-
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 2 +-
drivers/gpu/drm/sitronix/st7571.c | 2 +-
drivers/gpu/drm/sti/sti_dvo.c | 2 +-
drivers/gpu/drm/sti/sti_hda.c | 2 +-
drivers/gpu/drm/sti/sti_hdmi.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 16 ++-
drivers/gpu/drm/sun4i/sun4i_lvds.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_tv.c | 16 ++-
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 2 +-
drivers/gpu/drm/tegra/dsi.c | 17 ++-
drivers/gpu/drm/tegra/hdmi.c | 2 +-
drivers/gpu/drm/tegra/sor.c | 13 +--
drivers/gpu/drm/tests/drm_atomic_commit_test.c | 2 +-
drivers/gpu/drm/tests/drm_atomic_test.c | 2 +-
drivers/gpu/drm/tests/drm_connector_test.c | 4 +-
drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 16 ++-
drivers/gpu/drm/tests/drm_probe_helper_test.c | 2 +-
drivers/gpu/drm/tiny/arcpgu.c | 2 +-
drivers/gpu/drm/tiny/sharp-memory.c | 2 +-
drivers/gpu/drm/virtio/virtgpu_display.c | 2 +-
drivers/gpu/drm/vkms/vkms_connector.c | 2 +-
drivers/gpu/drm/vkms/vkms_writeback.c | 2 +-
drivers/gpu/drm/xen/xen_drm_front_conn.c | 2 +-
include/drm/drm_atomic_state_helper.h | 3 -
include/drm/drm_connector.h | 12 --
include/drm/drm_mipi_dbi.h | 2 +-
58 files changed, 351 insertions(+), 236 deletions(-)
---
base-commit: 91f52e99824b0beebb48cad51bbda81437af8664
change-id: 20260709-drm-no-more-connector-reset-45ee14d7c62c
Best regards,
--
Maxime Ripard <mripard@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 18/37] drm/sun4i: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
@ 2026-10-30 15:13 ` Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 28/37] drm/sun4i: hdmi: Convert to atomic_create_state Maxime Ripard
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:13 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Chen-Yu Tsai, Samuel Holland,
linux-sunxi
The sun4i connector implementation uses the deprecated
drm_atomic_helper_connector_reset() as its reset hook.
Switch to drm_atomic_helper_connector_create_state() instead.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Chen-Yu Tsai <wens@kernel.org>
Cc: Samuel Holland <samuel@sholland.org>
Cc: linux-sunxi@lists.linux.dev
---
drivers/gpu/drm/sun4i/sun4i_lvds.c | 2 +-
drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +-
drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_lvds.c b/drivers/gpu/drm/sun4i/sun4i_lvds.c
index 6b98d20a8890..f3f035c9260f 100644
--- a/drivers/gpu/drm/sun4i/sun4i_lvds.c
+++ b/drivers/gpu/drm/sun4i/sun4i_lvds.c
@@ -66,5 +66,5 @@ static const struct drm_connector_funcs sun4i_lvds_con_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = sun4i_lvds_connector_destroy,
- .reset = drm_atomic_helper_connector_reset,
+ .atomic_create_state = drm_atomic_helper_connector_create_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c
index 3da9a9283c6e..c930dd899875 100644
--- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
@@ -157,5 +157,5 @@ static const struct drm_connector_funcs sun4i_rgb_con_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = sun4i_rgb_connector_destroy,
- .reset = drm_atomic_helper_connector_reset,
+ .atomic_create_state = drm_atomic_helper_connector_create_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
index d504ae583294..1b7ae9b327c1 100644
--- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
+++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c
@@ -838,5 +838,5 @@ static const struct drm_connector_funcs sun6i_dsi_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
- .reset = drm_atomic_helper_connector_reset,
+ .atomic_create_state = drm_atomic_helper_connector_create_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 28/37] drm/sun4i: hdmi: Convert to atomic_create_state
2026-10-30 15:13 [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 18/37] drm/sun4i: Switch to drm_atomic_helper_connector_create_state Maxime Ripard
@ 2026-10-30 15:13 ` Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 29/37] drm/sun4i: tv: " Maxime Ripard
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:13 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Chen-Yu Tsai, Samuel Holland,
linux-sunxi
The sun4i HDMI connector reset implementation creates a pristine
state and initializes the HDMI state. It does not perform any
hardware reset.
Since this is equivalent to what atomic_create_state expects, convert
the reset function to an atomic_create_state hook that returns the
initialized state.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Chen-Yu Tsai <wens@kernel.org>
Cc: Samuel Holland <samuel@sholland.org>
Cc: linux-sunxi@lists.linux.dev
---
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
index 3084f6570c29..58626d0562ae 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
@@ -291,9 +291,17 @@ sun4i_hdmi_connector_detect(struct drm_connector *connector, bool force)
}
-static void sun4i_hdmi_connector_reset(struct drm_connector *connector)
+static struct drm_connector_state *
+sun4i_hdmi_connector_create_state(struct drm_connector *connector)
{
- drm_atomic_helper_connector_reset(connector);
- __drm_atomic_helper_connector_hdmi_state_init(connector->state,
+ struct drm_connector_state *connector_state;
+
+ connector_state = drm_atomic_helper_connector_create_state(connector);
+ if (IS_ERR(connector_state))
+ return connector_state;
+
+ __drm_atomic_helper_connector_hdmi_state_init(connector_state,
connector);
+
+ return connector_state;
}
@@ -302,5 +310,5 @@ static const struct drm_connector_funcs sun4i_hdmi_connector_funcs = {
.detect = sun4i_hdmi_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
- .reset = sun4i_hdmi_connector_reset,
+ .atomic_create_state = sun4i_hdmi_connector_create_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v3 29/37] drm/sun4i: tv: Convert to atomic_create_state
2026-10-30 15:13 [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 18/37] drm/sun4i: Switch to drm_atomic_helper_connector_create_state Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 28/37] drm/sun4i: hdmi: Convert to atomic_create_state Maxime Ripard
@ 2026-10-30 15:13 ` Maxime Ripard
2026-11-02 8:41 ` [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Thomas Zimmermann
2026-11-05 9:15 ` Maxime Ripard
4 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:13 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Chen-Yu Tsai, Samuel Holland,
linux-sunxi
The sun4i TV connector reset implementation creates a pristine state
and initializes the analog TV properties. It does not perform any
hardware reset.
Since this is equivalent to what atomic_create_state expects, convert
the reset function to an atomic_create_state hook that returns the
initialized state.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Chen-Yu Tsai <wens@kernel.org>
Cc: Samuel Holland <samuel@sholland.org>
Cc: linux-sunxi@lists.linux.dev
---
drivers/gpu/drm/sun4i/sun4i_tv.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index ea86f8a6a35e..a68e5f7a03d2 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -406,8 +406,16 @@ static const struct drm_connector_helper_funcs sun4i_tv_comp_connector_helper_fu
};
-static void sun4i_tv_connector_reset(struct drm_connector *connector)
+static struct drm_connector_state *
+sun4i_tv_connector_create_state(struct drm_connector *connector)
{
- drm_atomic_helper_connector_reset(connector);
- drm_atomic_helper_connector_tv_state_init(connector->state, connector);
+ struct drm_connector_state *connector_state;
+
+ connector_state = drm_atomic_helper_connector_create_state(connector);
+ if (IS_ERR(connector_state))
+ return connector_state;
+
+ drm_atomic_helper_connector_tv_state_init(connector_state, connector);
+
+ return connector_state;
}
@@ -415,5 +423,5 @@ static const struct drm_connector_funcs sun4i_tv_comp_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
- .reset = sun4i_tv_connector_reset,
+ .atomic_create_state = sun4i_tv_connector_create_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
2026-10-30 15:13 [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (2 preceding siblings ...)
2026-10-30 15:13 ` [PATCH v3 29/37] drm/sun4i: tv: " Maxime Ripard
@ 2026-11-02 8:41 ` Thomas Zimmermann
2026-11-05 9:15 ` Maxime Ripard
4 siblings, 0 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2026-11-02 8:41 UTC (permalink / raw)
To: Maxime Ripard, Maarten Lankhorst, David Airlie, Simona Vetter
Cc: dri-devel, Christian König, Alex Deucher, amd-gfx,
Russell King, Alim Akhtar, Inki Dae, Krzysztof Kozlowski,
Kyungmin Park, Peter Griffin, Seung-Woo Kim, linux-samsung-soc,
Alison Wang, Stefan Agner, Huacai Chen, Icenowy Zheng, Jianmin Lv,
Mingcong Bai, Qianhai Wu, Xi Ruoyao, Geert Uytterhoeven,
linux-renesas-soc, Marcus Folkesson, Alain Volmat,
Raphael Gallais-Pou, Chen-Yu Tsai, Samuel Holland, linux-sunxi,
Jonathan Hunter, Mikko Perttunen, Thierry Reding, linux-tegra,
Alexey Brodkin, Alex Lanzano, Chia-I Wu, David Airlie,
Dmitry Osipenko, Gerd Hoffmann, Gurchetan Singh, virtualization,
Haneen Mohammed, Louis Chauvet, Melissa Wen,
Oleksandr Andrushchenko, Jerome Brunet, Kevin Hilman,
Martin Blumenstingl, linux-amlogic, Harry Wentland, Leo Li,
Rodrigo Siqueira, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, intel-gfx, intel-xe, Danilo Krummrich, Lyude Paul,
nouveau
Hi Maxime
Am 30.10.26 um 16:13 schrieb Maxime Ripard:
> This is a follow-up to the plane and CRTC reset removal series, and
> part of a larger effort to remove the reset hook from all KMS objects.
>
> The connector reset hook is overloaded: it is called both at probe
> time to create the initial software state and during suspend/resume to
> reset hardware and software state. These two roles have different
> requirements, and the reset hook is not fallible, making error
> handling difficult for the initial state allocation path.
>
> While reset has the semantics to reset both the software and hardware
> state, the vast majority of implementations and all the helpers only
> reset the software state, making them equivalent to
> atomic_create_state in practice. The atomic_create_state hook makes
> this explicit: it only allocates and initializes a pristine state
> without any side effect, and returns the state pointer or an ERR_PTR
> on failure.
>
> This series converts all connector drivers tree-wide from the reset hook
> to atomic_create_state, then removes the reset hook from struct
> drm_connector_funcs entirely. The conversions were done using a
> combination of Coccinelle semantic patches, mechanical one-line
> replacements and manual adjustments.
>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
for the entire series.
Best regards
Thomas
> ---
> Changes in v3:
> - Fix error path in dw-hdmi
> - Fix test error path for amdgpu kunit tests
> - Fix nouveau legacy path
> - Link to v2: https://lore.kernel.org/r/20261022-drm-no-more-connector-reset-v2-0-0b7e4e85b1e8@kernel.org
>
> Changes in v2:
> - Change the parameter order of __drm_atomic_helper_connector_hdmi_state_init
> - Fixed state argument casing for drm_atomic_helper_connector_tv_margins_state_init
> and drm_atomic_helper_connector_tv_state_init
> - Put atomic_create_state before atomic_duplicate_state
> - Fix state allocation for MST and WB connectors
> - Link to v1:
> https://lore.kernel.org/r/20261014-drm-no-more-connector-reset-v1-0-586c9c026823@kernel.org
>
> ---
> Maxime Ripard (37):
> drm/amdgpu: vkms: Switch to drm_atomic_helper_connector_create_state
> drm/bridge: analogix-anx6345: Switch to drm_atomic_helper_connector_create_state
> drm/bridge: analogix-anx78xx: Switch to drm_atomic_helper_connector_create_state
> drm/bridge: chrontel-ch7033: Switch to drm_atomic_helper_connector_create_state
> drm/bridge: nxp-ptn3460: Switch to drm_atomic_helper_connector_create_state
> drm/panel: Switch to drm_atomic_helper_connector_create_state
> drm/bridge: synopsys: dw-hdmi: Switch to drm_atomic_helper_connector_create_state
> drm/bridge: tc358767: Switch to drm_atomic_helper_connector_create_state
> drm/bridge: tda998x: Switch to drm_atomic_helper_connector_create_state
> drm/bridge: ti-tfp410: Switch to drm_atomic_helper_connector_create_state
> drm/exynos: Switch to drm_atomic_helper_connector_create_state
> drm/fsl-dcu: Switch to drm_atomic_helper_connector_create_state
> drm/loongson: Switch to drm_atomic_helper_connector_create_state
> drm/mipi-dbi: Switch to drm_atomic_helper_connector_create_state
> drm/renesas: shmobile: Switch to drm_atomic_helper_connector_create_state
> drm/sitronix: st7571: Switch to drm_atomic_helper_connector_create_state
> drm/sti: Switch to drm_atomic_helper_connector_create_state
> drm/sun4i: Switch to drm_atomic_helper_connector_create_state
> drm/tegra: Switch to drm_atomic_helper_connector_create_state
> drm/tests: Switch to drm_atomic_helper_connector_create_state
> drm/tiny: arcpgu: Switch to drm_atomic_helper_connector_create_state
> drm/tiny: sharp: Switch to drm_atomic_helper_connector_create_state
> drm/virtio: Switch to drm_atomic_helper_connector_create_state
> drm/vkms: Switch to drm_atomic_helper_connector_create_state
> drm/xen: Switch to drm_atomic_helper_connector_create_state
> drm/bridge: synopsys: dw-hdmi: Convert to atomic_create_state
> drm/meson: Convert to atomic_create_state
> drm/sun4i: hdmi: Convert to atomic_create_state
> drm/sun4i: tv: Convert to atomic_create_state
> drm/tests: hdmi: Convert to atomic_create_state
> drm/connector: Remove drm_atomic_helper_connector_reset()
> drm/amdgpu: dm: Convert to atomic_create_state
> drm/i915: Convert to atomic_create_state
> drm/nouveau: Convert to atomic_create_state
> drm/tegra: Convert to atomic_create_state
> drm/connector: Remove __drm_atomic_helper_connector_reset()
> drm/connector: Remove reset
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 +-
> .../amd/display/amdgpu_dm/amdgpu_dm_connector.c | 32 ++---
> .../amd/display/amdgpu_dm/amdgpu_dm_connector.h | 3 +-
> .../amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 11 +-
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c | 17 ++-
> .../amdgpu_dm/tests/amdgpu_dm_connector_test.c | 102 +++++++++++-----
> drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 2 +-
> drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 2 +-
> drivers/gpu/drm/bridge/chrontel-ch7033.c | 2 +-
> drivers/gpu/drm/bridge/nxp-ptn3460.c | 2 +-
> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 14 ++-
> drivers/gpu/drm/bridge/tc358767.c | 2 +-
> drivers/gpu/drm/bridge/tda998x_drv.c | 2 +-
> drivers/gpu/drm/bridge/ti-tfp410.c | 2 +-
> drivers/gpu/drm/display/drm_hdmi_state_helper.c | 3 +-
> drivers/gpu/drm/drm_atomic_state_helper.c | 43 -------
> drivers/gpu/drm/drm_connector.c | 8 --
> drivers/gpu/drm/drm_mode_config.c | 4 +-
> drivers/gpu/drm/drm_panel.c | 4 +-
> drivers/gpu/drm/exynos/exynos_drm_dpi.c | 2 +-
> drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 +-
> drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +-
> drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 2 +-
> drivers/gpu/drm/i915/display/intel_connector.c | 6 +-
> drivers/gpu/drm/i915/display/intel_sdvo.c | 6 +-
> drivers/gpu/drm/loongson/lsdc_output_7a1000.c | 2 +-
> drivers/gpu/drm/loongson/lsdc_output_7a2000.c | 4 +-
> drivers/gpu/drm/meson/meson_encoder_hdmi.c | 12 +-
> drivers/gpu/drm/nouveau/dispnv50/disp.c | 25 ++--
> drivers/gpu/drm/nouveau/nouveau_connector.c | 129 ++++++++++++++++-----
> drivers/gpu/drm/nouveau/nouveau_connector.h | 3 +-
> drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 2 +-
> drivers/gpu/drm/sitronix/st7571.c | 2 +-
> drivers/gpu/drm/sti/sti_dvo.c | 2 +-
> drivers/gpu/drm/sti/sti_hda.c | 2 +-
> drivers/gpu/drm/sti/sti_hdmi.c | 2 +-
> drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 16 ++-
> drivers/gpu/drm/sun4i/sun4i_lvds.c | 2 +-
> drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +-
> drivers/gpu/drm/sun4i/sun4i_tv.c | 16 ++-
> drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 2 +-
> drivers/gpu/drm/tegra/dsi.c | 17 ++-
> drivers/gpu/drm/tegra/hdmi.c | 2 +-
> drivers/gpu/drm/tegra/sor.c | 13 +--
> drivers/gpu/drm/tests/drm_atomic_commit_test.c | 2 +-
> drivers/gpu/drm/tests/drm_atomic_test.c | 2 +-
> drivers/gpu/drm/tests/drm_connector_test.c | 4 +-
> drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 16 ++-
> drivers/gpu/drm/tests/drm_probe_helper_test.c | 2 +-
> drivers/gpu/drm/tiny/arcpgu.c | 2 +-
> drivers/gpu/drm/tiny/sharp-memory.c | 2 +-
> drivers/gpu/drm/virtio/virtgpu_display.c | 2 +-
> drivers/gpu/drm/vkms/vkms_connector.c | 2 +-
> drivers/gpu/drm/vkms/vkms_writeback.c | 2 +-
> drivers/gpu/drm/xen/xen_drm_front_conn.c | 2 +-
> include/drm/drm_atomic_state_helper.h | 3 -
> include/drm/drm_connector.h | 12 --
> include/drm/drm_mipi_dbi.h | 2 +-
> 58 files changed, 351 insertions(+), 236 deletions(-)
> ---
> base-commit: 91f52e99824b0beebb48cad51bbda81437af8664
> change-id: 20260709-drm-no-more-connector-reset-45ee14d7c62c
>
> Best regards,
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Stefan Gaiser, Jochen Jaser, Abhinav Puri, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
2026-10-30 15:13 [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (3 preceding siblings ...)
2026-11-02 8:41 ` [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Thomas Zimmermann
@ 2026-11-05 9:15 ` Maxime Ripard
4 siblings, 0 replies; 6+ messages in thread
From: Maxime Ripard @ 2026-11-05 9:15 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Christian König, Alex Deucher, amd-gfx,
Russell King, Alim Akhtar, Inki Dae, Krzysztof Kozlowski,
Kyungmin Park, Peter Griffin, Seung-Woo Kim, linux-samsung-soc,
Alison Wang, Stefan Agner, Huacai Chen, Icenowy Zheng, Jianmin Lv,
Mingcong Bai, Qianhai Wu, Xi Ruoyao, Geert Uytterhoeven,
linux-renesas-soc, Marcus Folkesson, Alain Volmat,
Raphael Gallais-Pou, Chen-Yu Tsai, Samuel Holland, linux-sunxi,
Jonathan Hunter, Mikko Perttunen, Thierry Reding, linux-tegra,
Alexey Brodkin, Alex Lanzano, Chia-I Wu, David Airlie,
Dmitry Osipenko, Gerd Hoffmann, Gurchetan Singh, virtualization,
Haneen Mohammed, Louis Chauvet, Melissa Wen,
Oleksandr Andrushchenko, Jerome Brunet, Kevin Hilman,
Martin Blumenstingl, linux-amlogic, Harry Wentland, Leo Li,
Rodrigo Siqueira, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Tvrtko Ursulin, intel-gfx, intel-xe, Danilo Krummrich, Lyude Paul,
nouveau
[-- Attachment #1: Type: text/plain, Size: 1400 bytes --]
On Fri, Oct 30, 2026 at 04:13:30PM +0100, Maxime Ripard wrote:
> This is a follow-up to the plane and CRTC reset removal series, and
> part of a larger effort to remove the reset hook from all KMS objects.
>
> The connector reset hook is overloaded: it is called both at probe
> time to create the initial software state and during suspend/resume to
> reset hardware and software state. These two roles have different
> requirements, and the reset hook is not fallible, making error
> handling difficult for the initial state allocation path.
>
> While reset has the semantics to reset both the software and hardware
> state, the vast majority of implementations and all the helpers only
> reset the software state, making them equivalent to
> atomic_create_state in practice. The atomic_create_state hook makes
> this explicit: it only allocates and initializes a pristine state
> without any side effect, and returns the state pointer or an ERR_PTR
> on failure.
>
> This series converts all connector drivers tree-wide from the reset hook
> to atomic_create_state, then removes the reset hook from struct
> drm_connector_funcs entirely. The conversions were done using a
> combination of Coccinelle semantic patches, mechanical one-line
> replacements and manual adjustments.
>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
Applied to drm-misc-next
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-05 9:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-30 15:13 [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 18/37] drm/sun4i: Switch to drm_atomic_helper_connector_create_state Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 28/37] drm/sun4i: hdmi: Convert to atomic_create_state Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 29/37] drm/sun4i: tv: " Maxime Ripard
2026-11-02 8:41 ` [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Thomas Zimmermann
2026-11-05 9:15 ` Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox