drm: sti: Rely on the default ->best_encoder() behavior
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 7 Jun 2016 11:48:06 +0000 (13:48 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Jun 2016 06:43:27 +0000 (08:43 +0200)
All outputs have a 1:1 relationship between connectors and encoders
and the driver is relying on the atomic helpers: we can drop the custom
->best_encoder() implementations and let the core call
drm_atomic_helper_best_encoder() for us.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Vincent Abriou <vincent.abriou@st.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1465300095-16971-12-git-send-email-boris.brezillon@free-electrons.com
drivers/gpu/drm/sti/sti_dvo.c
drivers/gpu/drm/sti/sti_hda.c
drivers/gpu/drm/sti/sti_hdmi.c

index d439128e63090d5d15ddddc5960badf785cdce98..e2901667eceb92036f03968a58f421520de3c699 100644 (file)
@@ -377,20 +377,10 @@ static int sti_dvo_connector_mode_valid(struct drm_connector *connector,
        return MODE_OK;
 }
 
-struct drm_encoder *sti_dvo_best_encoder(struct drm_connector *connector)
-{
-       struct sti_dvo_connector *dvo_connector
-               = to_sti_dvo_connector(connector);
-
-       /* Best encoder is the one associated during connector creation */
-       return dvo_connector->encoder;
-}
-
 static const
 struct drm_connector_helper_funcs sti_dvo_connector_helper_funcs = {
        .get_modes = sti_dvo_connector_get_modes,
        .mode_valid = sti_dvo_connector_mode_valid,
-       .best_encoder = sti_dvo_best_encoder,
 };
 
 static enum drm_connector_status
index 9f49c00f1a0285e462a4a4bdf07a941d1100751c..dcec5a8eda592e36b86a90d27f243665ed3adeee 100644 (file)
@@ -669,20 +669,10 @@ static int sti_hda_connector_mode_valid(struct drm_connector *connector,
        return MODE_OK;
 }
 
-struct drm_encoder *sti_hda_best_encoder(struct drm_connector *connector)
-{
-       struct sti_hda_connector *hda_connector
-               = to_sti_hda_connector(connector);
-
-       /* Best encoder is the one associated during connector creation */
-       return hda_connector->encoder;
-}
-
 static const
 struct drm_connector_helper_funcs sti_hda_connector_helper_funcs = {
        .get_modes = sti_hda_connector_get_modes,
        .mode_valid = sti_hda_connector_mode_valid,
-       .best_encoder = sti_hda_best_encoder,
 };
 
 static enum drm_connector_status
index 85545ebf88d37b64dfa2f55b7bca9fe6b66fa437..36d9d6635784fb036d8aa23368d506cb1dd35575 100644 (file)
@@ -890,20 +890,10 @@ static int sti_hdmi_connector_mode_valid(struct drm_connector *connector,
        return MODE_OK;
 }
 
-struct drm_encoder *sti_hdmi_best_encoder(struct drm_connector *connector)
-{
-       struct sti_hdmi_connector *hdmi_connector
-               = to_sti_hdmi_connector(connector);
-
-       /* Best encoder is the one associated during connector creation */
-       return hdmi_connector->encoder;
-}
-
 static const
 struct drm_connector_helper_funcs sti_hdmi_connector_helper_funcs = {
        .get_modes = sti_hdmi_connector_get_modes,
        .mode_valid = sti_hdmi_connector_mode_valid,
-       .best_encoder = sti_hdmi_best_encoder,
 };
 
 /* get detection status of display device */
This page took 0.030624 seconds and 5 git commands to generate.