drm/kms: rip out drm_mode_connector_detach_encoder
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 23 Jan 2014 00:28:49 +0000 (01:28 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 13 Mar 2014 11:48:38 +0000 (12:48 +0100)
It's only used by imx, and that one gets it wrong - there's no need
to deteach the encoder before removing it.

And really, neither current drm modesetting code nor all the userspace
we have can handle dynamic changes in the set of possible encoders for
a given connector. So let's just remove this before someone starts
doing something really nasty with it.

As a plus, one less kerneldoc comment to write.

Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_crtc.c
drivers/staging/imx-drm/imx-ldb.c
drivers/staging/imx-drm/parallel-display.c
include/drm/drm_crtc.h

index 35ea15d5ffffed35a4f494afe6df9a1a4e89a8ae..ea620f4cf6c7f534ff9537f41e1774b9367adb12 100644 (file)
@@ -3506,21 +3506,6 @@ int drm_mode_connector_attach_encoder(struct drm_connector *connector,
 }
 EXPORT_SYMBOL(drm_mode_connector_attach_encoder);
 
-void drm_mode_connector_detach_encoder(struct drm_connector *connector,
-                                   struct drm_encoder *encoder)
-{
-       int i;
-       for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
-               if (connector->encoder_ids[i] == encoder->base.id) {
-                       connector->encoder_ids[i] = 0;
-                       if (connector->encoder == encoder)
-                               connector->encoder = NULL;
-                       break;
-               }
-       }
-}
-EXPORT_SYMBOL(drm_mode_connector_detach_encoder);
-
 int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
                                  int gamma_size)
 {
index 7e593296ac47287f4929b91270ff79d34752fd56..c703e986b44c254e781f50a63cf6ac56501fc852 100644 (file)
@@ -595,8 +595,6 @@ static int imx_ldb_remove(struct platform_device *pdev)
                struct drm_connector *connector = &channel->connector;
                struct drm_encoder *encoder = &channel->encoder;
 
-               drm_mode_connector_detach_encoder(connector, encoder);
-
                imx_drm_remove_connector(channel->imx_drm_connector);
                imx_drm_remove_encoder(channel->imx_drm_encoder);
        }
index 351d61dede0024003f39c7ace312e552081c79ad..823d015d2140a0a09be7b6b2e37aec33f67dd60b 100644 (file)
@@ -244,8 +244,6 @@ static int imx_pd_remove(struct platform_device *pdev)
        struct drm_connector *connector = &imxpd->connector;
        struct drm_encoder *encoder = &imxpd->encoder;
 
-       drm_mode_connector_detach_encoder(connector, encoder);
-
        imx_drm_remove_connector(imxpd->imx_drm_connector);
        imx_drm_remove_encoder(imxpd->imx_drm_encoder);
 
index f7646548660d7e98e160d2dac40d1f12b310a48d..44c8576ddbe3a8b85fea8c0c9ff371bde2b2b7c0 100644 (file)
@@ -1082,8 +1082,6 @@ extern const char *drm_get_encoder_name(const struct drm_encoder *encoder);
 
 extern int drm_mode_connector_attach_encoder(struct drm_connector *connector,
                                             struct drm_encoder *encoder);
-extern void drm_mode_connector_detach_encoder(struct drm_connector *connector,
-                                          struct drm_encoder *encoder);
 extern int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
                                         int gamma_size);
 extern struct drm_mode_object *drm_mode_object_find(struct drm_device *dev,