[PATCH v3 00/40] drm/plane: Convert all drivers to atomic_create_state and remove reset
From: Maxime Ripard <mripard@kernel.org>
Date: 2026-08-31 16:17:42
Also in:
amd-gfx, dri-devel, imx, linux-renesas-soc, linux-samsung-soc, linux-sunxi, nouveau
This is a follow-up to the bridge reset removal series, and part of a larger effort to remove the reset hook from all KMS objects. The plane 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 first adds the necessary infrastructure in the simple-kms and GEM atomic helpers, then converts all 51 plane drivers tree-wide from the reset hook to atomic_create_state. The conversions were done using a combination of Coccinelle semantic patches and manual adjustments. Once all drivers are converted, the old helpers and the reset hook itself are removed from struct drm_plane_funcs. Signed-off-by: Maxime Ripard <mripard@kernel.org> --- Changes in v3: - Drop leftover state destruction in sun4i - Rebase on current drm-misc-next - Link to v2: https://lore.kernel.org/r/20260814-drm-no-more-plane-reset-v2-0-82d2963dd134@kernel.org (local) Changes in v2: - Rebase on latest drm-misc-next tag - Fix sashiko reviews - Fix atmel-hlcdc breakage - Link to v1: https://lore.kernel.org/r/20260709-drm-no-more-plane-reset-v1-0-302d986fe5f0@kernel.org (local) --- Maxime Ripard (40): drm/simple-kms: Remove unused reset_plane hook drm/vkms: Convert to atomic_create_state drm/gem-atomic-helper: Remove __drm_gem_reset_shadow_plane() drm/amdgpu: Convert to atomic_create_state drm/fsl-dcu: Convert to atomic_create_state drm/hisilicon/kirin: Convert to atomic_create_state drm/imx/dc: Convert to atomic_create_state drm/kmb: Convert to atomic_create_state drm/logicvc: Convert to atomic_create_state drm/loongson: Convert to atomic_create_state drm/lcdif: Convert to atomic_create_state drm/mxsfb: Convert to atomic_create_state drm/qxl: Convert to atomic_create_state drm/rockchip: Convert to atomic_create_state drm/sprd: Convert to atomic_create_state drm/sti: Convert to atomic_create_state drm/stm: Convert to atomic_create_state drm/tests: kunit: Convert to atomic_create_state drm/tilcdc: Convert to atomic_create_state drm/vboxvideo: Convert to atomic_create_state drm/verisilicon: Convert to atomic_create_state drm/virtio: Convert to atomic_create_state drm/xlnx: Convert to atomic_create_state drm/atomic-state-helper: Remove drm_atomic_helper_plane_reset() drm/amdgpu_dm: Convert to atomic_create_state drm/armada: Convert to atomic_create_state drm/atmel-hlcdc: Drop spurious csc_init call from reset drm/atmel-hlcdc: Convert to atomic_create_state drm/exynos: Convert to atomic_create_state drm/imx/ipuv3: Convert to atomic_create_state drm/mediatek: Convert to atomic_create_state drm/nouveau: Convert to atomic_create_state drm/omap: Convert to atomic_create_state drm/rcar-du: Convert to atomic_create_state drm/rz-du: Convert to atomic_create_state drm/shmobile: Convert to atomic_create_state drm/sun4i: layer: Convert to atomic_create_state drm/vmwgfx: Convert to atomic_create_state drm/atomic-state-helper: Remove __drm_atomic_helper_plane_reset() drm/plane: Remove reset drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c | 2 +- .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 28 +++++++++------ .../drm/amd/display/amdgpu_dm/amdgpu_dm_plane.h | 2 +- .../display/amdgpu_dm/tests/amdgpu_dm_plane_test.c | 30 ++++++---------- drivers/gpu/drm/armada/armada_overlay.c | 39 ++++++++++---------- drivers/gpu/drm/armada/armada_plane.c | 15 ++++---- drivers/gpu/drm/armada/armada_plane.h | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 33 ++++++++--------- drivers/gpu/drm/drm_atomic_state_helper.c | 41 ---------------------- drivers/gpu/drm/drm_gem_atomic_helper.c | 20 ----------- drivers/gpu/drm/drm_mode_config.c | 4 +-- drivers/gpu/drm/exynos/exynos_drm_plane.c | 22 +++++------- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_plane.c | 2 +- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 2 +- drivers/gpu/drm/imx/dc/dc-plane.c | 2 +- drivers/gpu/drm/imx/ipuv3/ipuv3-plane.c | 19 +++++----- drivers/gpu/drm/kmb/kmb_plane.c | 2 +- drivers/gpu/drm/logicvc/logicvc_layer.c | 2 +- drivers/gpu/drm/loongson/lsdc_plane.c | 2 +- drivers/gpu/drm/mediatek/mtk_plane.c | 22 +++++------- drivers/gpu/drm/mxsfb/lcdif_kms.c | 2 +- drivers/gpu/drm/mxsfb/mxsfb_kms.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 15 ++++---- drivers/gpu/drm/omapdrm/omap_plane.c | 13 ++++--- drivers/gpu/drm/qxl/qxl_display.c | 4 +-- drivers/gpu/drm/renesas/rcar-du/rcar_du_plane.c | 15 ++++---- drivers/gpu/drm/renesas/rcar-du/rcar_du_vsp.c | 15 ++++---- drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c | 15 ++++---- drivers/gpu/drm/renesas/shmobile/shmob_drm_plane.c | 15 ++++---- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 +- drivers/gpu/drm/sprd/sprd_dpu.c | 2 +- drivers/gpu/drm/sti/sti_cursor.c | 2 +- drivers/gpu/drm/sti/sti_gdp.c | 2 +- drivers/gpu/drm/sti/sti_hqvdp.c | 2 +- drivers/gpu/drm/stm/ltdc.c | 2 +- drivers/gpu/drm/sun4i/sun4i_layer.c | 21 +++++------ drivers/gpu/drm/tests/drm_kunit_helpers.c | 2 +- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 2 +- drivers/gpu/drm/vboxvideo/vbox_mode.c | 2 +- drivers/gpu/drm/verisilicon/vs_cursor_plane.c | 2 +- drivers/gpu/drm/verisilicon/vs_plane.c | 14 +++----- drivers/gpu/drm/verisilicon/vs_plane.h | 2 +- drivers/gpu/drm/verisilicon/vs_primary_plane.c | 2 +- drivers/gpu/drm/virtio/virtgpu_plane.c | 2 +- drivers/gpu/drm/vkms/vkms_plane.c | 15 ++++---- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 17 ++++----- drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 4 +-- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 4 +-- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 4 +-- drivers/gpu/drm/xlnx/zynqmp_kms.c | 2 +- include/drm/drm_atomic_state_helper.h | 3 -- include/drm/drm_gem_atomic_helper.h | 2 -- include/drm/drm_plane.h | 12 ------- include/drm/drm_simple_kms_helper.h | 1 - 56 files changed, 192 insertions(+), 324 deletions(-) --- base-commit: 07c66ce1e6446f5cc6a4ace99a8d46880f45c527 change-id: 20260629-drm-no-more-plane-reset-04950f42e07f Best regards, -- Maxime Ripard [off-list ref]