All plane 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_plane_funcs and the associated call in drm_mode_config_reset(). Signed-off-by: Maxime Ripard <[email protected]> --- drivers/gpu/drm/drm_mode_config.c | 4 +--- include/drm/drm_plane.h | 12 ------------ 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index f432f485a914..4b07189e3be5 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -287,13 +287,11 @@ void drm_mode_config_reset(struct drm_device *dev) drm_for_each_colorop(colorop, dev) drm_colorop_reset(colorop); drm_for_each_plane(plane, dev) { - if (plane->funcs->reset) - plane->funcs->reset(plane); - else if (plane->funcs->atomic_create_state) + 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) diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h index 2c5a5a70a71b..a16e96aa7e60 100644 --- a/include/drm/drm_plane.h +++ b/include/drm/drm_plane.h @@ -357,22 +357,10 @@ struct drm_plane_funcs { * through drm_mode_config_cleanup() since a plane cannot be hotplugged * in DRM. */ void (*destroy)(struct drm_plane *plane); - /** - * @reset: - * - * Reset plane 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_plane_reset() to reset - * atomic state using this hook. - */ - void (*reset)(struct drm_plane *plane); - /** * @set_property: * * This is the legacy entry point to update a property attached to the * plane. -- 2.54.0
