From f1bcb90506a9a6be4d44dc85034f8acc48a49c29 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Tue, 15 Sep 2026 16:24:52 +0200 Subject: [PATCH] drm/crtc: Remove reset All crtc drivers now implement the atomic_create_state hook instead of the reset hook for initial state creation. The reset hook conflated initial state allocation at probe time with hardware and software reset during suspend/resume, making error handling difficult since it is not fallible. Remove the reset hook from struct drm_crtc_funcs and the associated call in drm_mode_config_reset(). Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann Reviewed-by: Javier Martinez Canillas Link: https://patch.msgid.link/20260915-drm-no-more-crtc-reset-v5-11-bda007735748@kernel.org Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_mode_config.c | 4 +--- include/drm/drm_crtc.h | 9 --------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index f95cd9695b43..c7c8e38b192d 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -307,9 +307,7 @@ void drm_mode_config_reset(struct drm_device *dev) } drm_for_each_crtc(crtc, dev) { - if (crtc->funcs->reset) - crtc->funcs->reset(crtc); - else if (crtc->funcs->atomic_create_state) + if (crtc->funcs->atomic_create_state) drm_mode_config_crtc_reset_with_create_state(crtc); } diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 746d049f1b6e..be5dca538d87 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -423,15 +423,6 @@ struct drm_crtc_state { * bus accessors. */ struct drm_crtc_funcs { - /** - * @reset: - * - * Reset CRTC 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_crtc *crtc); - /** * @cursor_set: *