All drivers implementing the connector reset hook with drm_atomic_helper_connector_reset() have been converted to atomic_create_state.
Remove drm_atomic_helper_connector_reset(). Signed-off-by: Maxime Ripard <[email protected]> --- drivers/gpu/drm/display/drm_hdmi_state_helper.c | 3 +-- drivers/gpu/drm/drm_atomic_state_helper.c | 20 -------------------- include/drm/drm_atomic_state_helper.h | 1 - include/drm/drm_connector.h | 2 +- 4 files changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/display/drm_hdmi_state_helper.c b/drivers/gpu/drm/display/drm_hdmi_state_helper.c index 7cdb7ca3dc12..0780ad5a2f20 100644 --- a/drivers/gpu/drm/display/drm_hdmi_state_helper.c +++ b/drivers/gpu/drm/display/drm_hdmi_state_helper.c @@ -312,12 +312,11 @@ * @connector: DRM connector * @new_conn_state: connector state to initialize * * Initializes all HDMI resources from a @drm_connector_state without * actually allocating it. This is useful for HDMI drivers, in - * combination with __drm_atomic_helper_connector_state_init(), - * drm_atomic_helper_connector_reset(), or + * combination with __drm_atomic_helper_connector_state_init(), or * drm_atomic_helper_connector_create_state(). */ void __drm_atomic_helper_connector_hdmi_state_init(struct drm_connector *connector, struct drm_connector_state *new_conn_state) { diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c index 1424c4873251..8c48031956fe 100644 --- a/drivers/gpu/drm/drm_atomic_state_helper.c +++ b/drivers/gpu/drm/drm_atomic_state_helper.c @@ -433,30 +433,10 @@ __drm_atomic_helper_connector_reset(struct drm_connector *connector, connector->state = conn_state; } EXPORT_SYMBOL(__drm_atomic_helper_connector_reset); -/** - * drm_atomic_helper_connector_reset - default &drm_connector_funcs.reset hook for connectors - * @connector: drm connector - * - * Resets the atomic state for @connector 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_connector_reset(struct drm_connector *connector) -{ - struct drm_connector_state *conn_state = kzalloc_obj(*conn_state); - - if (connector->state) - __drm_atomic_helper_connector_destroy_state(connector->state); - - kfree(connector->state); - __drm_atomic_helper_connector_reset(connector, conn_state); -} -EXPORT_SYMBOL(drm_atomic_helper_connector_reset); - /** * drm_atomic_helper_connector_create_state - default &drm_connector_funcs.atomic_create_state hook for connectors * @connector: connector object * * Allocates and initializes pristine @drm_connector_state. diff --git a/include/drm/drm_atomic_state_helper.h b/include/drm/drm_atomic_state_helper.h index 5e8619aeef21..7bced7e9d860 100644 --- a/include/drm/drm_atomic_state_helper.h +++ b/include/drm/drm_atomic_state_helper.h @@ -66,11 +66,10 @@ void drm_atomic_helper_plane_destroy_state(struct drm_plane *plane, void __drm_atomic_helper_connector_state_init(struct drm_connector_state *conn_state, struct drm_connector *connector); void __drm_atomic_helper_connector_reset(struct drm_connector *connector, struct drm_connector_state *conn_state); -void drm_atomic_helper_connector_reset(struct drm_connector *connector); struct drm_connector_state * drm_atomic_helper_connector_create_state(struct drm_connector *connector); void drm_atomic_helper_connector_tv_state_init(struct drm_connector_state *state, struct drm_connector *connector); int drm_atomic_helper_connector_tv_check(struct drm_connector *connector, diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index 2ee7c59329aa..8b52360339e0 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -1663,11 +1663,11 @@ struct drm_connector_funcs { * * Reset connector 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_connector_reset() to reset + * Atomic drivers can use __drm_atomic_helper_connector_reset() to reset * atomic state using this hook. */ void (*reset)(struct drm_connector *connector); /** -- 2.55.0
