All the drivers that used to implement the reset hook have been converted to use atomic_create_state instead.
Remove the reset hook from drm_connector_funcs, and the code calling it in drm_mode_config_reset(), drmm_connector_hdmi_init() and panel_bridge_attach(). Signed-off-by: Maxime Ripard <[email protected]> --- drivers/gpu/drm/drm_connector.c | 8 -------- drivers/gpu/drm/drm_mode_config.c | 4 +--- drivers/gpu/drm/drm_panel.c | 2 -- include/drm/drm_connector.h | 9 --------- 4 files changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 893716a9e489..d66188521881 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -660,14 +660,10 @@ int drmm_connector_hdmi_init(struct drm_device *dev, state = connector->funcs->atomic_create_state(connector); if (IS_ERR(state)) return PTR_ERR(state); connector->state = state; - } else if (connector->funcs->reset) { - connector->funcs->reset(connector); - if (!connector->state) - return -ENOMEM; } drm_connector_attach_max_bpc_property(connector, 8, hdmi_funcs->max_bpc); /* TODO: remove after conversion to new drmm_connector_hdmi_init() */ connector->max_bpc = hdmi_funcs->max_bpc; @@ -768,14 +764,10 @@ int drmm_connector_hdmi_ini2(struct drm_device *dev, state = connector->funcs->atomic_create_state(connector); if (IS_ERR(state)) return PTR_ERR(state); connector->state = state; - } else if (connector->funcs->reset) { - connector->funcs->reset(connector); - if (!connector->state) - return -ENOMEM; } drm_connector_attach_max_bpc_property(connector, 8, max_bpc); connector->max_bpc = max_bpc; diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index 48a56f23dadb..c1e993a78702 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -313,13 +313,11 @@ void drm_mode_config_reset(struct drm_device *dev) if (encoder->funcs && encoder->funcs->reset) encoder->funcs->reset(encoder); drm_connector_list_iter_begin(dev, &conn_iter); drm_for_each_connector_iter(connector, &conn_iter) { - if (connector->funcs->reset) - connector->funcs->reset(connector); - else if (connector->funcs->atomic_create_state) + if (connector->funcs->atomic_create_state) drm_mode_config_connector_reset_with_create_state(connector); } drm_connector_list_iter_end(&conn_iter); } EXPORT_SYMBOL(drm_mode_config_reset); diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index 55a1427c7a10..6131aaf2eb70 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm/drm_panel.c @@ -110,12 +110,10 @@ static int panel_bridge_attach(struct drm_bridge *bridge, conn_state = connector->funcs->atomic_create_state(connector); if (IS_ERR(conn_state)) return PTR_ERR(conn_state); connector->state = conn_state; - } else if (connector->funcs->reset) { - connector->funcs->reset(connector); } drm_connector_register(connector); } diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index a87cd13d0a45..f656ed8324d3 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -1656,19 +1656,10 @@ struct drm_connector_funcs { * * 0 on success or a negative error code on failure. */ int (*dpms)(struct drm_connector *connector, int mode); - /** - * @reset: - * - * 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. - */ - void (*reset)(struct drm_connector *connector); - /** * @detect: * * Check to see if anything is attached to the connector. The parameter * force is set to false whilst polling, true when checking the -- 2.55.0
