mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset
@ 2026-10-30 15:13 Maxime Ripard
  2026-10-30 15:13 ` [PATCH v3 27/37] drm/meson: Convert to atomic_create_state 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
  0 siblings, 2 replies; 4+ 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] 4+ messages in thread

end of thread, other threads:[~2026-11-02  8:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-30 15:13 [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
2026-10-30 15:13 ` [PATCH v3 27/37] drm/meson: Convert to atomic_create_state Maxime Ripard
2026-10-31 21:20   ` Martin Blumenstingl
2026-11-02  8:41 ` [PATCH v3 00/37] drm/connector: Convert all drivers to atomic_create_state and remove reset Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®