diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-06-07 07:48:06 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-06-09 02:43:27 -0400 |
commit | 9625bf55fb2deb87f4fa2f1d6d83748eff3dd9b0 (patch) | |
tree | db44e6f67323ef10818ce83e052d5fd61bca8a10 /drivers/gpu/drm/sti | |
parent | 797ef746ad201853561a8669da684250f96ff19b (diff) |
drm: sti: Rely on the default ->best_encoder() behavior
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
Diffstat (limited to 'drivers/gpu/drm/sti')
-rw-r--r-- | drivers/gpu/drm/sti/sti_dvo.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/sti/sti_hda.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/sti/sti_hdmi.c | 10 |
3 files changed, 0 insertions, 30 deletions
diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c index d439128e6309..e2901667eceb 100644 --- a/drivers/gpu/drm/sti/sti_dvo.c +++ b/drivers/gpu/drm/sti/sti_dvo.c | |||
@@ -377,20 +377,10 @@ static int sti_dvo_connector_mode_valid(struct drm_connector *connector, | |||
377 | return MODE_OK; | 377 | return MODE_OK; |
378 | } | 378 | } |
379 | 379 | ||
380 | struct drm_encoder *sti_dvo_best_encoder(struct drm_connector *connector) | ||
381 | { | ||
382 | struct sti_dvo_connector *dvo_connector | ||
383 | = to_sti_dvo_connector(connector); | ||
384 | |||
385 | /* Best encoder is the one associated during connector creation */ | ||
386 | return dvo_connector->encoder; | ||
387 | } | ||
388 | |||
389 | static const | 380 | static const |
390 | struct drm_connector_helper_funcs sti_dvo_connector_helper_funcs = { | 381 | struct drm_connector_helper_funcs sti_dvo_connector_helper_funcs = { |
391 | .get_modes = sti_dvo_connector_get_modes, | 382 | .get_modes = sti_dvo_connector_get_modes, |
392 | .mode_valid = sti_dvo_connector_mode_valid, | 383 | .mode_valid = sti_dvo_connector_mode_valid, |
393 | .best_encoder = sti_dvo_best_encoder, | ||
394 | }; | 384 | }; |
395 | 385 | ||
396 | static enum drm_connector_status | 386 | static enum drm_connector_status |
diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c index 9f49c00f1a02..dcec5a8eda59 100644 --- a/drivers/gpu/drm/sti/sti_hda.c +++ b/drivers/gpu/drm/sti/sti_hda.c | |||
@@ -669,20 +669,10 @@ static int sti_hda_connector_mode_valid(struct drm_connector *connector, | |||
669 | return MODE_OK; | 669 | return MODE_OK; |
670 | } | 670 | } |
671 | 671 | ||
672 | struct drm_encoder *sti_hda_best_encoder(struct drm_connector *connector) | ||
673 | { | ||
674 | struct sti_hda_connector *hda_connector | ||
675 | = to_sti_hda_connector(connector); | ||
676 | |||
677 | /* Best encoder is the one associated during connector creation */ | ||
678 | return hda_connector->encoder; | ||
679 | } | ||
680 | |||
681 | static const | 672 | static const |
682 | struct drm_connector_helper_funcs sti_hda_connector_helper_funcs = { | 673 | struct drm_connector_helper_funcs sti_hda_connector_helper_funcs = { |
683 | .get_modes = sti_hda_connector_get_modes, | 674 | .get_modes = sti_hda_connector_get_modes, |
684 | .mode_valid = sti_hda_connector_mode_valid, | 675 | .mode_valid = sti_hda_connector_mode_valid, |
685 | .best_encoder = sti_hda_best_encoder, | ||
686 | }; | 676 | }; |
687 | 677 | ||
688 | static enum drm_connector_status | 678 | static enum drm_connector_status |
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c index 85545ebf88d3..36d9d6635784 100644 --- a/drivers/gpu/drm/sti/sti_hdmi.c +++ b/drivers/gpu/drm/sti/sti_hdmi.c | |||
@@ -890,20 +890,10 @@ static int sti_hdmi_connector_mode_valid(struct drm_connector *connector, | |||
890 | return MODE_OK; | 890 | return MODE_OK; |
891 | } | 891 | } |
892 | 892 | ||
893 | struct drm_encoder *sti_hdmi_best_encoder(struct drm_connector *connector) | ||
894 | { | ||
895 | struct sti_hdmi_connector *hdmi_connector | ||
896 | = to_sti_hdmi_connector(connector); | ||
897 | |||
898 | /* Best encoder is the one associated during connector creation */ | ||
899 | return hdmi_connector->encoder; | ||
900 | } | ||
901 | |||
902 | static const | 893 | static const |
903 | struct drm_connector_helper_funcs sti_hdmi_connector_helper_funcs = { | 894 | struct drm_connector_helper_funcs sti_hdmi_connector_helper_funcs = { |
904 | .get_modes = sti_hdmi_connector_get_modes, | 895 | .get_modes = sti_hdmi_connector_get_modes, |
905 | .mode_valid = sti_hdmi_connector_mode_valid, | 896 | .mode_valid = sti_hdmi_connector_mode_valid, |
906 | .best_encoder = sti_hdmi_best_encoder, | ||
907 | }; | 897 | }; |
908 | 898 | ||
909 | /* get detection status of display device */ | 899 | /* get detection status of display device */ |