[PATCH 70/70] drm/crtc: Remove reset
Maxime Ripard <[email protected]>
| Newsgroups | org.freedesktop.lists.dri-devel |
|---|---|
| Message-ID | <[email protected]> |
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(). Signed-off-by: Maxime Ripard <[email protected]> --- drivers/gpu/drm/drm_mode_config.c | 4 +--- include/drm/drm_crtc.h | 10 ---------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index 3bcc7bf0900c..9f4eb694e1fb 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -294,13 +294,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 12f43253f059..be5dca538d87 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -421,20 +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