From cffb2841545be524b01e0420f8f76c59f49711ed Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Fri, 21 Aug 2026 16:38:57 +0200 Subject: [PATCH] drm/simple-kms: Remove unused reset_crtc hook The reset_crtc hook in drm_simple_display_pipe_funcs allows simple KMS drivers to provide a custom CRTC reset implementation. However, no driver ever implemented it. Remove the hook and the wrapper function, and use drm_atomic_helper_crtc_reset() directly. Reviewed-by: Thomas Zimmermann Link: https://patch.msgid.link/20260821-drm-no-more-crtc-reset-v1-21-fb793475c05a@kernel.org Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_simple_kms_helper.c | 13 +------------ include/drm/drm_simple_kms_helper.h | 1 - 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/gpu/drm/drm_simple_kms_helper.c b/drivers/gpu/drm/drm_simple_kms_helper.c index 30730b8ed495..a75a2eb4337e 100644 --- a/drivers/gpu/drm/drm_simple_kms_helper.c +++ b/drivers/gpu/drm/drm_simple_kms_helper.c @@ -92,17 +92,6 @@ static const struct drm_crtc_helper_funcs drm_simple_kms_crtc_helper_funcs = { .atomic_disable = drm_simple_kms_crtc_disable, }; -static void drm_simple_kms_crtc_reset(struct drm_crtc *crtc) -{ - struct drm_simple_display_pipe *pipe; - - pipe = container_of(crtc, struct drm_simple_display_pipe, crtc); - if (!pipe->funcs || !pipe->funcs->reset_crtc) - return drm_atomic_helper_crtc_reset(crtc); - - return pipe->funcs->reset_crtc(pipe); -} - static struct drm_crtc_state *drm_simple_kms_crtc_duplicate_state(struct drm_crtc *crtc) { struct drm_simple_display_pipe *pipe; @@ -148,7 +137,7 @@ static void drm_simple_kms_crtc_disable_vblank(struct drm_crtc *crtc) } static const struct drm_crtc_funcs drm_simple_kms_crtc_funcs = { - .reset = drm_simple_kms_crtc_reset, + .reset = drm_atomic_helper_crtc_reset, .destroy = drm_crtc_cleanup, .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, diff --git a/include/drm/drm_simple_kms_helper.h b/include/drm/drm_simple_kms_helper.h index ce09126fbe06..4a4a840d84f1 100644 --- a/include/drm/drm_simple_kms_helper.h +++ b/include/drm/drm_simple_kms_helper.h @@ -39,7 +39,6 @@ struct drm_simple_display_pipe_funcs { struct drm_plane_state *plane_state); int (*enable_vblank)(struct drm_simple_display_pipe *pipe); void (*disable_vblank)(struct drm_simple_display_pipe *pipe); - void (*reset_crtc)(struct drm_simple_display_pipe *pipe); struct drm_crtc_state * (*duplicate_crtc_state)(struct drm_simple_display_pipe *pipe); void (*destroy_crtc_state)(struct drm_simple_display_pipe *pipe, struct drm_crtc_state *crtc_state);