From: Sam Ravnborg Date: Sat, 15 Feb 2020 17:33:42 +0000 (+0100) Subject: drm: drop unused drm_crtc callback X-Git-Tag: v5.15~303^2~28^2~3450 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f3ba73ae54f8372c1bd51cb594b2bf0ac8f9f3a;p=platform%2Fkernel%2Flinux-starfive.git drm: drop unused drm_crtc callback struct drm_encoder_helper_funcs included a callback named drm_crtc. There are no users left - so drop it. There was one reference in drm_crtc_helper.c, which checked if the value was not NULL. As it was never assigned this check could be dropped. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200215173342.GA7458@ravnborg.org --- diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 93a4eec..a4d36ac 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -244,10 +244,6 @@ drm_crtc_prepare_encoders(struct drm_device *dev) /* Disable unused encoders */ if (encoder->crtc == NULL) drm_encoder_disable(encoder); - /* Disable encoders whose CRTC is about to change */ - if (encoder_funcs->get_crtc && - encoder->crtc != (*encoder_funcs->get_crtc)(encoder)) - drm_encoder_disable(encoder); } } diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index 0afaf58..7c20b1c 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -693,22 +693,6 @@ struct drm_encoder_helper_funcs { struct drm_connector_state *conn_state); /** - * @get_crtc: - * - * This callback is used by the legacy CRTC helpers to work around - * deficiencies in its own book-keeping. - * - * Do not use, use atomic helpers instead, which get the book keeping - * right. - * - * FIXME: - * - * Currently only nouveau is using this, and as soon as nouveau is - * atomic we can ditch this hook. - */ - struct drm_crtc *(*get_crtc)(struct drm_encoder *encoder); - - /** * @detect: * * This callback can be used by drivers who want to do detection on the