* [PATCH v5 01/11] drm/arcgpu: Switch to drm_atomic_helper_crtc_create_state
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 02/11] drm/aspeed: " Maxime Ripard
` (11 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
The arcgpu crtc implementation uses the deprecated
drm_atomic_helper_crtc_reset() as its reset hook.
Switch to drm_atomic_helper_crtc_create_state() instead.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
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 19a943f5f792..aaf814c622b6 100644
--- a/drivers/gpu/drm/tiny/arcpgu.c
+++ b/drivers/gpu/drm/tiny/arcpgu.c
@@ -305,11 +305,11 @@ static const struct drm_crtc_helper_funcs arcpgu_crtc_helper_funcs = {
.atomic_enable = arcpgu_crtc_helper_atomic_enable,
.atomic_disable = arcpgu_crtc_helper_atomic_disable,
};
static const struct drm_crtc_funcs arcpgu_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 02/11] drm/aspeed: Switch to drm_atomic_helper_crtc_create_state
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 01/11] drm/arcgpu: Switch to drm_atomic_helper_crtc_create_state Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 03/11] drm/gm12u320: " Maxime Ripard
` (10 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
The aspeed crtc implementation uses the deprecated
drm_atomic_helper_crtc_reset() as its reset hook.
Switch to drm_atomic_helper_crtc_create_state() instead.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
index e8c9a6040d75..31e11322b2ab 100644
--- a/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
+++ b/drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c
@@ -275,11 +275,11 @@ static const struct drm_crtc_helper_funcs aspeed_gfx_crtc_helper_funcs = {
.atomic_disable = aspeed_gfx_crtc_helper_atomic_disable,
.atomic_flush = aspeed_gfx_crtc_helper_atomic_flush,
};
static const struct drm_crtc_funcs aspeed_gfx_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 03/11] drm/gm12u320: Switch to drm_atomic_helper_crtc_create_state
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 01/11] drm/arcgpu: Switch to drm_atomic_helper_crtc_create_state Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 02/11] drm/aspeed: " Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 04/11] drm/mcde: " Maxime Ripard
` (9 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Javier Martinez Canillas, Hans de Goede
The tilcdc crtc implementation uses the deprecated
drm_atomic_helper_crtc_reset() as its reset hook.
Switch to drm_atomic_helper_crtc_create_state() instead.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Hans de Goede <hansg@kernel.org>
---
drivers/gpu/drm/tiny/gm12u320.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c
index 754617722a0d..ddc19cd3e03c 100644
--- a/drivers/gpu/drm/tiny/gm12u320.c
+++ b/drivers/gpu/drm/tiny/gm12u320.c
@@ -650,12 +650,12 @@ static const struct drm_crtc_helper_funcs gm12u320_crtc_helper_funcs = {
};
static const struct drm_crtc_funcs gm12u320_crtc_funcs = {
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
- .reset = drm_atomic_helper_crtc_reset,
.destroy = drm_crtc_cleanup,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
};
static const struct drm_encoder_funcs gm12u320_encoder_funcs = {
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 04/11] drm/mcde: Switch to drm_atomic_helper_crtc_create_state
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (2 preceding siblings ...)
2026-09-15 14:24 ` [PATCH v5 03/11] drm/gm12u320: " Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 05/11] drm/pl111: " Maxime Ripard
` (8 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
The mcde crtc implementation uses the deprecated
drm_atomic_helper_crtc_reset() as its reset hook.
Switch to drm_atomic_helper_crtc_create_state() instead.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/mcde/mcde_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mcde/mcde_display.c b/drivers/gpu/drm/mcde/mcde_display.c
index 50c90cf84a9a..d1d01f3d8ab4 100644
--- a/drivers/gpu/drm/mcde/mcde_display.c
+++ b/drivers/gpu/drm/mcde/mcde_display.c
@@ -1506,11 +1506,11 @@ static int mcde_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atomi
return drm_atomic_add_affected_planes(commit, crtc);
}
static const struct drm_crtc_funcs mcde_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 05/11] drm/pl111: Switch to drm_atomic_helper_crtc_create_state
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (3 preceding siblings ...)
2026-09-15 14:24 ` [PATCH v5 04/11] drm/mcde: " Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 06/11] drm/repaper: " Maxime Ripard
` (7 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
The pl111 crtc implementation uses the deprecated
drm_atomic_helper_crtc_reset() as its reset hook.
Switch to drm_atomic_helper_crtc_create_state() instead.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/pl111/pl111_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/pl111/pl111_display.c b/drivers/gpu/drm/pl111/pl111_display.c
index 8e5d662c23c8..163358b54517 100644
--- a/drivers/gpu/drm/pl111/pl111_display.c
+++ b/drivers/gpu/drm/pl111/pl111_display.c
@@ -468,11 +468,11 @@ static int pl111_crtc_helper_atomic_check(struct drm_crtc *crtc, struct drm_atom
return drm_atomic_add_affected_planes(commit, crtc);
}
static struct drm_crtc_funcs pl111_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 06/11] drm/repaper: Switch to drm_atomic_helper_crtc_create_state
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (4 preceding siblings ...)
2026-09-15 14:24 ` [PATCH v5 05/11] drm/pl111: " Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 07/11] drm/tve200: " Maxime Ripard
` (6 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
The repaper crtc implementation uses the deprecated
drm_atomic_helper_crtc_reset() as its reset hook.
Switch to drm_atomic_helper_crtc_create_state() instead.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/tiny/repaper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c
index f225e38fd404..82c99d86656f 100644
--- a/drivers/gpu/drm/tiny/repaper.c
+++ b/drivers/gpu/drm/tiny/repaper.c
@@ -902,11 +902,11 @@ static const struct drm_crtc_helper_funcs repaper_crtc_helper_funcs = {
};
static const struct drm_crtc_funcs repaper_crtc_funcs = {
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
};
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 07/11] drm/tve200: Switch to drm_atomic_helper_crtc_create_state
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (5 preceding siblings ...)
2026-09-15 14:24 ` [PATCH v5 06/11] drm/repaper: " Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 08/11] drm/xen: " Maxime Ripard
` (5 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
The tve200 crtc implementation uses the deprecated
drm_atomic_helper_crtc_reset() as its reset hook.
Switch to drm_atomic_helper_crtc_create_state() instead.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/tve200/tve200_display.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tve200/tve200_display.c b/drivers/gpu/drm/tve200/tve200_display.c
index beb3a5a63b5d..90771464ac12 100644
--- a/drivers/gpu/drm/tve200/tve200_display.c
+++ b/drivers/gpu/drm/tve200/tve200_display.c
@@ -373,11 +373,11 @@ static const struct drm_crtc_helper_funcs tve200_crtc_helper_funcs = {
.atomic_disable = tve200_crtc_helper_atomic_disable,
.atomic_flush = tve200_crtc_helper_atomic_flush,
};
static const struct drm_crtc_funcs tve200_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 08/11] drm/xen: Switch to drm_atomic_helper_crtc_create_state
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (6 preceding siblings ...)
2026-09-15 14:24 ` [PATCH v5 07/11] drm/tve200: " Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 09/11] drm/atomic-helper: Remove drm_atomic_helper_crtc_reset Maxime Ripard
` (4 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard
The xen crtc implementation uses the deprecated
drm_atomic_helper_crtc_reset() as its reset hook.
Switch to drm_atomic_helper_crtc_create_state() instead.
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/xen/xen_drm_front_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xen/xen_drm_front_kms.c b/drivers/gpu/drm/xen/xen_drm_front_kms.c
index 9896ea35b743..1f65fc407d77 100644
--- a/drivers/gpu/drm/xen/xen_drm_front_kms.c
+++ b/drivers/gpu/drm/xen/xen_drm_front_kms.c
@@ -356,11 +356,11 @@ static const struct drm_crtc_helper_funcs display_crtc_helper_funcs = {
.atomic_enable = xen_drm_crtc_helper_atomic_enable,
.atomic_disable = xen_drm_crtc_helper_atomic_disable,
};
static const struct drm_crtc_funcs display_crtc_funcs = {
- .reset = drm_atomic_helper_crtc_reset,
+ .atomic_create_state = drm_atomic_helper_crtc_create_state,
.destroy = drm_crtc_cleanup,
.set_config = drm_atomic_helper_set_config,
.page_flip = drm_atomic_helper_page_flip,
.atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_crtc_destroy_state,
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 09/11] drm/atomic-helper: Remove drm_atomic_helper_crtc_reset
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (7 preceding siblings ...)
2026-09-15 14:24 ` [PATCH v5 08/11] drm/xen: " Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 10/11] drm/atomic-helper: Remove __drm_atomic_helper_crtc_reset Maxime Ripard
` (3 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Javier Martinez Canillas
All users of drm_atomic_helper_crtc_reset() have been converted to
drm_atomic_helper_crtc_create_state().
Remove the now unused helper.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/drm_atomic_state_helper.c | 19 -------------------
include/drm/drm_atomic_state_helper.h | 1 -
include/drm/drm_crtc.h | 3 ---
3 files changed, 23 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c
index a2ef272e9f27..77b3d0b6674c 100644
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
@@ -103,29 +103,10 @@ __drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
crtc->state = crtc_state;
}
EXPORT_SYMBOL(__drm_atomic_helper_crtc_reset);
-/**
- * drm_atomic_helper_crtc_reset - default &drm_crtc_funcs.reset hook for CRTCs
- * @crtc: drm CRTC
- *
- * Resets the atomic state for @crtc 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_crtc_reset(struct drm_crtc *crtc)
-{
- struct drm_crtc_state *crtc_state =
- kzalloc_obj(*crtc->state);
-
- if (crtc->state)
- crtc->funcs->atomic_destroy_state(crtc, crtc->state);
-
- __drm_atomic_helper_crtc_reset(crtc, crtc_state);
-}
-EXPORT_SYMBOL(drm_atomic_helper_crtc_reset);
-
/**
* drm_atomic_helper_crtc_create_state - default &drm_crtc_funcs.atomic_create_state hook for crtcs
* @crtc: crtc object
*
* Allocates and initializes pristine @drm_crtc_state.
diff --git a/include/drm/drm_atomic_state_helper.h b/include/drm/drm_atomic_state_helper.h
index 34a599c3d86d..df70817c94fc 100644
--- a/include/drm/drm_atomic_state_helper.h
+++ b/include/drm/drm_atomic_state_helper.h
@@ -42,11 +42,10 @@ struct drm_device;
void __drm_atomic_helper_crtc_state_init(struct drm_crtc_state *state,
struct drm_crtc *crtc);
void __drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
struct drm_crtc_state *state);
-void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc);
struct drm_crtc_state *
drm_atomic_helper_crtc_create_state(struct drm_crtc *crtc);
void __drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc,
struct drm_crtc_state *state);
struct drm_crtc_state *
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 152349f973e3..746d049f1b6e 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -427,13 +427,10 @@ 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.
- *
- * Atomic drivers can use drm_atomic_helper_crtc_reset() to reset
- * atomic state using this hook.
*/
void (*reset)(struct drm_crtc *crtc);
/**
* @cursor_set:
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 10/11] drm/atomic-helper: Remove __drm_atomic_helper_crtc_reset
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (8 preceding siblings ...)
2026-09-15 14:24 ` [PATCH v5 09/11] drm/atomic-helper: Remove drm_atomic_helper_crtc_reset Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-15 14:24 ` [PATCH v5 11/11] drm/crtc: Remove reset Maxime Ripard
` (2 subsequent siblings)
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Dmitry Baryshkov,
Javier Martinez Canillas
All users of __drm_atomic_helper_crtc_reset() have been converted to use
__drm_atomic_helper_crtc_state_init() and atomic_create_state.
Remove the now unused helper.
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
drivers/gpu/drm/drm_atomic_state_helper.c | 26 --------------------------
include/drm/drm_atomic_state_helper.h | 2 --
2 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 77b3d0b6674c..eb9de78c4d85 100644
--- a/drivers/gpu/drm/drm_atomic_state_helper.c
+++ b/drivers/gpu/drm/drm_atomic_state_helper.c
@@ -77,36 +77,10 @@ __drm_atomic_helper_crtc_state_init(struct drm_crtc_state *crtc_state,
crtc_state->crtc = crtc;
crtc_state->background_color = DRM_ARGB64_PREP(0xffff, 0, 0, 0);
}
EXPORT_SYMBOL(__drm_atomic_helper_crtc_state_init);
-/**
- * __drm_atomic_helper_crtc_reset - reset state on CRTC
- * @crtc: drm CRTC
- * @crtc_state: CRTC state to assign
- *
- * Initializes the newly allocated @crtc_state and assigns it to
- * the &drm_crtc->state pointer of @crtc, usually required when
- * initializing the drivers or when called from the &drm_crtc_funcs.reset
- * hook.
- *
- * This is useful for drivers that subclass the CRTC state.
- */
-void
-__drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
- struct drm_crtc_state *crtc_state)
-{
- if (crtc_state)
- __drm_atomic_helper_crtc_state_init(crtc_state, crtc);
-
- if (drm_dev_has_vblank(crtc->dev))
- drm_crtc_vblank_reset(crtc);
-
- crtc->state = crtc_state;
-}
-EXPORT_SYMBOL(__drm_atomic_helper_crtc_reset);
-
/**
* drm_atomic_helper_crtc_create_state - default &drm_crtc_funcs.atomic_create_state hook for crtcs
* @crtc: crtc object
*
* Allocates and initializes pristine @drm_crtc_state.
diff --git a/include/drm/drm_atomic_state_helper.h b/include/drm/drm_atomic_state_helper.h
index df70817c94fc..480eaae42f45 100644
--- a/include/drm/drm_atomic_state_helper.h
+++ b/include/drm/drm_atomic_state_helper.h
@@ -40,12 +40,10 @@ struct drm_private_state;
struct drm_modeset_acquire_ctx;
struct drm_device;
void __drm_atomic_helper_crtc_state_init(struct drm_crtc_state *state,
struct drm_crtc *crtc);
-void __drm_atomic_helper_crtc_reset(struct drm_crtc *crtc,
- struct drm_crtc_state *state);
struct drm_crtc_state *
drm_atomic_helper_crtc_create_state(struct drm_crtc *crtc);
void __drm_atomic_helper_crtc_duplicate_state(struct drm_crtc *crtc,
struct drm_crtc_state *state);
struct drm_crtc_state *
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v5 11/11] drm/crtc: Remove reset
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (9 preceding siblings ...)
2026-09-15 14:24 ` [PATCH v5 10/11] drm/atomic-helper: Remove __drm_atomic_helper_crtc_reset Maxime Ripard
@ 2026-09-15 14:24 ` Maxime Ripard
2026-09-16 6:54 ` [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Thomas Zimmermann
2026-09-16 7:44 ` Maxime Ripard
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-15 14:24 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter
Cc: dri-devel, Maxime Ripard, Dmitry Baryshkov,
Javier Martinez Canillas
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 <dmitry.baryshkov@oss.qualcomm.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
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
@@ -305,13 +305,11 @@ void drm_mode_config_reset(struct drm_device *dev)
else if (plane->funcs->atomic_create_state)
drm_mode_config_plane_reset_with_create_state(plane);
}
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);
}
drm_for_each_encoder(encoder, dev)
if (encoder->funcs && encoder->funcs->reset)
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
@@ -421,19 +421,10 @@ struct drm_crtc_state {
* Each driver is responsible for filling out this structure at startup time,
* in addition to providing other modesetting features, like i2c and DDC
* 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:
*
* Update the cursor image. The cursor position is relative to the CRTC
* and can be partially or fully outside of the visible area.
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (10 preceding siblings ...)
2026-09-15 14:24 ` [PATCH v5 11/11] drm/crtc: Remove reset Maxime Ripard
@ 2026-09-16 6:54 ` Thomas Zimmermann
2026-09-16 7:45 ` Maxime Ripard
2026-09-16 7:44 ` Maxime Ripard
12 siblings, 1 reply; 15+ messages in thread
From: Thomas Zimmermann @ 2026-09-16 6:54 UTC (permalink / raw)
To: Maxime Ripard, Maarten Lankhorst, David Airlie, Simona Vetter
Cc: dri-devel, Javier Martinez Canillas, Hans de Goede,
Dmitry Baryshkov
Hi
Am 15.09.26 um 16:24 schrieb Maxime Ripard:
> This is a follow-up to the plane reset removal series, and part of a
> larger effort to remove the reset hook from all KMS objects.
>
> The CRTC 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 CRTC drivers tree-wide from the reset hook to
> atomic_create_state, then removes the reset hook from struct
> drm_crtc_funcs entirely. Two drivers (tilcdc and loongson) had actual
> hardware reset logic mixed into their reset hook; those are moved to
> CRTC creation instead. The conversions were done using a combination of
> Coccinelle semantic patches and manual adjustments.
>
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
It might be my mail client but the formatting in patch 5 looks off.
Besides that, for the series:
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Best regards
Thomas
> ---
> Changes in v5:
> - Convert more drivers recently posted
> - Link to v4: https://lore.kernel.org/r/20260911-drm-no-more-crtc-reset-v4-0-662e0ccd815c@kernel.org
>
> Changes in v4:
> - Convert gm12u320 too
> - Link to v3: https://lore.kernel.org/r/20260904-drm-no-more-crtc-reset-v3-0-27d9891512ce@kernel.org
>
> Changes in v3:
> - Test if crtc->helper_private is set before accessing it, and call the
> temp variable to store it helper_funcs
> - Rework outdated commit logs
> - Fix error path for amdgpu_dm_crtc_init
> - Fix new amdgpu tests doc
> - Rebased on drm-misc-next-2026-09-03
> - Link to v2: https://lore.kernel.org/r/20260831-drm-no-more-crtc-reset-v2-0-4500d49a337f@kernel.org
>
> Changes in v2:
> - Fix indentation in logicvc
> - Fix hardware reset at probe and suspend for loonsoon and tilcldc
> - Fix state creation for amdgpu
> - Rebase on current drm-misc-next
> - Fix commit message for st7920
> - Fix merge conflict for mediatek
> - Link to v1: https://lore.kernel.org/r/20260821-drm-no-more-crtc-reset-v1-0-fb793475c05a@kernel.org
>
> ---
> Maxime Ripard (11):
> drm/arcgpu: Switch to drm_atomic_helper_crtc_create_state
> drm/aspeed: Switch to drm_atomic_helper_crtc_create_state
> drm/gm12u320: Switch to drm_atomic_helper_crtc_create_state
> drm/mcde: Switch to drm_atomic_helper_crtc_create_state
> drm/pl111: Switch to drm_atomic_helper_crtc_create_state
> drm/repaper: Switch to drm_atomic_helper_crtc_create_state
> drm/tve200: Switch to drm_atomic_helper_crtc_create_state
> drm/xen: Switch to drm_atomic_helper_crtc_create_state
> drm/atomic-helper: Remove drm_atomic_helper_crtc_reset
> drm/atomic-helper: Remove __drm_atomic_helper_crtc_reset
> drm/crtc: Remove reset
>
> drivers/gpu/drm/aspeed/aspeed_gfx_crtc.c | 2 +-
> drivers/gpu/drm/drm_atomic_state_helper.c | 45 -------------------------------
> drivers/gpu/drm/drm_mode_config.c | 4 +--
> drivers/gpu/drm/mcde/mcde_display.c | 2 +-
> drivers/gpu/drm/pl111/pl111_display.c | 2 +-
> drivers/gpu/drm/tiny/arcpgu.c | 2 +-
> drivers/gpu/drm/tiny/gm12u320.c | 2 +-
> drivers/gpu/drm/tiny/repaper.c | 2 +-
> drivers/gpu/drm/tve200/tve200_display.c | 2 +-
> drivers/gpu/drm/xen/xen_drm_front_kms.c | 2 +-
> include/drm/drm_atomic_state_helper.h | 3 ---
> include/drm/drm_crtc.h | 12 ---------
> 12 files changed, 9 insertions(+), 71 deletions(-)
> ---
> base-commit: 17c6b88e85ffe5de5720004ae8c2176d52944aca
> change-id: 20260709-drm-no-more-crtc-reset-14a4d5bc8d41
>
> Best regards,
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, (HRB 36809, AG Nürnberg)
^ permalink raw reply [flat|nested] 15+ messages in thread* Re: [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset
2026-09-16 6:54 ` [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Thomas Zimmermann
@ 2026-09-16 7:45 ` Maxime Ripard
0 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-16 7:45 UTC (permalink / raw)
To: Thomas Zimmermann
Cc: Maarten Lankhorst, David Airlie, Simona Vetter, dri-devel,
Javier Martinez Canillas, Hans de Goede, Dmitry Baryshkov
[-- Attachment #1: Type: text/plain, Size: 1773 bytes --]
On Wed, Sep 16, 2026 at 08:54:44AM +0200, Thomas Zimmermann wrote:
> Hi
>
> Am 15.09.26 um 16:24 schrieb Maxime Ripard:
> > This is a follow-up to the plane reset removal series, and part of a
> > larger effort to remove the reset hook from all KMS objects.
> >
> > The CRTC 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 CRTC drivers tree-wide from the reset hook to
> > atomic_create_state, then removes the reset hook from struct
> > drm_crtc_funcs entirely. Two drivers (tilcdc and loongson) had actual
> > hardware reset logic mixed into their reset hook; those are moved to
> > CRTC creation instead. The conversions were done using a combination of
> > Coccinelle semantic patches and manual adjustments.
> >
> > Signed-off-by: Maxime Ripard <mripard@kernel.org>
>
> It might be my mail client but the formatting in patch 5 looks off. Besides
> that, for the series:
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Thanks, I've fixed it while applying
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset
2026-09-15 14:24 [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Maxime Ripard
` (11 preceding siblings ...)
2026-09-16 6:54 ` [PATCH v5 00/11] drm/crtc: Convert all drivers to atomic_create_state and remove reset Thomas Zimmermann
@ 2026-09-16 7:44 ` Maxime Ripard
12 siblings, 0 replies; 15+ messages in thread
From: Maxime Ripard @ 2026-09-16 7:44 UTC (permalink / raw)
To: Maarten Lankhorst, Thomas Zimmermann, David Airlie, Simona Vetter,
Maxime Ripard
Cc: dri-devel, Javier Martinez Canillas, Hans de Goede,
Dmitry Baryshkov
On Tue, 15 Sep 2026 16:24:41 +0200, Maxime Ripard wrote:
> This is a follow-up to the plane reset removal series, and part of a
> larger effort to remove the reset hook from all KMS objects.
>
> The CRTC 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.
>
> [...]
Applied to misc/kernel.git (drm-misc-next)
[01/11] drm/arcgpu: Switch to drm_atomic_helper_crtc_create_state
commit: 36323b4a23282fc74aea73b5d3570c113fae431e
[02/11] drm/aspeed: Switch to drm_atomic_helper_crtc_create_state
commit: 0e82728b3f48162cbc1ed1bae708dfcdb1a22879
[03/11] drm/gm12u320: Switch to drm_atomic_helper_crtc_create_state
commit: 85be9cba55299acf49faf6a98a0e03e5e8b3a105
[04/11] drm/mcde: Switch to drm_atomic_helper_crtc_create_state
commit: d7f9bde13c54070ec5b091baf361009dd884f8c7
[05/11] drm/pl111: Switch to drm_atomic_helper_crtc_create_state
commit: f14ba2463aca5b179409a99f3c824c28ee71daab
[06/11] drm/repaper: Switch to drm_atomic_helper_crtc_create_state
commit: 0d3b9d5604d1d18ea0946cf694e7c045b8ef8e94
[07/11] drm/tve200: Switch to drm_atomic_helper_crtc_create_state
commit: bfcf0fec178ea9c8a9bec73130b4ea8e510e5583
[08/11] drm/xen: Switch to drm_atomic_helper_crtc_create_state
commit: c4967fd8b43e5b44386e8a3feecab89eacb398d9
[09/11] drm/atomic-helper: Remove drm_atomic_helper_crtc_reset
commit: 5354d1e5fba4753efc4e5e27e671de5febc21ec0
[10/11] drm/atomic-helper: Remove __drm_atomic_helper_crtc_reset
commit: 9ea7393511e139c24d6b5d7edcbb39b5a4c10a61
[11/11] drm/crtc: Remove reset
commit: f1bcb90506a9a6be4d44dc85034f8acc48a49c29
Thanks!
Maxime
^ permalink raw reply [flat|nested] 15+ messages in thread