* [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
@ 2026-10-30 15:13 ` Maxime Ripard
0 siblings, 0 replies; 55+ 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] 55+ messages in thread
* [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
@ 2026-10-30 15:13 ` Maxime Ripard
0 siblings, 0 replies; 55+ 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>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 55+ messages in thread
* [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
@ 2026-10-30 15:13 ` Maxime Ripard
0 siblings, 0 replies; 55+ 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,
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, 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] 55+ messages in thread
* [PATCH v3 01/37] drm/amdgpu: vkms: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
(?)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The amdgpu: vkms 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: "Christian König" <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
index 5c5fdbec93c2..5c7e2172a372 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c
@@ -87,5 +87,5 @@ static const struct drm_connector_funcs amdgpu_vkms_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] 55+ messages in thread
* [PATCH v3 02/37] drm/bridge: analogix-anx6345: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (2 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The bridge: analogix-anx6345 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>
---
drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c b/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
index 407834a03b63..0cff9ff0265a 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
@@ -484,5 +484,5 @@ static const struct drm_connector_funcs anx6345_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = anx6345_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,
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 03/37] drm/bridge: analogix-anx78xx: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (3 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The bridge: analogix-anx78xx 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>
---
drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
index 32186efa6f50..94f07a2317e1 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c
@@ -855,5 +855,5 @@ static const struct drm_connector_funcs anx78xx_connector_funcs = {
.detect = anx78xx_detect,
.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] 55+ messages in thread
* [PATCH v3 04/37] drm/bridge: chrontel-ch7033: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (4 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The bridge: chrontel-ch7033 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>
---
drivers/gpu/drm/bridge/chrontel-ch7033.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/chrontel-ch7033.c b/drivers/gpu/drm/bridge/chrontel-ch7033.c
index 4bc64b2885f7..3d48b42c38a0 100644
--- a/drivers/gpu/drm/bridge/chrontel-ch7033.c
+++ b/drivers/gpu/drm/bridge/chrontel-ch7033.c
@@ -219,8 +219,8 @@ static enum drm_connector_status ch7033_connector_detect(
static const struct drm_connector_funcs ch7033_connector_funcs = {
- .reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.detect = ch7033_connector_detect,
.destroy = drm_connector_cleanup,
+ .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] 55+ messages in thread
* [PATCH v3 05/37] drm/bridge: nxp-ptn3460: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (5 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The bridge: nxp-ptn3460 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>
---
drivers/gpu/drm/bridge/nxp-ptn3460.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c
index f9eff8bfceb7..be6a06130ba9 100644
--- a/drivers/gpu/drm/bridge/nxp-ptn3460.c
+++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c
@@ -211,5 +211,5 @@ static const struct drm_connector_funcs ptn3460_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] 55+ messages in thread
* [PATCH v3 06/37] drm/panel: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (6 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The bridge: panel 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>
---
drivers/gpu/drm/drm_panel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index 313053c123d1..760f074f947e 100644
--- a/drivers/gpu/drm/drm_panel.c
+++ b/drivers/gpu/drm/drm_panel.c
@@ -71,7 +71,7 @@ panel_bridge_connector_helper_funcs = {
static const struct drm_connector_funcs panel_bridge_connector_funcs = {
- .reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
+ .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] 55+ messages in thread
* [PATCH v3 07/37] drm/bridge: synopsys: dw-hdmi: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (7 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The bridge: synopsys: dw-hdmi 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>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 937d61c42b58..917cf764c9c5 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2570,5 +2570,5 @@ static const struct drm_connector_funcs dw_hdmi_connector_funcs = {
.destroy = drm_connector_cleanup,
.force = dw_hdmi_connector_force,
- .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] 55+ messages in thread
* [PATCH v3 08/37] drm/bridge: tc358767: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (8 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The bridge: tc358767 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>
---
drivers/gpu/drm/bridge/tc358767.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
index 51f4baa62a53..5ea6d3726bee 100644
--- a/drivers/gpu/drm/bridge/tc358767.c
+++ b/drivers/gpu/drm/bridge/tc358767.c
@@ -1797,5 +1797,5 @@ static const struct drm_connector_funcs tc_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] 55+ messages in thread
* [PATCH v3 09/37] drm/bridge: tda998x: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (9 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Russell King
The bridge: tda998x 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: Russell King <linux@armlinux.org.uk>
---
drivers/gpu/drm/bridge/tda998x_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/tda998x_drv.c b/drivers/gpu/drm/bridge/tda998x_drv.c
index 9a4c47134fc4..54ef526a1133 100644
--- a/drivers/gpu/drm/bridge/tda998x_drv.c
+++ b/drivers/gpu/drm/bridge/tda998x_drv.c
@@ -1210,8 +1210,8 @@ tda998x_connector_detect(struct drm_connector *connector, bool force)
static const struct drm_connector_funcs tda998x_connector_funcs = {
- .reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.detect = tda998x_connector_detect,
.destroy = drm_connector_cleanup,
+ .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] 55+ messages in thread
* [PATCH v3 10/37] drm/bridge: ti-tfp410: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (10 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The bridge: ti-tfp410 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>
---
drivers/gpu/drm/bridge/ti-tfp410.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
index 629ff7095e87..64a3d64e1f7b 100644
--- a/drivers/gpu/drm/bridge/ti-tfp410.c
+++ b/drivers/gpu/drm/bridge/ti-tfp410.c
@@ -96,5 +96,5 @@ static const struct drm_connector_funcs tfp410_con_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] 55+ messages in thread
* [PATCH v3 11/37] drm/exynos: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (11 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Alim Akhtar, Inki Dae,
Krzysztof Kozlowski, Kyungmin Park, Peter Griffin, Seung-Woo Kim,
linux-samsung-soc
The exynos 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: Alim Akhtar <alim.akhtar@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Peter Griffin <peter.griffin@linaro.org>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: linux-samsung-soc@vger.kernel.org
---
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 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
index 74d3a2bebb74..42c48fd14050 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
@@ -57,5 +57,5 @@ static const struct drm_connector_funcs exynos_dpi_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = exynos_dpi_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/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 077571eae9d6..f3e8a2bc1182 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -335,5 +335,5 @@ static const struct drm_connector_funcs vidi_connector_funcs = {
.detect = vidi_detect,
.destroy = vidi_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/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index 055dc04f9b3e..654a8b1b4afc 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -876,5 +876,5 @@ static const struct drm_connector_funcs hdmi_connector_funcs = {
.detect = hdmi_detect,
.destroy = hdmi_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,
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 12/37] drm/fsl-dcu: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (12 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Alison Wang, Stefan Agner
The fsl-dcu 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: Alison Wang <alison.wang@nxp.com>
Cc: Stefan Agner <stefan@agner.ch>
---
drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
index c64264541fe2..9b5ca262d619 100644
--- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
+++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c
@@ -51,9 +51,9 @@ static void fsl_dcu_drm_connector_destroy(struct drm_connector *connector)
static const struct drm_connector_funcs fsl_dcu_drm_connector_funcs = {
+ .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,
.destroy = fsl_dcu_drm_connector_destroy,
.fill_modes = drm_helper_probe_single_connector_modes,
- .reset = drm_atomic_helper_connector_reset,
};
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 13/37] drm/loongson: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (13 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Huacai Chen, Icenowy Zheng, Jianmin Lv,
Mingcong Bai, Qianhai Wu, Xi Ruoyao
The loongson 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: Huacai Chen <chenhuacai@kernel.org>
Cc: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Cc: Jianmin Lv <lvjianmin@loongson.cn>
Cc: Mingcong Bai <jeffbai@aosc.io>
Cc: Qianhai Wu <wuqianhai@loongson.cn>
Cc: Xi Ruoyao <xry111@xry111.site>
---
drivers/gpu/drm/loongson/lsdc_output_7a1000.c | 2 +-
drivers/gpu/drm/loongson/lsdc_output_7a2000.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/loongson/lsdc_output_7a1000.c b/drivers/gpu/drm/loongson/lsdc_output_7a1000.c
index 5c483baa3762..3d4562353578 100644
--- a/drivers/gpu/drm/loongson/lsdc_output_7a1000.c
+++ b/drivers/gpu/drm/loongson/lsdc_output_7a1000.c
@@ -96,5 +96,5 @@ static const struct drm_connector_funcs ls7a1000_dpi_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
diff --git a/drivers/gpu/drm/loongson/lsdc_output_7a2000.c b/drivers/gpu/drm/loongson/lsdc_output_7a2000.c
index a9798b3dadee..e2255e6a0d32 100644
--- a/drivers/gpu/drm/loongson/lsdc_output_7a2000.c
+++ b/drivers/gpu/drm/loongson/lsdc_output_7a2000.c
@@ -204,5 +204,5 @@ static const struct drm_connector_funcs ls7a2000_hdmi_connector_funcs[2] = {
.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,
@@ -213,5 +213,5 @@ static const struct drm_connector_funcs ls7a2000_hdmi_connector_funcs[2] = {
.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] 55+ messages in thread
* [PATCH v3 14/37] drm/mipi-dbi: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (14 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The mipi-dbi 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>
---
include/drm/drm_mipi_dbi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/drm_mipi_dbi.h b/include/drm/drm_mipi_dbi.h
index d93e25fdc2e1..bb3296419910 100644
--- a/include/drm/drm_mipi_dbi.h
+++ b/include/drm/drm_mipi_dbi.h
@@ -258,6 +258,6 @@ void drm_mipi_dbi_crtc_helper_atomic_disable(struct drm_crtc *crtc,
#define DRM_MIPI_DBI_CONNECTOR_FUNCS \
- .reset = drm_atomic_helper_connector_reset, \
.fill_modes = drm_helper_probe_single_connector_modes, \
+ .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] 55+ messages in thread
* [PATCH v3 15/37] drm/renesas: shmobile: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (15 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Geert Uytterhoeven, linux-renesas-soc
The renesas: shmobile 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: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: linux-renesas-soc@vger.kernel.org
---
drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
index 51bae2008cc6..d1a3e17f5bb1 100644
--- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c
@@ -528,7 +528,7 @@ static void shmob_drm_connector_destroy(struct drm_connector *connector)
static const struct drm_connector_funcs connector_funcs = {
- .reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = shmob_drm_connector_destroy,
+ .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] 55+ messages in thread
* [PATCH v3 16/37] drm/sitronix: st7571: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (16 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Marcus Folkesson
The sitronix: st7571 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: Marcus Folkesson <marcus.folkesson@gmail.com>
---
drivers/gpu/drm/sitronix/st7571.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sitronix/st7571.c b/drivers/gpu/drm/sitronix/st7571.c
index 5e60c4685671..608d38eab0fc 100644
--- a/drivers/gpu/drm/sitronix/st7571.c
+++ b/drivers/gpu/drm/sitronix/st7571.c
@@ -476,7 +476,7 @@ static const struct drm_encoder_helper_funcs st7571_encoder_helper_funcs = {
static const struct drm_connector_funcs st7571_connector_funcs = {
- .reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
+ .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] 55+ messages in thread
* [PATCH v3 17/37] drm/sti: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (17 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Alain Volmat, Raphael Gallais-Pou
The sti 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: Alain Volmat <alain.volmat@foss.st.com>
Cc: Raphael Gallais-Pou <rgallaispou@gmail.com>
---
drivers/gpu/drm/sti/sti_dvo.c | 2 +-
drivers/gpu/drm/sti/sti_hda.c | 2 +-
drivers/gpu/drm/sti/sti_hdmi.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index cdb19b75f5e1..18c337ffa161 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -421,5 +421,5 @@ static const struct drm_connector_funcs sti_dvo_connector_funcs = {
.detect = sti_dvo_connector_detect,
.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,
diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
index b4def2b25cec..204738807c86 100644
--- a/drivers/gpu/drm/sti/sti_hda.c
+++ b/drivers/gpu/drm/sti/sti_hda.c
@@ -664,5 +664,5 @@ static const struct drm_connector_funcs sti_hda_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,
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
index 7ba9e0b7ba6c..9a810a89e6c0 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.c
+++ b/drivers/gpu/drm/sti/sti_hdmi.c
@@ -1147,5 +1147,5 @@ static const struct drm_connector_funcs sti_hdmi_connector_funcs = {
.detect = sti_hdmi_connector_detect,
.destroy = drm_connector_cleanup,
- .reset = drm_atomic_helper_connector_reset,
+ .atomic_create_state = drm_atomic_helper_connector_create_state,
.atomic_set_property = sti_hdmi_connector_set_property,
.atomic_get_property = sti_hdmi_connector_get_property,
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 18/37] drm/sun4i: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (18 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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] 55+ messages in thread
* [PATCH v3 19/37] drm/tegra: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (19 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Jonathan Hunter, Mikko Perttunen,
Thierry Reding, linux-tegra
The tegra 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: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Mikko Perttunen <mperttunen@nvidia.com>
Cc: Thierry Reding <thierry.reding@kernel.org>
Cc: linux-tegra@vger.kernel.org
---
drivers/gpu/drm/tegra/hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
index 0d2c0ab0a63e..f414dd514543 100644
--- a/drivers/gpu/drm/tegra/hdmi.c
+++ b/drivers/gpu/drm/tegra/hdmi.c
@@ -1131,8 +1131,8 @@ static void tegra_hdmi_early_unregister(struct drm_connector *connector)
static const struct drm_connector_funcs tegra_hdmi_connector_funcs = {
- .reset = drm_atomic_helper_connector_reset,
.detect = tegra_hdmi_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = tegra_output_connector_destroy,
+ .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] 55+ messages in thread
* [PATCH v3 20/37] drm/tests: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (20 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The tests 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>
---
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_probe_helper_test.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/tests/drm_atomic_commit_test.c b/drivers/gpu/drm/tests/drm_atomic_commit_test.c
index ff69bade19b8..6ccb001f6264 100644
--- a/drivers/gpu/drm/tests/drm_atomic_commit_test.c
+++ b/drivers/gpu/drm/tests/drm_atomic_commit_test.c
@@ -52,7 +52,7 @@ static const struct drm_encoder_helper_funcs drm_atomic_test_encoder_funcs = {
static const struct drm_connector_funcs dummy_connector_funcs = {
+ .atomic_create_state = drm_atomic_helper_connector_create_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
- .reset = drm_atomic_helper_connector_reset,
};
diff --git a/drivers/gpu/drm/tests/drm_atomic_test.c b/drivers/gpu/drm/tests/drm_atomic_test.c
index ea91bec6569e..541a0062f143 100644
--- a/drivers/gpu/drm/tests/drm_atomic_test.c
+++ b/drivers/gpu/drm/tests/drm_atomic_test.c
@@ -24,7 +24,7 @@ static const struct drm_connector_helper_funcs drm_atomic_init_connector_helper_
static const struct drm_connector_funcs drm_atomic_init_connector_funcs = {
+ .atomic_create_state = drm_atomic_helper_connector_create_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
- .reset = drm_atomic_helper_connector_reset,
};
diff --git a/drivers/gpu/drm/tests/drm_connector_test.c b/drivers/gpu/drm/tests/drm_connector_test.c
index 3368aedd4e66..2856294bafda 100644
--- a/drivers/gpu/drm/tests/drm_connector_test.c
+++ b/drivers/gpu/drm/tests/drm_connector_test.c
@@ -49,7 +49,7 @@ static const struct drm_connector_hdmi_funcs dummy_hdmi_funcs = {
static const struct drm_connector_funcs dummy_funcs = {
+ .atomic_create_state = drm_atomic_helper_connector_create_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
- .reset = drm_atomic_helper_connector_reset,
};
@@ -203,7 +203,7 @@ static struct kunit_suite drmm_connector_init_test_suite = {
static const struct drm_connector_funcs dummy_dynamic_init_funcs = {
+ .atomic_create_state = drm_atomic_helper_connector_create_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
- .reset = drm_atomic_helper_connector_reset,
.destroy = drm_connector_cleanup,
};
diff --git a/drivers/gpu/drm/tests/drm_probe_helper_test.c b/drivers/gpu/drm/tests/drm_probe_helper_test.c
index db0e4f5df275..ebc0392585e7 100644
--- a/drivers/gpu/drm/tests/drm_probe_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_probe_helper_test.c
@@ -26,7 +26,7 @@ static const struct drm_connector_helper_funcs drm_probe_helper_connector_helper
static const struct drm_connector_funcs drm_probe_helper_connector_funcs = {
+ .atomic_create_state = drm_atomic_helper_connector_create_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
- .reset = drm_atomic_helper_connector_reset,
};
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 21/37] drm/tiny: arcpgu: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (21 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Alexey Brodkin
The tiny: arcpgu 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: Alexey Brodkin <abrodkin@synopsys.com>
---
drivers/gpu/drm/tiny/arcpgu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/arcpgu.c b/drivers/gpu/drm/tiny/arcpgu.c
index cdbf28db8fa1..32f6e98ba9c5 100644
--- a/drivers/gpu/drm/tiny/arcpgu.c
+++ b/drivers/gpu/drm/tiny/arcpgu.c
@@ -99,7 +99,7 @@ arcpgu_drm_connector_helper_funcs = {
static const struct drm_connector_funcs arcpgu_drm_connector_funcs = {
- .reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
+ .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] 55+ messages in thread
* [PATCH v3 22/37] drm/tiny: sharp: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (22 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Alex Lanzano
The tiny: sharp 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: Alex Lanzano <lanzano.alex@gmail.com>
---
drivers/gpu/drm/tiny/sharp-memory.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/sharp-memory.c b/drivers/gpu/drm/tiny/sharp-memory.c
index 434e73bd25a5..b948e44544d6 100644
--- a/drivers/gpu/drm/tiny/sharp-memory.c
+++ b/drivers/gpu/drm/tiny/sharp-memory.c
@@ -370,7 +370,7 @@ static const struct drm_connector_helper_funcs sharp_memory_connector_hfuncs = {
static const struct drm_connector_funcs sharp_memory_connector_funcs = {
- .reset = drm_atomic_helper_connector_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
+ .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] 55+ messages in thread
* [PATCH v3 23/37] drm/virtio: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (23 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Chia-I Wu, David Airlie,
Dmitry Osipenko, Gerd Hoffmann, Gurchetan Singh, virtualization
The virtio 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: Chia-I Wu <olvaffe@gmail.com>
Cc: David Airlie <airlied@redhat.com>
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gurchetan Singh <gurchetansingh@chromium.org>
Cc: virtualization@lists.linux.dev
---
drivers/gpu/drm/virtio/virtgpu_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index b60aab07e78d..f0ed9bd27a91 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -271,5 +271,5 @@ static const struct drm_connector_funcs virtio_gpu_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = virtio_gpu_conn_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,
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 24/37] drm/vkms: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (24 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Haneen Mohammed, Louis Chauvet,
Melissa Wen
The vkms 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: Haneen Mohammed <hamohammed.sa@gmail.com>
Cc: Louis Chauvet <louis.chauvet@bootlin.com>
Cc: Melissa Wen <melissa.srw@gmail.com>
---
drivers/gpu/drm/vkms/vkms_connector.c | 2 +-
drivers/gpu/drm/vkms/vkms_writeback.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/vkms/vkms_connector.c b/drivers/gpu/drm/vkms/vkms_connector.c
index b0a6b212d3f4..57138027966f 100644
--- a/drivers/gpu/drm/vkms/vkms_connector.c
+++ b/drivers/gpu/drm/vkms/vkms_connector.c
@@ -38,5 +38,5 @@ static const struct drm_connector_funcs vkms_connector_funcs = {
.detect = vkms_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
- .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/vkms/vkms_writeback.c b/drivers/gpu/drm/vkms/vkms_writeback.c
index ecf29a2c0c8e..858df1f89f66 100644
--- a/drivers/gpu/drm/vkms/vkms_writeback.c
+++ b/drivers/gpu/drm/vkms/vkms_writeback.c
@@ -27,5 +27,5 @@ static const u32 vkms_wb_formats[] = {
static const struct drm_connector_funcs vkms_wb_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
- .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] 55+ messages in thread
* [PATCH v3 25/37] drm/xen: Switch to drm_atomic_helper_connector_create_state
2026-10-30 15:13 ` Maxime Ripard
` (25 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Oleksandr Andrushchenko
The xen 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: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
---
drivers/gpu/drm/xen/xen_drm_front_conn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xen/xen_drm_front_conn.c b/drivers/gpu/drm/xen/xen_drm_front_conn.c
index a1ba6d3d0568..8ceac0947be2 100644
--- a/drivers/gpu/drm/xen/xen_drm_front_conn.c
+++ b/drivers/gpu/drm/xen/xen_drm_front_conn.c
@@ -95,5 +95,5 @@ static const struct drm_connector_funcs 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] 55+ messages in thread
* [PATCH v3 26/37] drm/bridge: synopsys: dw-hdmi: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
` (26 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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
The dw-hdmi driver calls drm_atomic_helper_connector_reset() during
connector creation to allocate an initial connector state needed by
drm_connector_attach_max_bpc_property(). However, the driver only
needs to allocate a pristine state, which is exactly what
atomic_create_state provides.
Convert to drm_atomic_helper_connector_create_state() with proper
error handling.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
index 917cf764c9c5..2d49fa92b8e2 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
@@ -2606,5 +2606,15 @@ static int dw_hdmi_connector_create(struct dw_hdmi *hdmi)
* connector to have a state.
*/
- drm_atomic_helper_connector_reset(connector);
+ if (!connector->state) {
+ struct drm_connector_state *conn_state;
+
+ conn_state = drm_atomic_helper_connector_create_state(connector);
+ if (IS_ERR(conn_state)) {
+ drm_connector_cleanup(connector);
+ return PTR_ERR(conn_state);
+ }
+
+ connector->state = conn_state;
+ }
drm_connector_attach_max_bpc_property(connector, 8, 16);
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 27/37] drm/meson: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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, Jerome Brunet, Kevin Hilman,
Martin Blumenstingl, linux-amlogic
The meson HDMI encoder calls drm_atomic_helper_connector_reset()
during connector creation to allocate an initial connector state
needed by drm_connector_attach_max_bpc_property(). However, the
driver only needs to allocate a pristine state, which is exactly
what atomic_create_state provides.
Convert to drm_atomic_helper_connector_create_state() with proper
error handling.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-amlogic@lists.infradead.org
---
drivers/gpu/drm/meson/meson_encoder_hdmi.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.c b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
index c4355c5cc340..eab2e969d791 100644
--- a/drivers/gpu/drm/meson/meson_encoder_hdmi.c
+++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
@@ -449,5 +449,15 @@ int meson_encoder_hdmi_probe(struct meson_drm *priv)
* connector to have a state.
*/
- drm_atomic_helper_connector_reset(meson_encoder_hdmi->connector);
+ if (!meson_encoder_hdmi->connector->state) {
+ struct drm_connector_state *conn_state;
+
+ conn_state = drm_atomic_helper_connector_create_state(meson_encoder_hdmi->connector);
+ if (IS_ERR(conn_state)) {
+ ret = PTR_ERR(conn_state);
+ goto err_put_node;
+ }
+
+ meson_encoder_hdmi->connector->state = conn_state;
+ }
if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL) ||
--
2.55.0
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 27/37] drm/meson: Convert to atomic_create_state
@ 2026-10-30 15:13 ` Maxime Ripard
0 siblings, 0 replies; 55+ 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, Jerome Brunet, Kevin Hilman,
Martin Blumenstingl, linux-amlogic
The meson HDMI encoder calls drm_atomic_helper_connector_reset()
during connector creation to allocate an initial connector state
needed by drm_connector_attach_max_bpc_property(). However, the
driver only needs to allocate a pristine state, which is exactly
what atomic_create_state provides.
Convert to drm_atomic_helper_connector_create_state() with proper
error handling.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-amlogic@lists.infradead.org
---
drivers/gpu/drm/meson/meson_encoder_hdmi.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/meson/meson_encoder_hdmi.c b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
index c4355c5cc340..eab2e969d791 100644
--- a/drivers/gpu/drm/meson/meson_encoder_hdmi.c
+++ b/drivers/gpu/drm/meson/meson_encoder_hdmi.c
@@ -449,5 +449,15 @@ int meson_encoder_hdmi_probe(struct meson_drm *priv)
* connector to have a state.
*/
- drm_atomic_helper_connector_reset(meson_encoder_hdmi->connector);
+ if (!meson_encoder_hdmi->connector->state) {
+ struct drm_connector_state *conn_state;
+
+ conn_state = drm_atomic_helper_connector_create_state(meson_encoder_hdmi->connector);
+ if (IS_ERR(conn_state)) {
+ ret = PTR_ERR(conn_state);
+ goto err_put_node;
+ }
+
+ meson_encoder_hdmi->connector->state = conn_state;
+ }
if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_GXL) ||
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 28/37] drm/sun4i: hdmi: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
` (28 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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] 55+ messages in thread
* [PATCH v3 29/37] drm/sun4i: tv: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
` (29 preceding siblings ...)
(?)
@ 2026-10-30 15:13 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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] 55+ messages in thread
* [PATCH v3 30/37] drm/tests: hdmi: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
` (30 preceding siblings ...)
(?)
@ 2026-10-30 15:14 ` Maxime Ripard
2026-11-02 8:40 ` Thomas Zimmermann
-1 siblings, 1 reply; 55+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:14 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
The test 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>
---
drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
index 9953f5e661ce..336bb644cb7c 100644
--- a/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
+++ b/drivers/gpu/drm/tests/drm_hdmi_state_helper_test.c
@@ -200,16 +200,24 @@ static const struct drm_connector_helper_funcs dummy_connector_helper_funcs = {
};
-static void dummy_hdmi_connector_reset(struct drm_connector *connector)
+static struct drm_connector_state *
+dummy_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;
}
static const struct drm_connector_funcs dummy_connector_funcs = {
+ .atomic_create_state = dummy_hdmi_connector_create_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.fill_modes = drm_helper_probe_single_connector_modes,
- .reset = dummy_hdmi_connector_reset,
};
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 31/37] drm/connector: Remove drm_atomic_helper_connector_reset()
2026-10-30 15:13 ` Maxime Ripard
` (31 preceding siblings ...)
(?)
@ 2026-10-30 15:14 ` Maxime Ripard
-1 siblings, 0 replies; 55+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:14 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
All drivers implementing the connector reset hook with
drm_atomic_helper_connector_reset() have been converted to
atomic_create_state.
Remove drm_atomic_helper_connector_reset().
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/display/drm_hdmi_state_helper.c | 3 +--
drivers/gpu/drm/drm_atomic_state_helper.c | 20 --------------------
include/drm/drm_atomic_state_helper.h | 1 -
include/drm/drm_connector.h | 2 +-
4 files changed, 2 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
index c63d439382bb..66ae678fc078 100644
--- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c
+++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c
@@ -315,6 +315,5 @@
* Initializes all HDMI resources from a @drm_connector_state without
* actually allocating it. This is useful for HDMI drivers, in
- * combination with __drm_atomic_helper_connector_state_init(),
- * drm_atomic_helper_connector_reset(), or
+ * combination with __drm_atomic_helper_connector_state_init(), or
* drm_atomic_helper_connector_create_state().
*/
diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
index 3534925636d5..5efda28bb2b0 100644
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
@@ -436,24 +436,4 @@ __drm_atomic_helper_connector_reset(struct drm_connector *connector,
EXPORT_SYMBOL(__drm_atomic_helper_connector_reset);
-/**
- * drm_atomic_helper_connector_reset - default &drm_connector_funcs.reset hook for connectors
- * @connector: drm connector
- *
- * Resets the atomic state for @connector by freeing the state pointer (which
- * might be NULL, e.g. at driver load time) and allocating a new empty state
- * object.
- */
-void drm_atomic_helper_connector_reset(struct drm_connector *connector)
-{
- struct drm_connector_state *conn_state = kzalloc_obj(*conn_state);
-
- if (connector->state)
- __drm_atomic_helper_connector_destroy_state(connector->state);
-
- kfree(connector->state);
- __drm_atomic_helper_connector_reset(connector, conn_state);
-}
-EXPORT_SYMBOL(drm_atomic_helper_connector_reset);
-
/**
* drm_atomic_helper_connector_create_state - default &drm_connector_funcs.atomic_create_state hook for connectors
diff --git a/include/drm/drm_atomic_state_helper.h b/include/drm/drm_atomic_state_helper.h
index 5e8619aeef21..7bced7e9d860 100644
--- a/include/drm/drm_atomic_state_helper.h
+++ b/include/drm/drm_atomic_state_helper.h
@@ -69,5 +69,4 @@ void __drm_atomic_helper_connector_state_init(struct drm_connector_state *conn_s
void __drm_atomic_helper_connector_reset(struct drm_connector *connector,
struct drm_connector_state *conn_state);
-void drm_atomic_helper_connector_reset(struct drm_connector *connector);
struct drm_connector_state *
drm_atomic_helper_connector_create_state(struct drm_connector *connector);
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 2ee7c59329aa..8b52360339e0 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1666,5 +1666,5 @@ struct drm_connector_funcs {
* It's not a helper hook only for historical reasons.
*
- * Atomic drivers can use drm_atomic_helper_connector_reset() to reset
+ * Atomic drivers can use __drm_atomic_helper_connector_reset() to reset
* atomic state using this hook.
*/
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 32/37] drm/amdgpu: dm: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
` (32 preceding siblings ...)
(?)
@ 2026-10-30 15:14 ` Maxime Ripard
-1 siblings, 0 replies; 55+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:14 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Christian König, Alex Deucher,
Harry Wentland, Leo Li, Rodrigo Siqueira, amd-gfx
The amdgpu_dm connector reset implementation creates a custom state
subclass, but only initializes a pristine state without resetting any
hardware. This is equivalent to what atomic_create_state expects.
Convert to it.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Rodrigo Siqueira <siqueira@igalia.com>
Cc: amd-gfx@lists.freedesktop.org
---
.../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 ++++++++++++++-------
5 files changed, 113 insertions(+), 52 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
index 3a4e98b08ac1..e59595b5e39b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.c
@@ -1942,20 +1942,14 @@ STATIC_IFN_KUNIT void amdgpu_dm_connector_destroy(struct drm_connector *connecto
EXPORT_IF_KUNIT(amdgpu_dm_connector_destroy);
-void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector)
+struct drm_connector_state *
+amdgpu_dm_connector_atomic_create_state(struct drm_connector *connector)
{
- struct dm_connector_state *old_state =
- to_dm_connector_state(connector->state);
struct dm_connector_state *state;
state = kzalloc_obj(*state);
if (!state)
- return;
+ return ERR_PTR(-ENOMEM);
- if (connector->state)
- __drm_atomic_helper_connector_destroy_state(connector->state);
-
- kfree(old_state);
-
- __drm_atomic_helper_connector_reset(connector, &state->base);
+ __drm_atomic_helper_connector_state_init(&state->base, connector);
state->scaling = RMX_OFF;
@@ -1973,6 +1967,8 @@ void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector)
state->abm_level = amdgpu_dm_abm_level;
}
+
+ return &state->base;
}
-EXPORT_IF_KUNIT(amdgpu_dm_connector_funcs_reset);
+EXPORT_IF_KUNIT(amdgpu_dm_connector_atomic_create_state);
struct drm_connector_state *
@@ -2073,8 +2069,8 @@ EXPORT_IF_KUNIT(amdgpu_dm_connector_funcs_force);
static const struct drm_connector_funcs amdgpu_dm_connector_funcs = {
- .reset = amdgpu_dm_connector_funcs_reset,
.detect = amdgpu_dm_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = amdgpu_dm_connector_destroy,
+ .atomic_create_state = amdgpu_dm_connector_atomic_create_state,
.atomic_duplicate_state = amdgpu_dm_connector_atomic_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
@@ -3200,6 +3196,14 @@ void amdgpu_dm_connector_init_helper(struct amdgpu_display_manager *dm,
* Allocate some default initial connector state with our reset helper.
*/
- if (aconnector->base.funcs->reset)
- aconnector->base.funcs->reset(&aconnector->base);
+ if (!aconnector->base.state &&
+ aconnector->base.funcs->atomic_create_state) {
+ struct drm_connector_state *conn_state;
+
+ conn_state = aconnector->base.funcs->atomic_create_state(&aconnector->base);
+ if (IS_ERR(conn_state))
+ return;
+
+ aconnector->base.state = conn_state;
+ }
aconnector->connector_id = link_index;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.h b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.h
index 79698deacf61..4a73fc607f38 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.h
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_connector.h
@@ -51,5 +51,6 @@ struct drm_edid;
struct drm_property;
-void amdgpu_dm_connector_funcs_reset(struct drm_connector *connector);
+struct drm_connector_state *
+amdgpu_dm_connector_atomic_create_state(struct drm_connector *connector);
struct drm_connector_state *
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index a5b15bef8aa0..e28fbd1b6790 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -259,5 +259,5 @@ static const struct drm_connector_funcs dm_dp_mst_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = dm_dp_mst_connector_destroy,
- .reset = amdgpu_dm_connector_funcs_reset,
+ .atomic_create_state = amdgpu_dm_connector_atomic_create_state,
.atomic_duplicate_state = amdgpu_dm_connector_atomic_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
@@ -672,4 +672,5 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
struct amdgpu_device *adev = drm_to_adev(dev);
struct amdgpu_dm_connector *aconnector;
+ struct drm_connector_state *conn_state;
struct drm_connector *connector;
int i;
@@ -739,5 +740,11 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
* framebuffer lists
*/
- amdgpu_dm_connector_funcs_reset(connector);
+ conn_state = amdgpu_dm_connector_atomic_create_state(connector);
+ if (!IS_ERR(conn_state)) {
+ if (connector->state)
+ connector->funcs->atomic_destroy_state(connector, connector->state);
+
+ connector->state = conn_state;
+ }
drm_dp_mst_get_port_malloc(port);
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c
index 6f91a992d43f..39b7b3e49f6b 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_wb.c
@@ -226,5 +226,5 @@ static const struct drm_connector_funcs amdgpu_dm_wb_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = drm_connector_cleanup,
- .reset = amdgpu_dm_connector_funcs_reset,
+ .atomic_create_state = amdgpu_dm_connector_atomic_create_state,
.atomic_duplicate_state = amdgpu_dm_connector_atomic_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
@@ -241,4 +241,5 @@ int amdgpu_dm_wb_connector_init(struct amdgpu_display_manager *dm,
uint32_t link_index)
{
+ struct drm_connector *connector;
struct dc *dc = dm->dc;
struct dc_link *link = dc_get_link_at_index(dc, link_index);
@@ -262,6 +263,16 @@ int amdgpu_dm_wb_connector_init(struct amdgpu_display_manager *dm,
* Allocate some default initial connector state with our reset helper.
*/
- if (wbcon->base.base.funcs->reset)
- wbcon->base.base.funcs->reset(&wbcon->base.base);
+ connector = &wbcon->base.base;
+ if (connector->funcs->atomic_create_state) {
+ struct drm_connector_state *conn_state;
+
+ conn_state = amdgpu_dm_connector_atomic_create_state(connector);
+ if (!IS_ERR(conn_state)) {
+ if (connector->state)
+ connector->funcs->atomic_destroy_state(connector, connector->state);
+
+ connector->state = conn_state;
+ }
+ }
return 0;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c
index 8117aaf41f22..8ebe37ec83bf 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_connector_test.c
@@ -1469,8 +1469,8 @@ static void dm_test_decide_crtc_timing_no_crtc_clock(struct kunit *test)
}
-/* Tests for amdgpu_dm_connector_funcs_reset() */
+/* Tests for amdgpu_dm_connector_atomic_create_state() */
static const struct drm_connector_funcs dm_test_connector_funcs = {
- .reset = amdgpu_dm_connector_funcs_reset,
+ .atomic_create_state = amdgpu_dm_connector_atomic_create_state,
.atomic_duplicate_state = amdgpu_dm_connector_atomic_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
@@ -1478,12 +1478,13 @@ static const struct drm_connector_funcs dm_test_connector_funcs = {
/**
- * dm_test_funcs_reset_sets_defaults - Test funcs_reset sets defaults
+ * dm_test_atomic_create_sets_defaults - Test funcs_reset sets defaults
* @test: The KUnit test context
*/
-static void dm_test_funcs_reset_sets_defaults(struct kunit *test)
+static void dm_test_atomic_create_sets_defaults(struct kunit *test)
{
struct device *dev;
struct drm_device *drm;
struct drm_connector *connector;
+ struct drm_connector_state *conn_state;
struct dm_connector_state *dm_state;
@@ -1502,7 +1503,9 @@ static void dm_test_funcs_reset_sets_defaults(struct kunit *test)
DRM_MODE_CONNECTOR_DisplayPort, NULL);
- amdgpu_dm_connector_funcs_reset(connector);
+ conn_state = amdgpu_dm_connector_atomic_create_state(connector);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ connector->state = conn_state;
- KUNIT_ASSERT_NOT_NULL(test, connector->state);
dm_state = to_dm_connector_state(connector->state);
KUNIT_EXPECT_EQ(test, (int)dm_state->scaling, (int)RMX_OFF);
@@ -1516,12 +1519,13 @@ static void dm_test_funcs_reset_sets_defaults(struct kunit *test)
/**
- * dm_test_funcs_reset_edp_abm_level - Test funcs_reset eDP sets ABM
+ * dm_test_atomic_create_edp_abm_level - Test funcs_reset eDP sets ABM
* @test: The KUnit test context
*/
-static void dm_test_funcs_reset_edp_abm_level(struct kunit *test)
+static void dm_test_atomic_create_edp_abm_level(struct kunit *test)
{
struct device *dev;
struct drm_device *drm;
struct drm_connector *connector;
+ struct drm_connector_state *conn_state;
struct dm_connector_state *dm_state;
int saved_abm_level = amdgpu_dm_get_abm_level_param();
@@ -1543,7 +1547,10 @@ static void dm_test_funcs_reset_edp_abm_level(struct kunit *test)
/* Test with abm_level > 0 */
amdgpu_dm_set_abm_level_param(3);
- amdgpu_dm_connector_funcs_reset(connector);
- KUNIT_ASSERT_NOT_NULL(test, connector->state);
+ conn_state = amdgpu_dm_connector_atomic_create_state(connector);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ connector->state = conn_state;
+
dm_state = to_dm_connector_state(connector->state);
KUNIT_EXPECT_EQ(test, (int)dm_state->abm_level, 3);
@@ -1553,13 +1560,14 @@ static void dm_test_funcs_reset_edp_abm_level(struct kunit *test)
/**
- * dm_test_funcs_reset_edp_abm_disabled - Test funcs_reset eDP ABM
+ * dm_test_atomic_create_edp_abm_disabled - Test funcs_reset eDP ABM
* disabled
* @test: The KUnit test context
*/
-static void dm_test_funcs_reset_edp_abm_disabled(struct kunit *test)
+static void dm_test_atomic_create_edp_abm_disabled(struct kunit *test)
{
struct device *dev;
struct drm_device *drm;
struct drm_connector *connector;
+ struct drm_connector_state *conn_state;
struct dm_connector_state *dm_state;
int saved_abm_level = amdgpu_dm_get_abm_level_param();
@@ -1581,7 +1589,10 @@ static void dm_test_funcs_reset_edp_abm_disabled(struct kunit *test)
/* Test with abm_level <= 0 → immediate disable */
amdgpu_dm_set_abm_level_param(-1);
- amdgpu_dm_connector_funcs_reset(connector);
- KUNIT_ASSERT_NOT_NULL(test, connector->state);
+ conn_state = amdgpu_dm_connector_atomic_create_state(connector);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ connector->state = conn_state;
+
dm_state = to_dm_connector_state(connector->state);
KUNIT_EXPECT_EQ(test, (int)dm_state->abm_level,
@@ -1603,4 +1614,5 @@ static void dm_test_atomic_dup_state_copies_fields(struct kunit *test)
struct drm_device *drm;
struct drm_connector *connector;
+ struct drm_connector_state *conn_state;
struct dm_connector_state *dm_state;
struct dm_connector_state *new_dm_state;
@@ -1621,6 +1633,8 @@ static void dm_test_atomic_dup_state_copies_fields(struct kunit *test)
DRM_MODE_CONNECTOR_HDMIA, NULL);
- amdgpu_dm_connector_funcs_reset(connector);
- KUNIT_ASSERT_NOT_NULL(test, connector->state);
+ conn_state = amdgpu_dm_connector_atomic_create_state(connector);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ connector->state = conn_state;
/* Modify original state fields */
@@ -4887,5 +4901,5 @@ static struct dm_test_destroy_ctx *dm_test_destroy_ctx_alloc(struct kunit *test)
*/
static const struct drm_connector_funcs dm_test_destroy_funcs = {
- .reset = amdgpu_dm_connector_funcs_reset,
+ .atomic_create_state = amdgpu_dm_connector_atomic_create_state,
.atomic_duplicate_state = amdgpu_dm_connector_atomic_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
@@ -6254,4 +6268,5 @@ static void dm_test_restore_state_no_encoder(struct kunit *test)
struct drm_device *drm = dm_test_alloc_drm(test);
struct amdgpu_dm_connector *aconnector;
+ struct drm_connector_state *conn_state;
aconnector = dm_test_add_connector(test, drm,
@@ -6259,6 +6274,9 @@ static void dm_test_restore_state_no_encoder(struct kunit *test)
aconnector->dc_sink = kunit_kzalloc(test, 1, GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, aconnector->dc_sink);
- aconnector->base.funcs->reset(&aconnector->base);
- KUNIT_ASSERT_NOT_NULL(test, aconnector->base.state);
+
+ conn_state = aconnector->base.funcs->atomic_create_state(&aconnector->base);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ aconnector->base.state = conn_state;
/* connector->encoder left NULL. */
@@ -6278,4 +6296,5 @@ static void dm_test_restore_state_no_stream(struct kunit *test)
{
struct drm_device *drm = dm_test_alloc_drm(test);
+ struct drm_connector_state *conn_state;
struct amdgpu_dm_connector *aconnector;
struct dm_crtc_state *acrtc_state;
@@ -6287,5 +6306,9 @@ static void dm_test_restore_state_no_stream(struct kunit *test)
aconnector->dc_sink = kunit_kzalloc(test, 1, GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, aconnector->dc_sink);
- aconnector->base.funcs->reset(&aconnector->base);
+
+ conn_state = aconnector->base.funcs->atomic_create_state(&aconnector->base);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ aconnector->base.state = conn_state;
enc = kunit_kzalloc(test, sizeof(*enc), GFP_KERNEL);
@@ -6316,4 +6339,5 @@ static void dm_test_restore_state_same_sink(struct kunit *test)
{
struct drm_device *drm = dm_test_alloc_drm(test);
+ struct drm_connector_state *conn_state;
struct amdgpu_dm_connector *aconnector;
struct dm_crtc_state *acrtc_state;
@@ -6326,5 +6350,9 @@ static void dm_test_restore_state_same_sink(struct kunit *test)
aconnector->dc_sink = kunit_kzalloc(test, 1, GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, aconnector->dc_sink);
- aconnector->base.funcs->reset(&aconnector->base);
+
+ conn_state = aconnector->base.funcs->atomic_create_state(&aconnector->base);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ aconnector->base.state = conn_state;
enc = kunit_kzalloc(test, sizeof(*enc), GFP_KERNEL);
@@ -7033,4 +7061,5 @@ static void dm_test_mode_valid_force_on_no_stream(struct kunit *test)
struct dm_test_cvs_ctx *ctx =
dm_test_cvs_ctx_alloc(test, DRM_MODE_CONNECTOR_DisplayPort);
+ struct drm_connector_state *conn_state;
struct dc_sink *em_sink;
@@ -7045,6 +7074,8 @@ static void dm_test_mode_valid_force_on_no_stream(struct kunit *test)
* point at KUnit-managed memory.
*/
- amdgpu_dm_connector_funcs_reset(&ctx->aconnector->base);
- KUNIT_ASSERT_NOT_NULL(test, ctx->aconnector->base.state);
+ conn_state = amdgpu_dm_connector_atomic_create_state(&ctx->aconnector->base);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ ctx->aconnector->base.state = conn_state;
ctx->aconnector->base.state->max_requested_bpc = 4;
@@ -7560,4 +7591,5 @@ static void dm_test_update_after_detect_disconnect(struct kunit *test)
struct dc_sink *old_sink = dm_test_uad_owned_sink();
struct dc_crtc_timing *timing = kzalloc_obj(*timing, GFP_KERNEL);
+ struct drm_connector_state *conn_state;
KUNIT_ASSERT_NOT_NULL(test, old_sink);
@@ -7571,6 +7603,8 @@ static void dm_test_update_after_detect_disconnect(struct kunit *test)
ctx->link->local_sink = NULL;
- amdgpu_dm_connector_funcs_reset(&ctx->aconnector->base);
- KUNIT_ASSERT_NOT_NULL(test, ctx->aconnector->base.state);
+ conn_state = amdgpu_dm_connector_atomic_create_state(&ctx->aconnector->base);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ ctx->aconnector->base.state = conn_state;
ctx->aconnector->base.state->content_protection =
DRM_MODE_CONTENT_PROTECTION_ENABLED;
@@ -9200,4 +9234,5 @@ static struct dm_test_fs_caps_ctx *
dm_test_fs_caps_ctx_alloc(struct kunit *test, enum signal_type sink_signal)
{
+ struct drm_connector_state *conn_state;
struct dm_test_fs_caps_ctx *ctx;
struct dc_context *dc_ctx;
@@ -9225,6 +9260,9 @@ dm_test_fs_caps_ctx_alloc(struct kunit *test, enum signal_type sink_signal)
&dm_test_connector_funcs,
DRM_MODE_CONNECTOR_DisplayPort, NULL), 0);
- amdgpu_dm_connector_funcs_reset(&ctx->aconnector->base);
- KUNIT_ASSERT_NOT_NULL(test, ctx->aconnector->base.state);
+
+ conn_state = amdgpu_dm_connector_atomic_create_state(&ctx->aconnector->base);
+ KUNIT_ASSERT_NOT_ERR_OR_NULL(test, conn_state);
+
+ ctx->aconnector->base.state = conn_state;
KUNIT_ASSERT_EQ(test,
drm_connector_attach_vrr_capable_property(&ctx->aconnector->base), 0);
@@ -9631,5 +9669,5 @@ dm_test_force_dup_state_fail(struct drm_connector *connector)
static const struct drm_connector_funcs dm_test_force_fail_funcs = {
- .reset = amdgpu_dm_connector_funcs_reset,
+ .atomic_create_state = amdgpu_dm_connector_atomic_create_state,
.atomic_duplicate_state = dm_test_force_dup_state_fail,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
@@ -9848,8 +9886,8 @@ static struct kunit_case amdgpu_dm_connector_tests[] = {
KUNIT_CASE(dm_test_decide_crtc_timing_no_copy),
KUNIT_CASE(dm_test_decide_crtc_timing_no_crtc_clock),
- /* amdgpu_dm_connector_funcs_reset */
- KUNIT_CASE(dm_test_funcs_reset_sets_defaults),
- KUNIT_CASE(dm_test_funcs_reset_edp_abm_level),
- KUNIT_CASE(dm_test_funcs_reset_edp_abm_disabled),
+ /* amdgpu_dm_connector_atomic_create_state */
+ KUNIT_CASE(dm_test_atomic_create_sets_defaults),
+ KUNIT_CASE(dm_test_atomic_create_edp_abm_level),
+ KUNIT_CASE(dm_test_atomic_create_edp_abm_disabled),
/* amdgpu_dm_connector_atomic_duplicate_state */
KUNIT_CASE(dm_test_atomic_dup_state_copies_fields),
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 33/37] drm/i915: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
` (33 preceding siblings ...)
(?)
@ 2026-10-30 15:14 ` Maxime Ripard
-1 siblings, 0 replies; 55+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:14 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Jani Nikula, Joonas Lahtinen,
Rodrigo Vivi, Tvrtko Ursulin, intel-gfx, intel-xe
The i915 connector initialization uses
__drm_atomic_helper_connector_reset() to set up the initial state
during connector allocation. However, it only needs to initialize
the state, not reset it.
Switch to __drm_atomic_helper_connector_state_init() and assign
connector->state explicitly, matching what atomic_create_state
expects.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org
---
drivers/gpu/drm/i915/display/intel_connector.c | 6 ++++--
drivers/gpu/drm/i915/display/intel_sdvo.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_connector.c b/drivers/gpu/drm/i915/display/intel_connector.c
index 7ef9338d67ab..ed38959b466d 100644
--- a/drivers/gpu/drm/i915/display/intel_connector.c
+++ b/drivers/gpu/drm/i915/display/intel_connector.c
@@ -91,6 +91,8 @@ static int intel_connector_init(struct intel_connector *connector)
return -ENOMEM;
- __drm_atomic_helper_connector_reset(&connector->base,
- &conn_state->base);
+ __drm_atomic_helper_connector_state_init(&conn_state->base,
+ &connector->base);
+
+ connector->base.state = &conn_state->base;
intel_panel_init_alloc(connector);
diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c
index 3075ef04df56..7b97f531acbf 100644
--- a/drivers/gpu/drm/i915/display/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/display/intel_sdvo.c
@@ -2791,6 +2791,8 @@ static struct intel_sdvo_connector *intel_sdvo_connector_alloc(void)
}
- __drm_atomic_helper_connector_reset(&sdvo_connector->base.base,
- &conn_state->base.base);
+ __drm_atomic_helper_connector_state_init(&conn_state->base.base,
+ &sdvo_connector->base.base);
+
+ sdvo_connector->base.base.state = &conn_state->base.base;
intel_panel_init_alloc(&sdvo_connector->base);
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 34/37] drm/nouveau: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
@ 2026-10-30 15:14 ` Maxime Ripard
-1 siblings, 0 replies; 55+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:14 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Danilo Krummrich, nouveau
The nouveau connector reset implementation creates a custom state
subclass, but only initializes a pristine state and sets
driver-specific defaults without resetting any hardware. This is
equivalent to what atomic_create_state expects. Convert to it.
This is significantly harder than the other drivers though, since
pre-nv50 display doesn't support atomic modesetting. Instead, its
connectors keep their property state embedded in struct
nouveau_connector, and drm_connector.state is left NULL.
Thus, only the atomic path needs to be converted, with the embedded
state initialized at connector creation time for pre-nv50. Those
connectors are also given connector funcs without atomic_create_state:
the DRM core would otherwise install the embedded state into
drm_connector.state and eventually pass it to atomic_destroy_state,
which frees it.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Lyude Paul <lyude@redhat.com>
Cc: nouveau@lists.freedesktop.org
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 25 ++++--
drivers/gpu/drm/nouveau/nouveau_connector.c | 129 +++++++++++++++++++++-------
drivers/gpu/drm/nouveau/nouveau_connector.h | 3 +-
3 files changed, 119 insertions(+), 38 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index e91130f93db6..98a5188f6523 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1249,7 +1249,7 @@ nv50_mstc_destroy(struct drm_connector *connector)
static const struct drm_connector_funcs
nv50_mstc = {
- .reset = nouveau_conn_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = nv50_mstc_destroy,
+ .atomic_create_state = nouveau_conn_atomic_create_state,
.atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
.atomic_destroy_state = nouveau_conn_atomic_destroy_state,
@@ -1263,4 +1263,5 @@ nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port,
{
struct drm_device *dev = mstm->outp->base.base.dev;
+ struct drm_connector_state *conn_state;
struct drm_crtc *crtc;
struct nv50_mstc *mstc;
@@ -1274,13 +1275,16 @@ nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port,
ret = drm_connector_dynamic_init(dev, &mstc->connector, &nv50_mstc,
DRM_MODE_CONNECTOR_DisplayPort, NULL);
- if (ret) {
- kfree(*pmstc);
- *pmstc = NULL;
- return ret;
- }
+ if (ret)
+ goto err_free;
drm_connector_helper_add(&mstc->connector, &nv50_mstc_help);
- mstc->connector.funcs->reset(&mstc->connector);
+ conn_state = mstc->connector.funcs->atomic_create_state(&mstc->connector);
+ if (IS_ERR(conn_state)) {
+ ret = PTR_ERR(conn_state);
+ goto err_cleanup;
+ }
+ mstc->connector.state = conn_state;
+
nouveau_conn_attach_properties(&mstc->connector);
@@ -1298,4 +1302,11 @@ nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port,
drm_dp_mst_get_port_malloc(port);
return 0;
+
+err_cleanup:
+ drm_connector_cleanup(&mstc->connector);
+err_free:
+ kfree(*pmstc);
+ *pmstc = NULL;
+ return ret;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index cc3caf8de64b..e472c23c2981 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -243,23 +243,8 @@ nouveau_conn_atomic_duplicate_state(struct drm_connector *connector)
}
-void
-nouveau_conn_reset(struct drm_connector *connector)
+static void
+nouveau_conn_atom_init(struct drm_connector *connector,
+ struct nouveau_conn_atom *asyc)
{
- struct nouveau_connector *nv_connector = nouveau_connector(connector);
- struct nouveau_conn_atom *asyc;
-
- if (drm_drv_uses_atomic_modeset(connector->dev)) {
- if (WARN_ON(!(asyc = kzalloc_obj(*asyc))))
- return;
-
- if (connector->state)
- nouveau_conn_atomic_destroy_state(connector,
- connector->state);
-
- __drm_atomic_helper_connector_reset(connector, &asyc->state);
- } else {
- asyc = &nv_connector->properties_state;
- }
-
asyc->dither.mode = DITHERING_MODE_AUTO;
asyc->dither.depth = DITHERING_DEPTH_AUTO;
@@ -281,4 +266,19 @@ nouveau_conn_reset(struct drm_connector *connector)
}
+struct drm_connector_state *
+nouveau_conn_atomic_create_state(struct drm_connector *connector)
+{
+ struct nouveau_conn_atom *asyc;
+
+ asyc = kzalloc_obj(*asyc);
+ if (WARN_ON(!asyc))
+ return ERR_PTR(-ENOMEM);
+
+ __drm_atomic_helper_connector_state_init(&asyc->state, connector);
+ nouveau_conn_atom_init(connector, asyc);
+
+ return &asyc->state;
+}
+
void
nouveau_conn_attach_properties(struct drm_connector *connector)
@@ -1231,5 +1231,47 @@ static const struct drm_connector_funcs
nouveau_connector_funcs = {
.dpms = drm_helper_connector_dpms,
- .reset = nouveau_conn_reset,
+ .detect = nouveau_connector_detect,
+ .force = nouveau_connector_force,
+ .fill_modes = drm_helper_probe_single_connector_modes,
+ .set_property = nouveau_connector_set_property,
+ .destroy = nouveau_connector_destroy,
+ .atomic_create_state = nouveau_conn_atomic_create_state,
+ .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
+ .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
+ .atomic_set_property = nouveau_conn_atomic_set_property,
+ .atomic_get_property = nouveau_conn_atomic_get_property,
+ .late_register = nouveau_connector_late_register,
+ .early_unregister = nouveau_connector_early_unregister,
+};
+
+static const struct drm_connector_funcs
+nouveau_connector_funcs_lvds = {
+ .dpms = drm_helper_connector_dpms,
+ .detect = nouveau_connector_detect_lvds,
+ .force = nouveau_connector_force,
+ .fill_modes = drm_helper_probe_single_connector_modes,
+ .set_property = nouveau_connector_set_property,
+ .destroy = nouveau_connector_destroy,
+ .atomic_create_state = nouveau_conn_atomic_create_state,
+ .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
+ .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
+ .atomic_set_property = nouveau_conn_atomic_set_property,
+ .atomic_get_property = nouveau_conn_atomic_get_property,
+ .late_register = nouveau_connector_late_register,
+ .early_unregister = nouveau_connector_early_unregister,
+};
+
+/*
+ * Pre-nv50 doesn't support atomic modesetting: the connector property state
+ * lives in the embedded struct nouveau_connector.properties_state and
+ * drm_connector.state is left alone, as expected from a legacy driver.
+ *
+ * Those connectors must not expose atomic_create_state: the DRM core would
+ * then install the embedded state into drm_connector.state and eventually
+ * pass it to atomic_destroy_state, which frees it.
+ */
+static const struct drm_connector_funcs
+nouveau_connector_funcs_legacy = {
+ .dpms = drm_helper_connector_dpms,
.detect = nouveau_connector_detect,
.force = nouveau_connector_force,
@@ -1246,7 +1288,6 @@ nouveau_connector_funcs = {
static const struct drm_connector_funcs
-nouveau_connector_funcs_lvds = {
+nouveau_connector_funcs_lvds_legacy = {
.dpms = drm_helper_connector_dpms,
- .reset = nouveau_conn_reset,
.detect = nouveau_connector_detect_lvds,
.force = nouveau_connector_force,
@@ -1362,5 +1403,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
struct nouveau_display *disp = nouveau_display(dev);
struct nouveau_connector *nv_connector = NULL;
+ struct drm_connector_state *conn_state;
struct drm_connector *connector;
+ const struct drm_connector_funcs *funcs;
struct drm_connector_list_iter conn_iter;
int type, ret = 0;
@@ -1459,8 +1502,17 @@ nouveau_connector_create(struct drm_device *dev, int index)
type = drm_conntype_from_dcb(nv_connector->type);
- if (type == DRM_MODE_CONNECTOR_LVDS)
- drm_connector_init(dev, connector, &nouveau_connector_funcs_lvds, type);
- else
- drm_connector_init(dev, connector, &nouveau_connector_funcs, type);
+ if (type == DRM_MODE_CONNECTOR_LVDS) {
+ if (drm_drv_uses_atomic_modeset(dev))
+ funcs = &nouveau_connector_funcs_lvds;
+ else
+ funcs = &nouveau_connector_funcs_lvds_legacy;
+ } else {
+ if (drm_drv_uses_atomic_modeset(dev))
+ funcs = &nouveau_connector_funcs;
+ else
+ funcs = &nouveau_connector_funcs_legacy;
+ }
+
+ drm_connector_init(dev, connector, funcs, type);
switch (type) {
@@ -1514,13 +1566,26 @@ nouveau_connector_create(struct drm_device *dev, int index)
nouveau_connector_irq, NVIF_CONN_EVENT_V0_IRQ,
&nv_connector->irq);
- if (ret) {
- nvif_event_dtor(&nv_connector->hpd);
- nvif_conn_dtor(&nv_connector->conn);
+ if (ret)
goto drm_conn_err;
- }
}
}
- connector->funcs->reset(connector);
+ if (drm_drv_uses_atomic_modeset(dev)) {
+ conn_state = connector->funcs->atomic_create_state(connector);
+ if (IS_ERR(conn_state)) {
+ ret = PTR_ERR(conn_state);
+ goto drm_conn_err;
+ }
+ connector->state = conn_state;
+ } else {
+ /* Pre-nv50 keeps its property state embedded in struct
+ * nouveau_connector: drm_connector.state must remain NULL,
+ * the DRM core expects legacy drivers to use
+ * drm_connector.encoder.
+ */
+ nouveau_conn_atom_init(connector,
+ &nv_connector->properties_state);
+ }
+
nouveau_conn_attach_properties(connector);
@@ -1567,4 +1632,8 @@ nouveau_connector_create(struct drm_device *dev, int index)
drm_conn_err:
+ nvif_event_dtor(&nv_connector->irq);
+ nvif_event_dtor(&nv_connector->hpd);
+ cancel_work_sync(&nv_connector->irq_work);
+ nvif_conn_dtor(&nv_connector->conn);
drm_connector_cleanup(connector);
kfree(nv_connector);
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h
index eb292d2ba4bc..02f843648eb8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.h
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.h
@@ -217,5 +217,6 @@ extern int nouveau_hdmimhz;
void nouveau_conn_attach_properties(struct drm_connector *);
-void nouveau_conn_reset(struct drm_connector *);
+struct drm_connector_state *
+nouveau_conn_atomic_create_state(struct drm_connector *);
struct drm_connector_state *
nouveau_conn_atomic_duplicate_state(struct drm_connector *);
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 34/37] drm/nouveau: Convert to atomic_create_state
@ 2026-10-30 15:14 ` Maxime Ripard
0 siblings, 0 replies; 55+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:14 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Danilo Krummrich, Lyude Paul, nouveau
The nouveau connector reset implementation creates a custom state
subclass, but only initializes a pristine state and sets
driver-specific defaults without resetting any hardware. This is
equivalent to what atomic_create_state expects. Convert to it.
This is significantly harder than the other drivers though, since
pre-nv50 display doesn't support atomic modesetting. Instead, its
connectors keep their property state embedded in struct
nouveau_connector, and drm_connector.state is left NULL.
Thus, only the atomic path needs to be converted, with the embedded
state initialized at connector creation time for pre-nv50. Those
connectors are also given connector funcs without atomic_create_state:
the DRM core would otherwise install the embedded state into
drm_connector.state and eventually pass it to atomic_destroy_state,
which frees it.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Danilo Krummrich <dakr@kernel.org>
Cc: Lyude Paul <lyude@redhat.com>
Cc: nouveau@lists.freedesktop.org
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 25 ++++--
drivers/gpu/drm/nouveau/nouveau_connector.c | 129 +++++++++++++++++++++-------
drivers/gpu/drm/nouveau/nouveau_connector.h | 3 +-
3 files changed, 119 insertions(+), 38 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index e91130f93db6..98a5188f6523 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1249,7 +1249,7 @@ nv50_mstc_destroy(struct drm_connector *connector)
static const struct drm_connector_funcs
nv50_mstc = {
- .reset = nouveau_conn_reset,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = nv50_mstc_destroy,
+ .atomic_create_state = nouveau_conn_atomic_create_state,
.atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
.atomic_destroy_state = nouveau_conn_atomic_destroy_state,
@@ -1263,4 +1263,5 @@ nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port,
{
struct drm_device *dev = mstm->outp->base.base.dev;
+ struct drm_connector_state *conn_state;
struct drm_crtc *crtc;
struct nv50_mstc *mstc;
@@ -1274,13 +1275,16 @@ nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port,
ret = drm_connector_dynamic_init(dev, &mstc->connector, &nv50_mstc,
DRM_MODE_CONNECTOR_DisplayPort, NULL);
- if (ret) {
- kfree(*pmstc);
- *pmstc = NULL;
- return ret;
- }
+ if (ret)
+ goto err_free;
drm_connector_helper_add(&mstc->connector, &nv50_mstc_help);
- mstc->connector.funcs->reset(&mstc->connector);
+ conn_state = mstc->connector.funcs->atomic_create_state(&mstc->connector);
+ if (IS_ERR(conn_state)) {
+ ret = PTR_ERR(conn_state);
+ goto err_cleanup;
+ }
+ mstc->connector.state = conn_state;
+
nouveau_conn_attach_properties(&mstc->connector);
@@ -1298,4 +1302,11 @@ nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port,
drm_dp_mst_get_port_malloc(port);
return 0;
+
+err_cleanup:
+ drm_connector_cleanup(&mstc->connector);
+err_free:
+ kfree(*pmstc);
+ *pmstc = NULL;
+ return ret;
}
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index cc3caf8de64b..e472c23c2981 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -243,23 +243,8 @@ nouveau_conn_atomic_duplicate_state(struct drm_connector *connector)
}
-void
-nouveau_conn_reset(struct drm_connector *connector)
+static void
+nouveau_conn_atom_init(struct drm_connector *connector,
+ struct nouveau_conn_atom *asyc)
{
- struct nouveau_connector *nv_connector = nouveau_connector(connector);
- struct nouveau_conn_atom *asyc;
-
- if (drm_drv_uses_atomic_modeset(connector->dev)) {
- if (WARN_ON(!(asyc = kzalloc_obj(*asyc))))
- return;
-
- if (connector->state)
- nouveau_conn_atomic_destroy_state(connector,
- connector->state);
-
- __drm_atomic_helper_connector_reset(connector, &asyc->state);
- } else {
- asyc = &nv_connector->properties_state;
- }
-
asyc->dither.mode = DITHERING_MODE_AUTO;
asyc->dither.depth = DITHERING_DEPTH_AUTO;
@@ -281,4 +266,19 @@ nouveau_conn_reset(struct drm_connector *connector)
}
+struct drm_connector_state *
+nouveau_conn_atomic_create_state(struct drm_connector *connector)
+{
+ struct nouveau_conn_atom *asyc;
+
+ asyc = kzalloc_obj(*asyc);
+ if (WARN_ON(!asyc))
+ return ERR_PTR(-ENOMEM);
+
+ __drm_atomic_helper_connector_state_init(&asyc->state, connector);
+ nouveau_conn_atom_init(connector, asyc);
+
+ return &asyc->state;
+}
+
void
nouveau_conn_attach_properties(struct drm_connector *connector)
@@ -1231,5 +1231,47 @@ static const struct drm_connector_funcs
nouveau_connector_funcs = {
.dpms = drm_helper_connector_dpms,
- .reset = nouveau_conn_reset,
+ .detect = nouveau_connector_detect,
+ .force = nouveau_connector_force,
+ .fill_modes = drm_helper_probe_single_connector_modes,
+ .set_property = nouveau_connector_set_property,
+ .destroy = nouveau_connector_destroy,
+ .atomic_create_state = nouveau_conn_atomic_create_state,
+ .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
+ .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
+ .atomic_set_property = nouveau_conn_atomic_set_property,
+ .atomic_get_property = nouveau_conn_atomic_get_property,
+ .late_register = nouveau_connector_late_register,
+ .early_unregister = nouveau_connector_early_unregister,
+};
+
+static const struct drm_connector_funcs
+nouveau_connector_funcs_lvds = {
+ .dpms = drm_helper_connector_dpms,
+ .detect = nouveau_connector_detect_lvds,
+ .force = nouveau_connector_force,
+ .fill_modes = drm_helper_probe_single_connector_modes,
+ .set_property = nouveau_connector_set_property,
+ .destroy = nouveau_connector_destroy,
+ .atomic_create_state = nouveau_conn_atomic_create_state,
+ .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
+ .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
+ .atomic_set_property = nouveau_conn_atomic_set_property,
+ .atomic_get_property = nouveau_conn_atomic_get_property,
+ .late_register = nouveau_connector_late_register,
+ .early_unregister = nouveau_connector_early_unregister,
+};
+
+/*
+ * Pre-nv50 doesn't support atomic modesetting: the connector property state
+ * lives in the embedded struct nouveau_connector.properties_state and
+ * drm_connector.state is left alone, as expected from a legacy driver.
+ *
+ * Those connectors must not expose atomic_create_state: the DRM core would
+ * then install the embedded state into drm_connector.state and eventually
+ * pass it to atomic_destroy_state, which frees it.
+ */
+static const struct drm_connector_funcs
+nouveau_connector_funcs_legacy = {
+ .dpms = drm_helper_connector_dpms,
.detect = nouveau_connector_detect,
.force = nouveau_connector_force,
@@ -1246,7 +1288,6 @@ nouveau_connector_funcs = {
static const struct drm_connector_funcs
-nouveau_connector_funcs_lvds = {
+nouveau_connector_funcs_lvds_legacy = {
.dpms = drm_helper_connector_dpms,
- .reset = nouveau_conn_reset,
.detect = nouveau_connector_detect_lvds,
.force = nouveau_connector_force,
@@ -1362,5 +1403,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
struct nouveau_display *disp = nouveau_display(dev);
struct nouveau_connector *nv_connector = NULL;
+ struct drm_connector_state *conn_state;
struct drm_connector *connector;
+ const struct drm_connector_funcs *funcs;
struct drm_connector_list_iter conn_iter;
int type, ret = 0;
@@ -1459,8 +1502,17 @@ nouveau_connector_create(struct drm_device *dev, int index)
type = drm_conntype_from_dcb(nv_connector->type);
- if (type == DRM_MODE_CONNECTOR_LVDS)
- drm_connector_init(dev, connector, &nouveau_connector_funcs_lvds, type);
- else
- drm_connector_init(dev, connector, &nouveau_connector_funcs, type);
+ if (type == DRM_MODE_CONNECTOR_LVDS) {
+ if (drm_drv_uses_atomic_modeset(dev))
+ funcs = &nouveau_connector_funcs_lvds;
+ else
+ funcs = &nouveau_connector_funcs_lvds_legacy;
+ } else {
+ if (drm_drv_uses_atomic_modeset(dev))
+ funcs = &nouveau_connector_funcs;
+ else
+ funcs = &nouveau_connector_funcs_legacy;
+ }
+
+ drm_connector_init(dev, connector, funcs, type);
switch (type) {
@@ -1514,13 +1566,26 @@ nouveau_connector_create(struct drm_device *dev, int index)
nouveau_connector_irq, NVIF_CONN_EVENT_V0_IRQ,
&nv_connector->irq);
- if (ret) {
- nvif_event_dtor(&nv_connector->hpd);
- nvif_conn_dtor(&nv_connector->conn);
+ if (ret)
goto drm_conn_err;
- }
}
}
- connector->funcs->reset(connector);
+ if (drm_drv_uses_atomic_modeset(dev)) {
+ conn_state = connector->funcs->atomic_create_state(connector);
+ if (IS_ERR(conn_state)) {
+ ret = PTR_ERR(conn_state);
+ goto drm_conn_err;
+ }
+ connector->state = conn_state;
+ } else {
+ /* Pre-nv50 keeps its property state embedded in struct
+ * nouveau_connector: drm_connector.state must remain NULL,
+ * the DRM core expects legacy drivers to use
+ * drm_connector.encoder.
+ */
+ nouveau_conn_atom_init(connector,
+ &nv_connector->properties_state);
+ }
+
nouveau_conn_attach_properties(connector);
@@ -1567,4 +1632,8 @@ nouveau_connector_create(struct drm_device *dev, int index)
drm_conn_err:
+ nvif_event_dtor(&nv_connector->irq);
+ nvif_event_dtor(&nv_connector->hpd);
+ cancel_work_sync(&nv_connector->irq_work);
+ nvif_conn_dtor(&nv_connector->conn);
drm_connector_cleanup(connector);
kfree(nv_connector);
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h
index eb292d2ba4bc..02f843648eb8 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.h
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.h
@@ -217,5 +217,6 @@ extern int nouveau_hdmimhz;
void nouveau_conn_attach_properties(struct drm_connector *);
-void nouveau_conn_reset(struct drm_connector *);
+struct drm_connector_state *
+nouveau_conn_atomic_create_state(struct drm_connector *);
struct drm_connector_state *
nouveau_conn_atomic_duplicate_state(struct drm_connector *);
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 35/37] drm/tegra: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
` (35 preceding siblings ...)
(?)
@ 2026-10-30 15:14 ` Maxime Ripard
-1 siblings, 0 replies; 55+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:14 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Jonathan Hunter, Mikko Perttunen,
Thierry Reding, linux-tegra
The tegra DSI and SOR connector reset implementations create custom
state subclasses, but only initialize a pristine state without resetting
any hardware. This is equivalent to what atomic_create_state expects.
Convert to it.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: Mikko Perttunen <mperttunen@nvidia.com>
Cc: Thierry Reding <thierry.reding@kernel.org>
Cc: linux-tegra@vger.kernel.org
---
drivers/gpu/drm/tegra/dsi.c | 17 ++++++++---------
drivers/gpu/drm/tegra/sor.c | 13 +++++--------
2 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index 7b595310e737..206405770071 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -786,17 +786,16 @@ static void tegra_dsi_soft_reset(struct tegra_dsi *dsi)
}
-static void tegra_dsi_connector_reset(struct drm_connector *connector)
+static struct drm_connector_state *
+tegra_dsi_connector_create_state(struct drm_connector *connector)
{
- struct tegra_dsi_state *state = kzalloc_obj(*state);
+ struct tegra_dsi_state *state;
+ state = kzalloc_obj(*state);
if (!state)
- return;
+ return ERR_PTR(-ENOMEM);
- if (connector->state) {
- __drm_atomic_helper_connector_destroy_state(connector->state);
- kfree(connector->state);
- }
+ __drm_atomic_helper_connector_state_init(&state->base, connector);
- __drm_atomic_helper_connector_reset(connector, &state->base);
+ return &state->base;
}
@@ -818,8 +817,8 @@ tegra_dsi_connector_duplicate_state(struct drm_connector *connector)
static const struct drm_connector_funcs tegra_dsi_connector_funcs = {
- .reset = tegra_dsi_connector_reset,
.detect = tegra_output_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = tegra_output_connector_destroy,
+ .atomic_create_state = tegra_dsi_connector_create_state,
.atomic_duplicate_state = tegra_dsi_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
index e384cbd0cbf7..16a5ecefbe4f 100644
--- a/drivers/gpu/drm/tegra/sor.c
+++ b/drivers/gpu/drm/tegra/sor.c
@@ -1721,5 +1721,5 @@ static void tegra_sor_early_unregister(struct drm_connector *connector)
}
-static void tegra_sor_connector_reset(struct drm_connector *connector)
+static struct drm_connector_state *tegra_sor_connector_create_state(struct drm_connector *connector)
{
struct tegra_sor_state *state;
@@ -1727,12 +1727,9 @@ static void tegra_sor_connector_reset(struct drm_connector *connector)
state = kzalloc_obj(*state);
if (!state)
- return;
+ return ERR_PTR(-ENOMEM);
- if (connector->state) {
- __drm_atomic_helper_connector_destroy_state(connector->state);
- kfree(connector->state);
- }
+ __drm_atomic_helper_connector_state_init(&state->base, connector);
- __drm_atomic_helper_connector_reset(connector, &state->base);
+ return &state->base;
}
@@ -1765,8 +1762,8 @@ tegra_sor_connector_duplicate_state(struct drm_connector *connector)
static const struct drm_connector_funcs tegra_sor_connector_funcs = {
- .reset = tegra_sor_connector_reset,
.detect = tegra_sor_connector_detect,
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = tegra_output_connector_destroy,
+ .atomic_create_state = tegra_sor_connector_create_state,
.atomic_duplicate_state = tegra_sor_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 36/37] drm/connector: Remove __drm_atomic_helper_connector_reset()
2026-10-30 15:13 ` Maxime Ripard
` (36 preceding siblings ...)
(?)
@ 2026-10-30 15:14 ` Maxime Ripard
-1 siblings, 0 replies; 55+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:14 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
All drivers implementing the connector reset hook using
__drm_atomic_helper_connector_reset() have been converted to
atomic_create_state.
Remove __drm_atomic_helper_connector_reset().
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/drm_atomic_state_helper.c | 23 -----------------------
include/drm/drm_atomic_state_helper.h | 2 --
include/drm/drm_connector.h | 3 ---
3 files changed, 28 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
index 5efda28bb2b0..267f44330629 100644
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
@@ -413,27 +413,4 @@ __drm_atomic_helper_connector_state_init(struct drm_connector_state *conn_state,
EXPORT_SYMBOL(__drm_atomic_helper_connector_state_init);
-/**
- * __drm_atomic_helper_connector_reset - reset state on connector
- * @connector: drm connector
- * @conn_state: connector state to assign
- *
- * Initializes the newly allocated @conn_state and assigns it to
- * the &drm_connector->state pointer of @connector, usually required when
- * initializing the drivers or when called from the &drm_connector_funcs.reset
- * hook.
- *
- * This is useful for drivers that subclass the connector state.
- */
-void
-__drm_atomic_helper_connector_reset(struct drm_connector *connector,
- struct drm_connector_state *conn_state)
-{
- if (conn_state)
- __drm_atomic_helper_connector_state_init(conn_state, connector);
-
- connector->state = conn_state;
-}
-EXPORT_SYMBOL(__drm_atomic_helper_connector_reset);
-
/**
* drm_atomic_helper_connector_create_state - default &drm_connector_funcs.atomic_create_state hook for connectors
diff --git a/include/drm/drm_atomic_state_helper.h b/include/drm/drm_atomic_state_helper.h
index 7bced7e9d860..1a822179f2ec 100644
--- a/include/drm/drm_atomic_state_helper.h
+++ b/include/drm/drm_atomic_state_helper.h
@@ -67,6 +67,4 @@ void drm_atomic_helper_plane_destroy_state(struct drm_plane *plane,
void __drm_atomic_helper_connector_state_init(struct drm_connector_state *conn_state,
struct drm_connector *connector);
-void __drm_atomic_helper_connector_reset(struct drm_connector *connector,
- struct drm_connector_state *conn_state);
struct drm_connector_state *
drm_atomic_helper_connector_create_state(struct drm_connector *connector);
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 8b52360339e0..a87cd13d0a45 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1665,7 +1665,4 @@ struct drm_connector_funcs {
* called by the core directly, only through drm_mode_config_reset().
* It's not a helper hook only for historical reasons.
- *
- * Atomic drivers can use __drm_atomic_helper_connector_reset() to reset
- * atomic state using this hook.
*/
void (*reset)(struct drm_connector *connector);
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* [PATCH v3 37/37] drm/connector: Remove reset
2026-10-30 15:13 ` Maxime Ripard
` (37 preceding siblings ...)
(?)
@ 2026-10-30 15:14 ` Maxime Ripard
-1 siblings, 0 replies; 55+ messages in thread
From: Maxime Ripard @ 2026-10-30 15:14 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
All the drivers that used to implement the reset hook have been
converted to use atomic_create_state instead.
Remove the reset hook from drm_connector_funcs, and the code calling
it in drm_mode_config_reset(), drmm_connector_hdmi_init() and
panel_bridge_attach().
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/drm_connector.c | 8 --------
drivers/gpu/drm/drm_mode_config.c | 4 +---
drivers/gpu/drm/drm_panel.c | 2 --
include/drm/drm_connector.h | 9 ---------
4 files changed, 1 insertion(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 893716a9e489..d66188521881 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -663,8 +663,4 @@ int drmm_connector_hdmi_init(struct drm_device *dev,
connector->state = state;
- } else if (connector->funcs->reset) {
- connector->funcs->reset(connector);
- if (!connector->state)
- return -ENOMEM;
}
@@ -771,8 +767,4 @@ int drmm_connector_hdmi_ini2(struct drm_device *dev,
connector->state = state;
- } else if (connector->funcs->reset) {
- connector->funcs->reset(connector);
- if (!connector->state)
- return -ENOMEM;
}
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index 48a56f23dadb..c1e993a78702 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -316,7 +316,5 @@ void drm_mode_config_reset(struct drm_device *dev)
drm_connector_list_iter_begin(dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
- if (connector->funcs->reset)
- connector->funcs->reset(connector);
- else if (connector->funcs->atomic_create_state)
+ if (connector->funcs->atomic_create_state)
drm_mode_config_connector_reset_with_create_state(connector);
}
diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
index 760f074f947e..c70f09a7e3e1 100644
--- a/drivers/gpu/drm/drm_panel.c
+++ b/drivers/gpu/drm/drm_panel.c
@@ -115,6 +115,4 @@ static int panel_bridge_attach(struct drm_bridge *bridge,
connector->state = conn_state;
- } else if (connector->funcs->reset) {
- connector->funcs->reset(connector);
}
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index a87cd13d0a45..f656ed8324d3 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1659,13 +1659,4 @@ struct drm_connector_funcs {
int (*dpms)(struct drm_connector *connector, int mode);
- /**
- * @reset:
- *
- * Reset connector hardware and software state to off. This function isn't
- * called by the core directly, only through drm_mode_config_reset().
- * It's not a helper hook only for historical reasons.
- */
- void (*reset)(struct drm_connector *connector);
-
/**
* @detect:
--
2.55.0
^ permalink raw reply related [flat|nested] 55+ messages in thread
* Re: [PATCH v3 27/37] drm/meson: Convert to atomic_create_state
2026-10-30 15:13 ` Maxime Ripard
@ 2026-10-31 21:20 ` Martin Blumenstingl
-1 siblings, 0 replies; 55+ messages in thread
From: Martin Blumenstingl @ 2026-10-31 21:20 UTC (permalink / raw)
To: Maxime Ripard
Cc: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter,
dri-devel, Jerome Brunet, Kevin Hilman, linux-amlogic
On Fri, Oct 30, 2026 at 4:15 PM Maxime Ripard <mripard@kernel.org> wrote:
>
> The meson HDMI encoder calls drm_atomic_helper_connector_reset()
> during connector creation to allocate an initial connector state
> needed by drm_connector_attach_max_bpc_property(). However, the
> driver only needs to allocate a pristine state, which is exactly
> what atomic_create_state provides.
>
> Convert to drm_atomic_helper_connector_create_state() with proper
> error handling.
>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 55+ messages in thread
* Re: [PATCH v3 27/37] drm/meson: Convert to atomic_create_state
@ 2026-10-31 21:20 ` Martin Blumenstingl
0 siblings, 0 replies; 55+ messages in thread
From: Martin Blumenstingl @ 2026-10-31 21:20 UTC (permalink / raw)
To: Maxime Ripard
Cc: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter,
dri-devel, Jerome Brunet, Kevin Hilman, linux-amlogic
On Fri, Oct 30, 2026 at 4:15 PM Maxime Ripard <mripard@kernel.org> wrote:
>
> The meson HDMI encoder calls drm_atomic_helper_connector_reset()
> during connector creation to allocate an initial connector state
> needed by drm_connector_attach_max_bpc_property(). However, the
> driver only needs to allocate a pristine state, which is exactly
> what atomic_create_state provides.
>
> Convert to drm_atomic_helper_connector_create_state() with proper
> error handling.
>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
^ permalink raw reply [flat|nested] 55+ messages in thread
* Re: [PATCH v3 34/37] drm/nouveau: Convert to atomic_create_state
2026-10-30 15:14 ` Maxime Ripard
@ 2026-11-02 8:36 ` Thomas Zimmermann
-1 siblings, 0 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2026-11-02 8:36 UTC (permalink / raw)
To: Maxime Ripard, Maarten Lankhorst, David Airlie, Simona Vetter
Cc: dri-devel, Danilo Krummrich, nouveau
Hi
Am 30.10.26 um 16:14 schrieb Maxime Ripard:
[...]
> +struct drm_connector_state *
> +nouveau_conn_atomic_create_state(struct drm_connector *connector)
> +{
> + struct nouveau_conn_atom *asyc;
> +
> + asyc = kzalloc_obj(*asyc);
> + if (WARN_ON(!asyc))
Since you're here anyway, please use drm_WARN_ON_ONCE(). Plain WARN_ON()
doesn't seem a good fir here.
Best regards
Thomas
> + return ERR_PTR(-ENOMEM);
> +
> + __drm_atomic_helper_connector_state_init(&asyc->state, connector);
> + nouveau_conn_atom_init(connector, asyc);
> +
> + return &asyc->state;
> +}
> +
> void
> nouveau_conn_attach_properties(struct drm_connector *connector)
> @@ -1231,5 +1231,47 @@ static const struct drm_connector_funcs
> nouveau_connector_funcs = {
> .dpms = drm_helper_connector_dpms,
> - .reset = nouveau_conn_reset,
> + .detect = nouveau_connector_detect,
> + .force = nouveau_connector_force,
> + .fill_modes = drm_helper_probe_single_connector_modes,
> + .set_property = nouveau_connector_set_property,
> + .destroy = nouveau_connector_destroy,
> + .atomic_create_state = nouveau_conn_atomic_create_state,
> + .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
> + .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
> + .atomic_set_property = nouveau_conn_atomic_set_property,
> + .atomic_get_property = nouveau_conn_atomic_get_property,
> + .late_register = nouveau_connector_late_register,
> + .early_unregister = nouveau_connector_early_unregister,
> +};
> +
> +static const struct drm_connector_funcs
> +nouveau_connector_funcs_lvds = {
> + .dpms = drm_helper_connector_dpms,
> + .detect = nouveau_connector_detect_lvds,
> + .force = nouveau_connector_force,
> + .fill_modes = drm_helper_probe_single_connector_modes,
> + .set_property = nouveau_connector_set_property,
> + .destroy = nouveau_connector_destroy,
> + .atomic_create_state = nouveau_conn_atomic_create_state,
> + .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
> + .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
> + .atomic_set_property = nouveau_conn_atomic_set_property,
> + .atomic_get_property = nouveau_conn_atomic_get_property,
> + .late_register = nouveau_connector_late_register,
> + .early_unregister = nouveau_connector_early_unregister,
> +};
> +
> +/*
> + * Pre-nv50 doesn't support atomic modesetting: the connector property state
> + * lives in the embedded struct nouveau_connector.properties_state and
> + * drm_connector.state is left alone, as expected from a legacy driver.
> + *
> + * Those connectors must not expose atomic_create_state: the DRM core would
> + * then install the embedded state into drm_connector.state and eventually
> + * pass it to atomic_destroy_state, which frees it.
> + */
> +static const struct drm_connector_funcs
> +nouveau_connector_funcs_legacy = {
> + .dpms = drm_helper_connector_dpms,
> .detect = nouveau_connector_detect,
> .force = nouveau_connector_force,
> @@ -1246,7 +1288,6 @@ nouveau_connector_funcs = {
>
> static const struct drm_connector_funcs
> -nouveau_connector_funcs_lvds = {
> +nouveau_connector_funcs_lvds_legacy = {
> .dpms = drm_helper_connector_dpms,
> - .reset = nouveau_conn_reset,
> .detect = nouveau_connector_detect_lvds,
> .force = nouveau_connector_force,
> @@ -1362,5 +1403,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
> struct nouveau_display *disp = nouveau_display(dev);
> struct nouveau_connector *nv_connector = NULL;
> + struct drm_connector_state *conn_state;
> struct drm_connector *connector;
> + const struct drm_connector_funcs *funcs;
> struct drm_connector_list_iter conn_iter;
> int type, ret = 0;
> @@ -1459,8 +1502,17 @@ nouveau_connector_create(struct drm_device *dev, int index)
>
> type = drm_conntype_from_dcb(nv_connector->type);
> - if (type == DRM_MODE_CONNECTOR_LVDS)
> - drm_connector_init(dev, connector, &nouveau_connector_funcs_lvds, type);
> - else
> - drm_connector_init(dev, connector, &nouveau_connector_funcs, type);
> + if (type == DRM_MODE_CONNECTOR_LVDS) {
> + if (drm_drv_uses_atomic_modeset(dev))
> + funcs = &nouveau_connector_funcs_lvds;
> + else
> + funcs = &nouveau_connector_funcs_lvds_legacy;
> + } else {
> + if (drm_drv_uses_atomic_modeset(dev))
> + funcs = &nouveau_connector_funcs;
> + else
> + funcs = &nouveau_connector_funcs_legacy;
> + }
> +
> + drm_connector_init(dev, connector, funcs, type);
>
> switch (type) {
> @@ -1514,13 +1566,26 @@ nouveau_connector_create(struct drm_device *dev, int index)
> nouveau_connector_irq, NVIF_CONN_EVENT_V0_IRQ,
> &nv_connector->irq);
> - if (ret) {
> - nvif_event_dtor(&nv_connector->hpd);
> - nvif_conn_dtor(&nv_connector->conn);
> + if (ret)
> goto drm_conn_err;
> - }
> }
> }
>
> - connector->funcs->reset(connector);
> + if (drm_drv_uses_atomic_modeset(dev)) {
> + conn_state = connector->funcs->atomic_create_state(connector);
> + if (IS_ERR(conn_state)) {
> + ret = PTR_ERR(conn_state);
> + goto drm_conn_err;
> + }
> + connector->state = conn_state;
> + } else {
> + /* Pre-nv50 keeps its property state embedded in struct
> + * nouveau_connector: drm_connector.state must remain NULL,
> + * the DRM core expects legacy drivers to use
> + * drm_connector.encoder.
> + */
> + nouveau_conn_atom_init(connector,
> + &nv_connector->properties_state);
> + }
> +
> nouveau_conn_attach_properties(connector);
>
> @@ -1567,4 +1632,8 @@ nouveau_connector_create(struct drm_device *dev, int index)
>
> drm_conn_err:
> + nvif_event_dtor(&nv_connector->irq);
> + nvif_event_dtor(&nv_connector->hpd);
> + cancel_work_sync(&nv_connector->irq_work);
> + nvif_conn_dtor(&nv_connector->conn);
> drm_connector_cleanup(connector);
> kfree(nv_connector);
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h
> index eb292d2ba4bc..02f843648eb8 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.h
> @@ -217,5 +217,6 @@ extern int nouveau_hdmimhz;
>
> void nouveau_conn_attach_properties(struct drm_connector *);
> -void nouveau_conn_reset(struct drm_connector *);
> +struct drm_connector_state *
> +nouveau_conn_atomic_create_state(struct drm_connector *);
> struct drm_connector_state *
> nouveau_conn_atomic_duplicate_state(struct drm_connector *);
>
--
--
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] 55+ messages in thread
* Re: [PATCH v3 34/37] drm/nouveau: Convert to atomic_create_state
@ 2026-11-02 8:36 ` Thomas Zimmermann
0 siblings, 0 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2026-11-02 8:36 UTC (permalink / raw)
To: Maxime Ripard, Maarten Lankhorst, David Airlie, Simona Vetter
Cc: dri-devel, Danilo Krummrich, Lyude Paul, nouveau
Hi
Am 30.10.26 um 16:14 schrieb Maxime Ripard:
[...]
> +struct drm_connector_state *
> +nouveau_conn_atomic_create_state(struct drm_connector *connector)
> +{
> + struct nouveau_conn_atom *asyc;
> +
> + asyc = kzalloc_obj(*asyc);
> + if (WARN_ON(!asyc))
Since you're here anyway, please use drm_WARN_ON_ONCE(). Plain WARN_ON()
doesn't seem a good fir here.
Best regards
Thomas
> + return ERR_PTR(-ENOMEM);
> +
> + __drm_atomic_helper_connector_state_init(&asyc->state, connector);
> + nouveau_conn_atom_init(connector, asyc);
> +
> + return &asyc->state;
> +}
> +
> void
> nouveau_conn_attach_properties(struct drm_connector *connector)
> @@ -1231,5 +1231,47 @@ static const struct drm_connector_funcs
> nouveau_connector_funcs = {
> .dpms = drm_helper_connector_dpms,
> - .reset = nouveau_conn_reset,
> + .detect = nouveau_connector_detect,
> + .force = nouveau_connector_force,
> + .fill_modes = drm_helper_probe_single_connector_modes,
> + .set_property = nouveau_connector_set_property,
> + .destroy = nouveau_connector_destroy,
> + .atomic_create_state = nouveau_conn_atomic_create_state,
> + .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
> + .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
> + .atomic_set_property = nouveau_conn_atomic_set_property,
> + .atomic_get_property = nouveau_conn_atomic_get_property,
> + .late_register = nouveau_connector_late_register,
> + .early_unregister = nouveau_connector_early_unregister,
> +};
> +
> +static const struct drm_connector_funcs
> +nouveau_connector_funcs_lvds = {
> + .dpms = drm_helper_connector_dpms,
> + .detect = nouveau_connector_detect_lvds,
> + .force = nouveau_connector_force,
> + .fill_modes = drm_helper_probe_single_connector_modes,
> + .set_property = nouveau_connector_set_property,
> + .destroy = nouveau_connector_destroy,
> + .atomic_create_state = nouveau_conn_atomic_create_state,
> + .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
> + .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
> + .atomic_set_property = nouveau_conn_atomic_set_property,
> + .atomic_get_property = nouveau_conn_atomic_get_property,
> + .late_register = nouveau_connector_late_register,
> + .early_unregister = nouveau_connector_early_unregister,
> +};
> +
> +/*
> + * Pre-nv50 doesn't support atomic modesetting: the connector property state
> + * lives in the embedded struct nouveau_connector.properties_state and
> + * drm_connector.state is left alone, as expected from a legacy driver.
> + *
> + * Those connectors must not expose atomic_create_state: the DRM core would
> + * then install the embedded state into drm_connector.state and eventually
> + * pass it to atomic_destroy_state, which frees it.
> + */
> +static const struct drm_connector_funcs
> +nouveau_connector_funcs_legacy = {
> + .dpms = drm_helper_connector_dpms,
> .detect = nouveau_connector_detect,
> .force = nouveau_connector_force,
> @@ -1246,7 +1288,6 @@ nouveau_connector_funcs = {
>
> static const struct drm_connector_funcs
> -nouveau_connector_funcs_lvds = {
> +nouveau_connector_funcs_lvds_legacy = {
> .dpms = drm_helper_connector_dpms,
> - .reset = nouveau_conn_reset,
> .detect = nouveau_connector_detect_lvds,
> .force = nouveau_connector_force,
> @@ -1362,5 +1403,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
> struct nouveau_display *disp = nouveau_display(dev);
> struct nouveau_connector *nv_connector = NULL;
> + struct drm_connector_state *conn_state;
> struct drm_connector *connector;
> + const struct drm_connector_funcs *funcs;
> struct drm_connector_list_iter conn_iter;
> int type, ret = 0;
> @@ -1459,8 +1502,17 @@ nouveau_connector_create(struct drm_device *dev, int index)
>
> type = drm_conntype_from_dcb(nv_connector->type);
> - if (type == DRM_MODE_CONNECTOR_LVDS)
> - drm_connector_init(dev, connector, &nouveau_connector_funcs_lvds, type);
> - else
> - drm_connector_init(dev, connector, &nouveau_connector_funcs, type);
> + if (type == DRM_MODE_CONNECTOR_LVDS) {
> + if (drm_drv_uses_atomic_modeset(dev))
> + funcs = &nouveau_connector_funcs_lvds;
> + else
> + funcs = &nouveau_connector_funcs_lvds_legacy;
> + } else {
> + if (drm_drv_uses_atomic_modeset(dev))
> + funcs = &nouveau_connector_funcs;
> + else
> + funcs = &nouveau_connector_funcs_legacy;
> + }
> +
> + drm_connector_init(dev, connector, funcs, type);
>
> switch (type) {
> @@ -1514,13 +1566,26 @@ nouveau_connector_create(struct drm_device *dev, int index)
> nouveau_connector_irq, NVIF_CONN_EVENT_V0_IRQ,
> &nv_connector->irq);
> - if (ret) {
> - nvif_event_dtor(&nv_connector->hpd);
> - nvif_conn_dtor(&nv_connector->conn);
> + if (ret)
> goto drm_conn_err;
> - }
> }
> }
>
> - connector->funcs->reset(connector);
> + if (drm_drv_uses_atomic_modeset(dev)) {
> + conn_state = connector->funcs->atomic_create_state(connector);
> + if (IS_ERR(conn_state)) {
> + ret = PTR_ERR(conn_state);
> + goto drm_conn_err;
> + }
> + connector->state = conn_state;
> + } else {
> + /* Pre-nv50 keeps its property state embedded in struct
> + * nouveau_connector: drm_connector.state must remain NULL,
> + * the DRM core expects legacy drivers to use
> + * drm_connector.encoder.
> + */
> + nouveau_conn_atom_init(connector,
> + &nv_connector->properties_state);
> + }
> +
> nouveau_conn_attach_properties(connector);
>
> @@ -1567,4 +1632,8 @@ nouveau_connector_create(struct drm_device *dev, int index)
>
> drm_conn_err:
> + nvif_event_dtor(&nv_connector->irq);
> + nvif_event_dtor(&nv_connector->hpd);
> + cancel_work_sync(&nv_connector->irq_work);
> + nvif_conn_dtor(&nv_connector->conn);
> drm_connector_cleanup(connector);
> kfree(nv_connector);
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h
> index eb292d2ba4bc..02f843648eb8 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.h
> @@ -217,5 +217,6 @@ extern int nouveau_hdmimhz;
>
> void nouveau_conn_attach_properties(struct drm_connector *);
> -void nouveau_conn_reset(struct drm_connector *);
> +struct drm_connector_state *
> +nouveau_conn_atomic_create_state(struct drm_connector *);
> struct drm_connector_state *
> nouveau_conn_atomic_duplicate_state(struct drm_connector *);
>
--
--
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] 55+ messages in thread
* Re: [PATCH v3 34/37] drm/nouveau: Convert to atomic_create_state
2026-10-30 15:14 ` Maxime Ripard
@ 2026-11-02 8:36 ` Thomas Zimmermann
-1 siblings, 0 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2026-11-02 8:36 UTC (permalink / raw)
To: Maxime Ripard, Maarten Lankhorst, David Airlie, Simona Vetter
Cc: dri-devel, Danilo Krummrich, nouveau
Hi
Am 30.10.26 um 16:14 schrieb Maxime Ripard:
[...]
> +struct drm_connector_state *
> +nouveau_conn_atomic_create_state(struct drm_connector *connector)
> +{
> + struct nouveau_conn_atom *asyc;
> +
> + asyc = kzalloc_obj(*asyc);
> + if (WARN_ON(!asyc))
Since you're here anyway, please use drm_WARN_ON_ONCE(). Plain WARN_ON()
doesn't seem a good fit here.
Best regards
Thomas
> + return ERR_PTR(-ENOMEM);
> +
> + __drm_atomic_helper_connector_state_init(&asyc->state, connector);
> + nouveau_conn_atom_init(connector, asyc);
> +
> + return &asyc->state;
> +}
> +
> void
> nouveau_conn_attach_properties(struct drm_connector *connector)
> @@ -1231,5 +1231,47 @@ static const struct drm_connector_funcs
> nouveau_connector_funcs = {
> .dpms = drm_helper_connector_dpms,
> - .reset = nouveau_conn_reset,
> + .detect = nouveau_connector_detect,
> + .force = nouveau_connector_force,
> + .fill_modes = drm_helper_probe_single_connector_modes,
> + .set_property = nouveau_connector_set_property,
> + .destroy = nouveau_connector_destroy,
> + .atomic_create_state = nouveau_conn_atomic_create_state,
> + .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
> + .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
> + .atomic_set_property = nouveau_conn_atomic_set_property,
> + .atomic_get_property = nouveau_conn_atomic_get_property,
> + .late_register = nouveau_connector_late_register,
> + .early_unregister = nouveau_connector_early_unregister,
> +};
> +
> +static const struct drm_connector_funcs
> +nouveau_connector_funcs_lvds = {
> + .dpms = drm_helper_connector_dpms,
> + .detect = nouveau_connector_detect_lvds,
> + .force = nouveau_connector_force,
> + .fill_modes = drm_helper_probe_single_connector_modes,
> + .set_property = nouveau_connector_set_property,
> + .destroy = nouveau_connector_destroy,
> + .atomic_create_state = nouveau_conn_atomic_create_state,
> + .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
> + .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
> + .atomic_set_property = nouveau_conn_atomic_set_property,
> + .atomic_get_property = nouveau_conn_atomic_get_property,
> + .late_register = nouveau_connector_late_register,
> + .early_unregister = nouveau_connector_early_unregister,
> +};
> +
> +/*
> + * Pre-nv50 doesn't support atomic modesetting: the connector property state
> + * lives in the embedded struct nouveau_connector.properties_state and
> + * drm_connector.state is left alone, as expected from a legacy driver.
> + *
> + * Those connectors must not expose atomic_create_state: the DRM core would
> + * then install the embedded state into drm_connector.state and eventually
> + * pass it to atomic_destroy_state, which frees it.
> + */
> +static const struct drm_connector_funcs
> +nouveau_connector_funcs_legacy = {
> + .dpms = drm_helper_connector_dpms,
> .detect = nouveau_connector_detect,
> .force = nouveau_connector_force,
> @@ -1246,7 +1288,6 @@ nouveau_connector_funcs = {
>
> static const struct drm_connector_funcs
> -nouveau_connector_funcs_lvds = {
> +nouveau_connector_funcs_lvds_legacy = {
> .dpms = drm_helper_connector_dpms,
> - .reset = nouveau_conn_reset,
> .detect = nouveau_connector_detect_lvds,
> .force = nouveau_connector_force,
> @@ -1362,5 +1403,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
> struct nouveau_display *disp = nouveau_display(dev);
> struct nouveau_connector *nv_connector = NULL;
> + struct drm_connector_state *conn_state;
> struct drm_connector *connector;
> + const struct drm_connector_funcs *funcs;
> struct drm_connector_list_iter conn_iter;
> int type, ret = 0;
> @@ -1459,8 +1502,17 @@ nouveau_connector_create(struct drm_device *dev, int index)
>
> type = drm_conntype_from_dcb(nv_connector->type);
> - if (type == DRM_MODE_CONNECTOR_LVDS)
> - drm_connector_init(dev, connector, &nouveau_connector_funcs_lvds, type);
> - else
> - drm_connector_init(dev, connector, &nouveau_connector_funcs, type);
> + if (type == DRM_MODE_CONNECTOR_LVDS) {
> + if (drm_drv_uses_atomic_modeset(dev))
> + funcs = &nouveau_connector_funcs_lvds;
> + else
> + funcs = &nouveau_connector_funcs_lvds_legacy;
> + } else {
> + if (drm_drv_uses_atomic_modeset(dev))
> + funcs = &nouveau_connector_funcs;
> + else
> + funcs = &nouveau_connector_funcs_legacy;
> + }
> +
> + drm_connector_init(dev, connector, funcs, type);
>
> switch (type) {
> @@ -1514,13 +1566,26 @@ nouveau_connector_create(struct drm_device *dev, int index)
> nouveau_connector_irq, NVIF_CONN_EVENT_V0_IRQ,
> &nv_connector->irq);
> - if (ret) {
> - nvif_event_dtor(&nv_connector->hpd);
> - nvif_conn_dtor(&nv_connector->conn);
> + if (ret)
> goto drm_conn_err;
> - }
> }
> }
>
> - connector->funcs->reset(connector);
> + if (drm_drv_uses_atomic_modeset(dev)) {
> + conn_state = connector->funcs->atomic_create_state(connector);
> + if (IS_ERR(conn_state)) {
> + ret = PTR_ERR(conn_state);
> + goto drm_conn_err;
> + }
> + connector->state = conn_state;
> + } else {
> + /* Pre-nv50 keeps its property state embedded in struct
> + * nouveau_connector: drm_connector.state must remain NULL,
> + * the DRM core expects legacy drivers to use
> + * drm_connector.encoder.
> + */
> + nouveau_conn_atom_init(connector,
> + &nv_connector->properties_state);
> + }
> +
> nouveau_conn_attach_properties(connector);
>
> @@ -1567,4 +1632,8 @@ nouveau_connector_create(struct drm_device *dev, int index)
>
> drm_conn_err:
> + nvif_event_dtor(&nv_connector->irq);
> + nvif_event_dtor(&nv_connector->hpd);
> + cancel_work_sync(&nv_connector->irq_work);
> + nvif_conn_dtor(&nv_connector->conn);
> drm_connector_cleanup(connector);
> kfree(nv_connector);
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h
> index eb292d2ba4bc..02f843648eb8 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.h
> @@ -217,5 +217,6 @@ extern int nouveau_hdmimhz;
>
> void nouveau_conn_attach_properties(struct drm_connector *);
> -void nouveau_conn_reset(struct drm_connector *);
> +struct drm_connector_state *
> +nouveau_conn_atomic_create_state(struct drm_connector *);
> struct drm_connector_state *
> nouveau_conn_atomic_duplicate_state(struct drm_connector *);
>
--
--
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] 55+ messages in thread
* Re: [PATCH v3 34/37] drm/nouveau: Convert to atomic_create_state
@ 2026-11-02 8:36 ` Thomas Zimmermann
0 siblings, 0 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2026-11-02 8:36 UTC (permalink / raw)
To: Maxime Ripard, Maarten Lankhorst, David Airlie, Simona Vetter
Cc: dri-devel, Danilo Krummrich, Lyude Paul, nouveau
Hi
Am 30.10.26 um 16:14 schrieb Maxime Ripard:
[...]
> +struct drm_connector_state *
> +nouveau_conn_atomic_create_state(struct drm_connector *connector)
> +{
> + struct nouveau_conn_atom *asyc;
> +
> + asyc = kzalloc_obj(*asyc);
> + if (WARN_ON(!asyc))
Since you're here anyway, please use drm_WARN_ON_ONCE(). Plain WARN_ON()
doesn't seem a good fit here.
Best regards
Thomas
> + return ERR_PTR(-ENOMEM);
> +
> + __drm_atomic_helper_connector_state_init(&asyc->state, connector);
> + nouveau_conn_atom_init(connector, asyc);
> +
> + return &asyc->state;
> +}
> +
> void
> nouveau_conn_attach_properties(struct drm_connector *connector)
> @@ -1231,5 +1231,47 @@ static const struct drm_connector_funcs
> nouveau_connector_funcs = {
> .dpms = drm_helper_connector_dpms,
> - .reset = nouveau_conn_reset,
> + .detect = nouveau_connector_detect,
> + .force = nouveau_connector_force,
> + .fill_modes = drm_helper_probe_single_connector_modes,
> + .set_property = nouveau_connector_set_property,
> + .destroy = nouveau_connector_destroy,
> + .atomic_create_state = nouveau_conn_atomic_create_state,
> + .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
> + .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
> + .atomic_set_property = nouveau_conn_atomic_set_property,
> + .atomic_get_property = nouveau_conn_atomic_get_property,
> + .late_register = nouveau_connector_late_register,
> + .early_unregister = nouveau_connector_early_unregister,
> +};
> +
> +static const struct drm_connector_funcs
> +nouveau_connector_funcs_lvds = {
> + .dpms = drm_helper_connector_dpms,
> + .detect = nouveau_connector_detect_lvds,
> + .force = nouveau_connector_force,
> + .fill_modes = drm_helper_probe_single_connector_modes,
> + .set_property = nouveau_connector_set_property,
> + .destroy = nouveau_connector_destroy,
> + .atomic_create_state = nouveau_conn_atomic_create_state,
> + .atomic_duplicate_state = nouveau_conn_atomic_duplicate_state,
> + .atomic_destroy_state = nouveau_conn_atomic_destroy_state,
> + .atomic_set_property = nouveau_conn_atomic_set_property,
> + .atomic_get_property = nouveau_conn_atomic_get_property,
> + .late_register = nouveau_connector_late_register,
> + .early_unregister = nouveau_connector_early_unregister,
> +};
> +
> +/*
> + * Pre-nv50 doesn't support atomic modesetting: the connector property state
> + * lives in the embedded struct nouveau_connector.properties_state and
> + * drm_connector.state is left alone, as expected from a legacy driver.
> + *
> + * Those connectors must not expose atomic_create_state: the DRM core would
> + * then install the embedded state into drm_connector.state and eventually
> + * pass it to atomic_destroy_state, which frees it.
> + */
> +static const struct drm_connector_funcs
> +nouveau_connector_funcs_legacy = {
> + .dpms = drm_helper_connector_dpms,
> .detect = nouveau_connector_detect,
> .force = nouveau_connector_force,
> @@ -1246,7 +1288,6 @@ nouveau_connector_funcs = {
>
> static const struct drm_connector_funcs
> -nouveau_connector_funcs_lvds = {
> +nouveau_connector_funcs_lvds_legacy = {
> .dpms = drm_helper_connector_dpms,
> - .reset = nouveau_conn_reset,
> .detect = nouveau_connector_detect_lvds,
> .force = nouveau_connector_force,
> @@ -1362,5 +1403,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
> struct nouveau_display *disp = nouveau_display(dev);
> struct nouveau_connector *nv_connector = NULL;
> + struct drm_connector_state *conn_state;
> struct drm_connector *connector;
> + const struct drm_connector_funcs *funcs;
> struct drm_connector_list_iter conn_iter;
> int type, ret = 0;
> @@ -1459,8 +1502,17 @@ nouveau_connector_create(struct drm_device *dev, int index)
>
> type = drm_conntype_from_dcb(nv_connector->type);
> - if (type == DRM_MODE_CONNECTOR_LVDS)
> - drm_connector_init(dev, connector, &nouveau_connector_funcs_lvds, type);
> - else
> - drm_connector_init(dev, connector, &nouveau_connector_funcs, type);
> + if (type == DRM_MODE_CONNECTOR_LVDS) {
> + if (drm_drv_uses_atomic_modeset(dev))
> + funcs = &nouveau_connector_funcs_lvds;
> + else
> + funcs = &nouveau_connector_funcs_lvds_legacy;
> + } else {
> + if (drm_drv_uses_atomic_modeset(dev))
> + funcs = &nouveau_connector_funcs;
> + else
> + funcs = &nouveau_connector_funcs_legacy;
> + }
> +
> + drm_connector_init(dev, connector, funcs, type);
>
> switch (type) {
> @@ -1514,13 +1566,26 @@ nouveau_connector_create(struct drm_device *dev, int index)
> nouveau_connector_irq, NVIF_CONN_EVENT_V0_IRQ,
> &nv_connector->irq);
> - if (ret) {
> - nvif_event_dtor(&nv_connector->hpd);
> - nvif_conn_dtor(&nv_connector->conn);
> + if (ret)
> goto drm_conn_err;
> - }
> }
> }
>
> - connector->funcs->reset(connector);
> + if (drm_drv_uses_atomic_modeset(dev)) {
> + conn_state = connector->funcs->atomic_create_state(connector);
> + if (IS_ERR(conn_state)) {
> + ret = PTR_ERR(conn_state);
> + goto drm_conn_err;
> + }
> + connector->state = conn_state;
> + } else {
> + /* Pre-nv50 keeps its property state embedded in struct
> + * nouveau_connector: drm_connector.state must remain NULL,
> + * the DRM core expects legacy drivers to use
> + * drm_connector.encoder.
> + */
> + nouveau_conn_atom_init(connector,
> + &nv_connector->properties_state);
> + }
> +
> nouveau_conn_attach_properties(connector);
>
> @@ -1567,4 +1632,8 @@ nouveau_connector_create(struct drm_device *dev, int index)
>
> drm_conn_err:
> + nvif_event_dtor(&nv_connector->irq);
> + nvif_event_dtor(&nv_connector->hpd);
> + cancel_work_sync(&nv_connector->irq_work);
> + nvif_conn_dtor(&nv_connector->conn);
> drm_connector_cleanup(connector);
> kfree(nv_connector);
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.h b/drivers/gpu/drm/nouveau/nouveau_connector.h
> index eb292d2ba4bc..02f843648eb8 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.h
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.h
> @@ -217,5 +217,6 @@ extern int nouveau_hdmimhz;
>
> void nouveau_conn_attach_properties(struct drm_connector *);
> -void nouveau_conn_reset(struct drm_connector *);
> +struct drm_connector_state *
> +nouveau_conn_atomic_create_state(struct drm_connector *);
> struct drm_connector_state *
> nouveau_conn_atomic_duplicate_state(struct drm_connector *);
>
--
--
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] 55+ messages in thread
* Re: [PATCH v3 30/37] drm/tests: hdmi: Convert to atomic_create_state
2026-10-30 15:14 ` [PATCH v3 30/37] drm/tests: hdmi: " Maxime Ripard
@ 2026-11-02 8:40 ` Thomas Zimmermann
0 siblings, 0 replies; 55+ messages in thread
From: Thomas Zimmermann @ 2026-11-02 8:40 UTC (permalink / raw)
To: Maxime Ripard, Maarten Lankhorst, David Airlie, Simona Vetter; +Cc: dri-devel
Hi
Am 30.10.26 um 16:14 schrieb Maxime Ripard:
[...]
> + connector_state = drm_atomic_helper_connector_create_state(connector);
> + if (IS_ERR(connector_state))
> + return connector_state;
Somewhat unrelated to this series, this return statement made me think
that we should consider requiring an ERR_CAST() in such situations. It
documents what is happening and we're also not really returning a
connector state.
Best regards
Thomas
> +
> + __drm_atomic_helper_connector_hdmi_state_init(connector_state,
> connector);
> +
> + return connector_state;
> }
>
> static const struct drm_connector_funcs dummy_connector_funcs = {
> + .atomic_create_state = dummy_hdmi_connector_create_state,
> .atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
> .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
> .fill_modes = drm_helper_probe_single_connector_modes,
> - .reset = dummy_hdmi_connector_reset,
> };
>
>
--
--
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] 55+ 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 ` Maxime Ripard
(?)
@ 2026-11-02 8:41 ` Thomas Zimmermann
-1 siblings, 0 replies; 55+ 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] 55+ messages in thread
* Re: [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
@ 2026-11-02 8:41 ` Thomas Zimmermann
0 siblings, 0 replies; 55+ 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)
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 55+ messages in thread
* Re: [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
@ 2026-11-02 8:41 ` Thomas Zimmermann
0 siblings, 0 replies; 55+ 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,
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, 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] 55+ 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 ` Maxime Ripard
(?)
@ 2026-11-05 9:15 ` Maxime Ripard
-1 siblings, 0 replies; 55+ 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] 55+ messages in thread
* Re: [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
@ 2026-11-05 9:15 ` Maxime Ripard
0 siblings, 0 replies; 55+ 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.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 #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
[-- Attachment #2: Type: text/plain, Size: 167 bytes --]
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 55+ messages in thread
* Re: [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
@ 2026-11-05 9:15 ` Maxime Ripard
0 siblings, 0 replies; 55+ 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,
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, 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] 55+ messages in thread
end of thread, other threads:[~2026-11-05 9:15 UTC | newest]
Thread overview: 55+ 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 ` Maxime Ripard
2026-10-30 15:13 ` Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 01/37] drm/amdgpu: vkms: Switch to drm_atomic_helper_connector_create_state Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 02/37] drm/bridge: analogix-anx6345: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 03/37] drm/bridge: analogix-anx78xx: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 04/37] drm/bridge: chrontel-ch7033: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 05/37] drm/bridge: nxp-ptn3460: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 06/37] drm/panel: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 07/37] drm/bridge: synopsys: dw-hdmi: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 08/37] drm/bridge: tc358767: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 09/37] drm/bridge: tda998x: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 10/37] drm/bridge: ti-tfp410: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 11/37] drm/exynos: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 12/37] drm/fsl-dcu: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 13/37] drm/loongson: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 14/37] drm/mipi-dbi: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 15/37] drm/renesas: shmobile: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 16/37] drm/sitronix: st7571: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 17/37] drm/sti: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 18/37] drm/sun4i: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 19/37] drm/tegra: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 20/37] drm/tests: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 21/37] drm/tiny: arcpgu: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 22/37] drm/tiny: sharp: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 23/37] drm/virtio: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 24/37] drm/vkms: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 25/37] drm/xen: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 26/37] drm/bridge: synopsys: dw-hdmi: Convert to atomic_create_state Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 27/37] drm/meson: " Maxime Ripard
2026-10-30 15:13 ` Maxime Ripard
2026-10-31 21:20 ` Martin Blumenstingl
2026-10-31 21:20 ` Martin Blumenstingl
2026-10-30 15:13 ` [PATCH v3 28/37] drm/sun4i: hdmi: " Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 29/37] drm/sun4i: tv: " Maxime Ripard
2026-10-30 15:14 ` [PATCH v3 30/37] drm/tests: hdmi: " Maxime Ripard
2026-11-02 8:40 ` Thomas Zimmermann
2026-10-30 15:14 ` [PATCH v3 31/37] drm/connector: Remove drm_atomic_helper_connector_reset() Maxime Ripard
2026-10-30 15:14 ` [PATCH v3 32/37] drm/amdgpu: dm: Convert to atomic_create_state Maxime Ripard
2026-10-30 15:14 ` [PATCH v3 33/37] drm/i915: " Maxime Ripard
2026-10-30 15:14 ` [PATCH v3 34/37] drm/nouveau: " Maxime Ripard
2026-10-30 15:14 ` Maxime Ripard
2026-11-02 8:36 ` Thomas Zimmermann
2026-11-02 8:36 ` Thomas Zimmermann
2026-11-02 8:36 ` Thomas Zimmermann
2026-11-02 8:36 ` Thomas Zimmermann
2026-10-30 15:14 ` [PATCH v3 35/37] drm/tegra: " Maxime Ripard
2026-10-30 15:14 ` [PATCH v3 36/37] drm/connector: Remove __drm_atomic_helper_connector_reset() Maxime Ripard
2026-10-30 15:14 ` [PATCH v3 37/37] drm/connector: Remove reset 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-02 8:41 ` Thomas Zimmermann
2026-11-02 8:41 ` Thomas Zimmermann
2026-11-05 9:15 ` Maxime Ripard
2026-11-05 9:15 ` Maxime Ripard
2026-11-05 9:15 ` Maxime Ripard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.