aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/DocBook/drm.tmpl6
-rw-r--r--drivers/gpu/drm/ast/ast_mode.c7
-rw-r--r--drivers/gpu/drm/bridge/ptn3460.c7
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_mode.c8
-rw-r--r--drivers/gpu/drm/drm_probe_helper.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_dp_core.c7
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_dpi.c7
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_vidi.c7
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c7
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_vgacon.c7
-rw-r--r--drivers/gpu/drm/shmobile/shmob_drm_crtc.c7
-rw-r--r--drivers/staging/imx-drm/imx-drm-core.c7
-rw-r--r--drivers/staging/imx-drm/imx-drm.h2
-rw-r--r--drivers/staging/imx-drm/imx-hdmi.c1
-rw-r--r--drivers/staging/imx-drm/imx-ldb.c1
-rw-r--r--drivers/staging/imx-drm/imx-tve.c4
-rw-r--r--drivers/staging/imx-drm/parallel-display.c1
-rw-r--r--include/drm/drm_crtc_helper.h2
18 files changed, 5 insertions, 85 deletions
diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 677a02553ec0..c72e146e58d3 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -1903,8 +1903,8 @@ void intel_crt_init(struct drm_device *dev)
1903 <para> 1903 <para>
1904 The function filters out modes larger than 1904 The function filters out modes larger than
1905 <parameter>max_width</parameter> and <parameter>max_height</parameter> 1905 <parameter>max_width</parameter> and <parameter>max_height</parameter>
1906 if specified. It then calls the connector 1906 if specified. It then calls the optional connector
1907 <methodname>mode_valid</methodname> helper operation for each mode in 1907 <methodname>mode_valid</methodname> helper operation for each mode in
1908 the probed list to check whether the mode is valid for the connector. 1908 the probed list to check whether the mode is valid for the connector.
1909 </para> 1909 </para>
1910 </listitem> 1910 </listitem>
@@ -2265,7 +2265,7 @@ void intel_crt_init(struct drm_device *dev)
2265 <para> 2265 <para>
2266 Verify whether a mode is valid for the connector. Return MODE_OK for 2266 Verify whether a mode is valid for the connector. Return MODE_OK for
2267 supported modes and one of the enum drm_mode_status values (MODE_*) 2267 supported modes and one of the enum drm_mode_status values (MODE_*)
2268 for unsupported modes. This operation is mandatory. 2268 for unsupported modes. This operation is optional.
2269 </para> 2269 </para>
2270 <para> 2270 <para>
2271 As the mode rejection reason is currently not used beside for 2271 As the mode rejection reason is currently not used beside for
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index a4afdc8bb578..e599d64a2620 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -743,12 +743,6 @@ static int ast_get_modes(struct drm_connector *connector)
743 return 0; 743 return 0;
744} 744}
745 745
746static int ast_mode_valid(struct drm_connector *connector,
747 struct drm_display_mode *mode)
748{
749 return MODE_OK;
750}
751
752static void ast_connector_destroy(struct drm_connector *connector) 746static void ast_connector_destroy(struct drm_connector *connector)
753{ 747{
754 struct ast_connector *ast_connector = to_ast_connector(connector); 748 struct ast_connector *ast_connector = to_ast_connector(connector);
@@ -765,7 +759,6 @@ ast_connector_detect(struct drm_connector *connector, bool force)
765} 759}
766 760
767static const struct drm_connector_helper_funcs ast_connector_helper_funcs = { 761static const struct drm_connector_helper_funcs ast_connector_helper_funcs = {
768 .mode_valid = ast_mode_valid,
769 .get_modes = ast_get_modes, 762 .get_modes = ast_get_modes,
770 .best_encoder = ast_best_single_encoder, 763 .best_encoder = ast_best_single_encoder,
771}; 764};
diff --git a/drivers/gpu/drm/bridge/ptn3460.c b/drivers/gpu/drm/bridge/ptn3460.c
index b171901a3553..98fd17ae4916 100644
--- a/drivers/gpu/drm/bridge/ptn3460.c
+++ b/drivers/gpu/drm/bridge/ptn3460.c
@@ -225,12 +225,6 @@ out:
225 return num_modes; 225 return num_modes;
226} 226}
227 227
228static int ptn3460_mode_valid(struct drm_connector *connector,
229 struct drm_display_mode *mode)
230{
231 return MODE_OK;
232}
233
234struct drm_encoder *ptn3460_best_encoder(struct drm_connector *connector) 228struct drm_encoder *ptn3460_best_encoder(struct drm_connector *connector)
235{ 229{
236 struct ptn3460_bridge *ptn_bridge; 230 struct ptn3460_bridge *ptn_bridge;
@@ -242,7 +236,6 @@ struct drm_encoder *ptn3460_best_encoder(struct drm_connector *connector)
242 236
243struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = { 237struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = {
244 .get_modes = ptn3460_get_modes, 238 .get_modes = ptn3460_get_modes,
245 .mode_valid = ptn3460_mode_valid,
246 .best_encoder = ptn3460_best_encoder, 239 .best_encoder = ptn3460_best_encoder,
247}; 240};
248 241
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
index f59433b7610c..49332c5fe35b 100644
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -505,13 +505,6 @@ static int cirrus_vga_get_modes(struct drm_connector *connector)
505 return count; 505 return count;
506} 506}
507 507
508static int cirrus_vga_mode_valid(struct drm_connector *connector,
509 struct drm_display_mode *mode)
510{
511 /* Any mode we've added is valid */
512 return MODE_OK;
513}
514
515static struct drm_encoder *cirrus_connector_best_encoder(struct drm_connector 508static struct drm_encoder *cirrus_connector_best_encoder(struct drm_connector
516 *connector) 509 *connector)
517{ 510{
@@ -546,7 +539,6 @@ static void cirrus_connector_destroy(struct drm_connector *connector)
546 539
547struct drm_connector_helper_funcs cirrus_vga_connector_helper_funcs = { 540struct drm_connector_helper_funcs cirrus_vga_connector_helper_funcs = {
548 .get_modes = cirrus_vga_get_modes, 541 .get_modes = cirrus_vga_get_modes,
549 .mode_valid = cirrus_vga_mode_valid,
550 .best_encoder = cirrus_connector_best_encoder, 542 .best_encoder = cirrus_connector_best_encoder,
551}; 543};
552 544
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index e70f54d4a581..d06340985a72 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -169,7 +169,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
169 drm_mode_validate_flag(connector, mode_flags); 169 drm_mode_validate_flag(connector, mode_flags);
170 170
171 list_for_each_entry(mode, &connector->modes, head) { 171 list_for_each_entry(mode, &connector->modes, head) {
172 if (mode->status == MODE_OK) 172 if (mode->status == MODE_OK && connector_funcs->mode_valid)
173 mode->status = connector_funcs->mode_valid(connector, 173 mode->status = connector_funcs->mode_valid(connector,
174 mode); 174 mode);
175 } 175 }
diff --git a/drivers/gpu/drm/exynos/exynos_dp_core.c b/drivers/gpu/drm/exynos/exynos_dp_core.c
index aed533bbfd31..bb74472b4e4b 100644
--- a/drivers/gpu/drm/exynos/exynos_dp_core.c
+++ b/drivers/gpu/drm/exynos/exynos_dp_core.c
@@ -949,12 +949,6 @@ static int exynos_dp_get_modes(struct drm_connector *connector)
949 return 1; 949 return 1;
950} 950}
951 951
952static int exynos_dp_mode_valid(struct drm_connector *connector,
953 struct drm_display_mode *mode)
954{
955 return MODE_OK;
956}
957
958static struct drm_encoder *exynos_dp_best_encoder( 952static struct drm_encoder *exynos_dp_best_encoder(
959 struct drm_connector *connector) 953 struct drm_connector *connector)
960{ 954{
@@ -965,7 +959,6 @@ static struct drm_encoder *exynos_dp_best_encoder(
965 959
966static struct drm_connector_helper_funcs exynos_dp_connector_helper_funcs = { 960static struct drm_connector_helper_funcs exynos_dp_connector_helper_funcs = {
967 .get_modes = exynos_dp_get_modes, 961 .get_modes = exynos_dp_get_modes,
968 .mode_valid = exynos_dp_mode_valid,
969 .best_encoder = exynos_dp_best_encoder, 962 .best_encoder = exynos_dp_best_encoder,
970}; 963};
971 964
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
index 2b09c7c0bfcc..82e52c71bccc 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
@@ -94,12 +94,6 @@ static int exynos_dpi_get_modes(struct drm_connector *connector)
94 return 0; 94 return 0;
95} 95}
96 96
97static int exynos_dpi_mode_valid(struct drm_connector *connector,
98 struct drm_display_mode *mode)
99{
100 return MODE_OK;
101}
102
103static struct drm_encoder * 97static struct drm_encoder *
104exynos_dpi_best_encoder(struct drm_connector *connector) 98exynos_dpi_best_encoder(struct drm_connector *connector)
105{ 99{
@@ -110,7 +104,6 @@ exynos_dpi_best_encoder(struct drm_connector *connector)
110 104
111static struct drm_connector_helper_funcs exynos_dpi_connector_helper_funcs = { 105static struct drm_connector_helper_funcs exynos_dpi_connector_helper_funcs = {
112 .get_modes = exynos_dpi_get_modes, 106 .get_modes = exynos_dpi_get_modes,
113 .mode_valid = exynos_dpi_mode_valid,
114 .best_encoder = exynos_dpi_best_encoder, 107 .best_encoder = exynos_dpi_best_encoder,
115}; 108};
116 109
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 7afead9c3f30..b6980865dd50 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -533,12 +533,6 @@ static int vidi_get_modes(struct drm_connector *connector)
533 return drm_add_edid_modes(connector, edid); 533 return drm_add_edid_modes(connector, edid);
534} 534}
535 535
536static int vidi_mode_valid(struct drm_connector *connector,
537 struct drm_display_mode *mode)
538{
539 return MODE_OK;
540}
541
542static struct drm_encoder *vidi_best_encoder(struct drm_connector *connector) 536static struct drm_encoder *vidi_best_encoder(struct drm_connector *connector)
543{ 537{
544 struct vidi_context *ctx = ctx_from_connector(connector); 538 struct vidi_context *ctx = ctx_from_connector(connector);
@@ -548,7 +542,6 @@ static struct drm_encoder *vidi_best_encoder(struct drm_connector *connector)
548 542
549static struct drm_connector_helper_funcs vidi_connector_helper_funcs = { 543static struct drm_connector_helper_funcs vidi_connector_helper_funcs = {
550 .get_modes = vidi_get_modes, 544 .get_modes = vidi_get_modes,
551 .mode_valid = vidi_mode_valid,
552 .best_encoder = vidi_best_encoder, 545 .best_encoder = vidi_best_encoder,
553}; 546};
554 547
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c b/drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c
index 4f3ba93cd91d..289048d1c7b2 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c
@@ -57,15 +57,8 @@ static int rcar_du_lvds_connector_get_modes(struct drm_connector *connector)
57 return 1; 57 return 1;
58} 58}
59 59
60static int rcar_du_lvds_connector_mode_valid(struct drm_connector *connector,
61 struct drm_display_mode *mode)
62{
63 return MODE_OK;
64}
65
66static const struct drm_connector_helper_funcs connector_helper_funcs = { 60static const struct drm_connector_helper_funcs connector_helper_funcs = {
67 .get_modes = rcar_du_lvds_connector_get_modes, 61 .get_modes = rcar_du_lvds_connector_get_modes,
68 .mode_valid = rcar_du_lvds_connector_mode_valid,
69 .best_encoder = rcar_du_connector_best_encoder, 62 .best_encoder = rcar_du_connector_best_encoder,
70}; 63};
71 64
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vgacon.c b/drivers/gpu/drm/rcar-du/rcar_du_vgacon.c
index 41d563adfeaa..ccfe64c7188f 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_vgacon.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_vgacon.c
@@ -25,15 +25,8 @@ static int rcar_du_vga_connector_get_modes(struct drm_connector *connector)
25 return 0; 25 return 0;
26} 26}
27 27
28static int rcar_du_vga_connector_mode_valid(struct drm_connector *connector,
29 struct drm_display_mode *mode)
30{
31 return MODE_OK;
32}
33
34static const struct drm_connector_helper_funcs connector_helper_funcs = { 28static const struct drm_connector_helper_funcs connector_helper_funcs = {
35 .get_modes = rcar_du_vga_connector_get_modes, 29 .get_modes = rcar_du_vga_connector_get_modes,
36 .mode_valid = rcar_du_vga_connector_mode_valid,
37 .best_encoder = rcar_du_connector_best_encoder, 30 .best_encoder = rcar_du_connector_best_encoder,
38}; 31};
39 32
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
index e9e5e6d368cc..faf176b2daf9 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
@@ -674,12 +674,6 @@ static int shmob_drm_connector_get_modes(struct drm_connector *connector)
674 return 1; 674 return 1;
675} 675}
676 676
677static int shmob_drm_connector_mode_valid(struct drm_connector *connector,
678 struct drm_display_mode *mode)
679{
680 return MODE_OK;
681}
682
683static struct drm_encoder * 677static struct drm_encoder *
684shmob_drm_connector_best_encoder(struct drm_connector *connector) 678shmob_drm_connector_best_encoder(struct drm_connector *connector)
685{ 679{
@@ -690,7 +684,6 @@ shmob_drm_connector_best_encoder(struct drm_connector *connector)
690 684
691static const struct drm_connector_helper_funcs connector_helper_funcs = { 685static const struct drm_connector_helper_funcs connector_helper_funcs = {
692 .get_modes = shmob_drm_connector_get_modes, 686 .get_modes = shmob_drm_connector_get_modes,
693 .mode_valid = shmob_drm_connector_mode_valid,
694 .best_encoder = shmob_drm_connector_best_encoder, 687 .best_encoder = shmob_drm_connector_best_encoder,
695}; 688};
696 689
diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c
index 4144a75e5f71..53ff005245c5 100644
--- a/drivers/staging/imx-drm/imx-drm-core.c
+++ b/drivers/staging/imx-drm/imx-drm-core.c
@@ -200,13 +200,6 @@ static const struct file_operations imx_drm_driver_fops = {
200 .llseek = noop_llseek, 200 .llseek = noop_llseek,
201}; 201};
202 202
203int imx_drm_connector_mode_valid(struct drm_connector *connector,
204 struct drm_display_mode *mode)
205{
206 return MODE_OK;
207}
208EXPORT_SYMBOL(imx_drm_connector_mode_valid);
209
210void imx_drm_connector_destroy(struct drm_connector *connector) 203void imx_drm_connector_destroy(struct drm_connector *connector)
211{ 204{
212 drm_sysfs_connector_remove(connector); 205 drm_sysfs_connector_remove(connector);
diff --git a/drivers/staging/imx-drm/imx-drm.h b/drivers/staging/imx-drm/imx-drm.h
index a322bac55414..7453ae00c412 100644
--- a/drivers/staging/imx-drm/imx-drm.h
+++ b/drivers/staging/imx-drm/imx-drm.h
@@ -50,8 +50,6 @@ int imx_drm_encoder_get_mux_id(struct device_node *node,
50int imx_drm_encoder_parse_of(struct drm_device *drm, 50int imx_drm_encoder_parse_of(struct drm_device *drm,
51 struct drm_encoder *encoder, struct device_node *np); 51 struct drm_encoder *encoder, struct device_node *np);
52 52
53int imx_drm_connector_mode_valid(struct drm_connector *connector,
54 struct drm_display_mode *mode);
55void imx_drm_connector_destroy(struct drm_connector *connector); 53void imx_drm_connector_destroy(struct drm_connector *connector);
56void imx_drm_encoder_destroy(struct drm_encoder *encoder); 54void imx_drm_encoder_destroy(struct drm_encoder *encoder);
57 55
diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c
index d47dedd2cdb4..9fbe6d6a989d 100644
--- a/drivers/staging/imx-drm/imx-hdmi.c
+++ b/drivers/staging/imx-drm/imx-hdmi.c
@@ -1492,7 +1492,6 @@ static struct drm_connector_funcs imx_hdmi_connector_funcs = {
1492 1492
1493static struct drm_connector_helper_funcs imx_hdmi_connector_helper_funcs = { 1493static struct drm_connector_helper_funcs imx_hdmi_connector_helper_funcs = {
1494 .get_modes = imx_hdmi_connector_get_modes, 1494 .get_modes = imx_hdmi_connector_get_modes,
1495 .mode_valid = imx_drm_connector_mode_valid,
1496 .best_encoder = imx_hdmi_connector_best_encoder, 1495 .best_encoder = imx_hdmi_connector_best_encoder,
1497}; 1496};
1498 1497
diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c
index fe4c1ef4e7a5..7e3f019d7e72 100644
--- a/drivers/staging/imx-drm/imx-ldb.c
+++ b/drivers/staging/imx-drm/imx-ldb.c
@@ -317,7 +317,6 @@ static struct drm_connector_funcs imx_ldb_connector_funcs = {
317static struct drm_connector_helper_funcs imx_ldb_connector_helper_funcs = { 317static struct drm_connector_helper_funcs imx_ldb_connector_helper_funcs = {
318 .get_modes = imx_ldb_connector_get_modes, 318 .get_modes = imx_ldb_connector_get_modes,
319 .best_encoder = imx_ldb_connector_best_encoder, 319 .best_encoder = imx_ldb_connector_best_encoder,
320 .mode_valid = imx_drm_connector_mode_valid,
321}; 320};
322 321
323static struct drm_encoder_funcs imx_ldb_encoder_funcs = { 322static struct drm_encoder_funcs imx_ldb_encoder_funcs = {
diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c
index 575533f4fd64..5a5a5287a86a 100644
--- a/drivers/staging/imx-drm/imx-tve.c
+++ b/drivers/staging/imx-drm/imx-tve.c
@@ -251,10 +251,6 @@ static int imx_tve_connector_mode_valid(struct drm_connector *connector,
251 unsigned long rate; 251 unsigned long rate;
252 int ret; 252 int ret;
253 253
254 ret = imx_drm_connector_mode_valid(connector, mode);
255 if (ret != MODE_OK)
256 return ret;
257
258 /* pixel clock with 2x oversampling */ 254 /* pixel clock with 2x oversampling */
259 rate = clk_round_rate(tve->clk, 2000UL * mode->clock) / 2000; 255 rate = clk_round_rate(tve->clk, 2000UL * mode->clock) / 2000;
260 if (rate == mode->clock) 256 if (rate == mode->clock)
diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index c60b6c645f42..52598e489a4b 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -148,7 +148,6 @@ static struct drm_connector_funcs imx_pd_connector_funcs = {
148static struct drm_connector_helper_funcs imx_pd_connector_helper_funcs = { 148static struct drm_connector_helper_funcs imx_pd_connector_helper_funcs = {
149 .get_modes = imx_pd_connector_get_modes, 149 .get_modes = imx_pd_connector_get_modes,
150 .best_encoder = imx_pd_connector_best_encoder, 150 .best_encoder = imx_pd_connector_best_encoder,
151 .mode_valid = imx_drm_connector_mode_valid,
152}; 151};
153 152
154static struct drm_encoder_funcs imx_pd_encoder_funcs = { 153static struct drm_encoder_funcs imx_pd_encoder_funcs = {
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 36a5febac2a6..7ffb59232e84 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -114,7 +114,7 @@ struct drm_encoder_helper_funcs {
114/** 114/**
115 * drm_connector_helper_funcs - helper operations for connectors 115 * drm_connector_helper_funcs - helper operations for connectors
116 * @get_modes: get mode list for this connector 116 * @get_modes: get mode list for this connector
117 * @mode_valid: is this mode valid on the given connector? 117 * @mode_valid (optional): is this mode valid on the given connector?
118 * 118 *
119 * The helper operations are called by the mid-layer CRTC helper. 119 * The helper operations are called by the mid-layer CRTC helper.
120 */ 120 */