aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/ast/ast_mode.c6
-rw-r--r--drivers/gpu/drm/cirrus/cirrus_mode.c6
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_crtc.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.h2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_encoder.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_hdmi.c2
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_hdmi.h2
-rw-r--r--drivers/gpu/drm/exynos/exynos_hdmi.c2
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_crt.c2
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_display.c2
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_hdmi.c2
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_lvds.c2
-rw-r--r--drivers/gpu/drm/gma500/mdfld_dsi_dpi.c2
-rw-r--r--drivers/gpu/drm/gma500/mdfld_dsi_dpi.h2
-rw-r--r--drivers/gpu/drm/gma500/mdfld_intel_display.c2
-rw-r--r--drivers/gpu/drm/gma500/oaktrail_crtc.c2
-rw-r--r--drivers/gpu/drm/gma500/oaktrail_hdmi.c2
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_display.c2
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_drv.h2
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_lvds.c2
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_sdvo.c6
-rw-r--r--drivers/gpu/drm/i2c/ch7006_drv.c2
-rw-r--r--drivers/gpu/drm/i2c/ch7006_mode.c2
-rw-r--r--drivers/gpu/drm/i2c/ch7006_priv.h2
-rw-r--r--drivers/gpu/drm/i2c/sil164_drv.c2
-rw-r--r--drivers/gpu/drm/i915/dvo.h2
-rw-r--r--drivers/gpu/drm/i915/intel_crt.c2
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c3
-rw-r--r--drivers/gpu/drm/i915/intel_dvo.c2
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c2
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c2
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c6
-rw-r--r--drivers/gpu/drm/i915/intel_tv.c3
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_mode.c8
-rw-r--r--drivers/gpu/drm/nouveau/nv04_crtc.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv04_dac.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv04_dfp.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv17_tv.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv50_crtc.c2
-rw-r--r--drivers/gpu/drm/nouveau/nv50_dac.c3
-rw-r--r--drivers/gpu/drm/nouveau/nv50_sor.c3
-rw-r--r--drivers/gpu/drm/nouveau/nvd0_display.c8
-rw-r--r--drivers/gpu/drm/radeon/atombios_crtc.c2
-rw-r--r--drivers/gpu/drm/radeon/atombios_dp.c2
-rw-r--r--drivers/gpu/drm/radeon/atombios_encoders.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c4
-rw-r--r--drivers/gpu/drm/radeon/radeon_legacy_crtc.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_legacy_encoders.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_mode.h4
-rw-r--r--drivers/gpu/drm/udl/udl_encoder.c2
-rw-r--r--drivers/gpu/drm/udl/udl_modeset.c2
-rw-r--r--drivers/staging/omapdrm/omap_crtc.c2
-rw-r--r--drivers/staging/omapdrm/omap_encoder.c2
-rw-r--r--include/drm/drm_crtc_helper.h4
-rw-r--r--include/drm/drm_encoder_slave.h2
55 files changed, 78 insertions, 72 deletions
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 65f9d231af14..7282c081fb53 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -460,8 +460,8 @@ static void ast_crtc_dpms(struct drm_crtc *crtc, int mode)
460} 460}
461 461
462static bool ast_crtc_mode_fixup(struct drm_crtc *crtc, 462static bool ast_crtc_mode_fixup(struct drm_crtc *crtc,
463 struct drm_display_mode *mode, 463 const struct drm_display_mode *mode,
464 struct drm_display_mode *adjusted_mode) 464 struct drm_display_mode *adjusted_mode)
465{ 465{
466 return true; 466 return true;
467} 467}
@@ -680,7 +680,7 @@ static void ast_encoder_dpms(struct drm_encoder *encoder, int mode)
680} 680}
681 681
682static bool ast_mode_fixup(struct drm_encoder *encoder, 682static bool ast_mode_fixup(struct drm_encoder *encoder,
683 struct drm_display_mode *mode, 683 const struct drm_display_mode *mode,
684 struct drm_display_mode *adjusted_mode) 684 struct drm_display_mode *adjusted_mode)
685{ 685{
686 return true; 686 return true;
diff --git a/drivers/gpu/drm/cirrus/cirrus_mode.c b/drivers/gpu/drm/cirrus/cirrus_mode.c
index 100f6308c509..a44d31aa4e3c 100644
--- a/drivers/gpu/drm/cirrus/cirrus_mode.c
+++ b/drivers/gpu/drm/cirrus/cirrus_mode.c
@@ -97,7 +97,7 @@ static void cirrus_crtc_dpms(struct drm_crtc *crtc, int mode)
97 * to just pass that straight through, so this does nothing 97 * to just pass that straight through, so this does nothing
98 */ 98 */
99static bool cirrus_crtc_mode_fixup(struct drm_crtc *crtc, 99static bool cirrus_crtc_mode_fixup(struct drm_crtc *crtc,
100 struct drm_display_mode *mode, 100 const struct drm_display_mode *mode,
101 struct drm_display_mode *adjusted_mode) 101 struct drm_display_mode *adjusted_mode)
102{ 102{
103 return true; 103 return true;
@@ -429,8 +429,8 @@ void cirrus_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
429 429
430 430
431static bool cirrus_encoder_mode_fixup(struct drm_encoder *encoder, 431static bool cirrus_encoder_mode_fixup(struct drm_encoder *encoder,
432 struct drm_display_mode *mode, 432 const struct drm_display_mode *mode,
433 struct drm_display_mode *adjusted_mode) 433 struct drm_display_mode *adjusted_mode)
434{ 434{
435 return true; 435 return true;
436} 436}
diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
index 4afb625128d7..32a34c85899b 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
@@ -237,7 +237,7 @@ static void exynos_drm_crtc_commit(struct drm_crtc *crtc)
237 237
238static bool 238static bool
239exynos_drm_crtc_mode_fixup(struct drm_crtc *crtc, 239exynos_drm_crtc_mode_fixup(struct drm_crtc *crtc,
240 struct drm_display_mode *mode, 240 const struct drm_display_mode *mode,
241 struct drm_display_mode *adjusted_mode) 241 struct drm_display_mode *adjusted_mode)
242{ 242{
243 DRM_DEBUG_KMS("%s\n", __FILE__); 243 DRM_DEBUG_KMS("%s\n", __FILE__);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index c82c90c443e7..277653d5fda0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -174,7 +174,7 @@ struct exynos_drm_manager_ops {
174 void (*apply)(struct device *subdrv_dev); 174 void (*apply)(struct device *subdrv_dev);
175 void (*mode_fixup)(struct device *subdrv_dev, 175 void (*mode_fixup)(struct device *subdrv_dev,
176 struct drm_connector *connector, 176 struct drm_connector *connector,
177 struct drm_display_mode *mode, 177 const struct drm_display_mode *mode,
178 struct drm_display_mode *adjusted_mode); 178 struct drm_display_mode *adjusted_mode);
179 void (*mode_set)(struct device *subdrv_dev, void *mode); 179 void (*mode_set)(struct device *subdrv_dev, void *mode);
180 void (*get_max_resol)(struct device *subdrv_dev, unsigned int *width, 180 void (*get_max_resol)(struct device *subdrv_dev, unsigned int *width,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_encoder.c b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
index 23d5ad379f86..4a13a747f5d4 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_encoder.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_encoder.c
@@ -108,7 +108,7 @@ static void exynos_drm_encoder_dpms(struct drm_encoder *encoder, int mode)
108 108
109static bool 109static bool
110exynos_drm_encoder_mode_fixup(struct drm_encoder *encoder, 110exynos_drm_encoder_mode_fixup(struct drm_encoder *encoder,
111 struct drm_display_mode *mode, 111 const struct drm_display_mode *mode,
112 struct drm_display_mode *adjusted_mode) 112 struct drm_display_mode *adjusted_mode)
113{ 113{
114 struct drm_device *dev = encoder->dev; 114 struct drm_device *dev = encoder->dev;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
index 5d9d2c2f8f3f..8ffcdf8b9e22 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.c
@@ -142,7 +142,7 @@ static void drm_hdmi_disable_vblank(struct device *subdrv_dev)
142 142
143static void drm_hdmi_mode_fixup(struct device *subdrv_dev, 143static void drm_hdmi_mode_fixup(struct device *subdrv_dev,
144 struct drm_connector *connector, 144 struct drm_connector *connector,
145 struct drm_display_mode *mode, 145 const struct drm_display_mode *mode,
146 struct drm_display_mode *adjusted_mode) 146 struct drm_display_mode *adjusted_mode)
147{ 147{
148 struct drm_hdmi_context *ctx = to_context(subdrv_dev); 148 struct drm_hdmi_context *ctx = to_context(subdrv_dev);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
index bd8126996e52..a91c42088e42 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_hdmi.h
@@ -51,7 +51,7 @@ struct exynos_hdmi_ops {
51 51
52 /* manager */ 52 /* manager */
53 void (*mode_fixup)(void *ctx, struct drm_connector *connector, 53 void (*mode_fixup)(void *ctx, struct drm_connector *connector,
54 struct drm_display_mode *mode, 54 const struct drm_display_mode *mode,
55 struct drm_display_mode *adjusted_mode); 55 struct drm_display_mode *adjusted_mode);
56 void (*mode_set)(void *ctx, void *mode); 56 void (*mode_set)(void *ctx, void *mode);
57 void (*get_max_resol)(void *ctx, unsigned int *width, 57 void (*get_max_resol)(void *ctx, unsigned int *width,
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c
index a137e9e39a33..066bde3f19c4 100644
--- a/drivers/gpu/drm/exynos/exynos_hdmi.c
+++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
@@ -1940,7 +1940,7 @@ static void hdmi_conf_apply(struct hdmi_context *hdata)
1940} 1940}
1941 1941
1942static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector, 1942static void hdmi_mode_fixup(void *ctx, struct drm_connector *connector,
1943 struct drm_display_mode *mode, 1943 const struct drm_display_mode *mode,
1944 struct drm_display_mode *adjusted_mode) 1944 struct drm_display_mode *adjusted_mode)
1945{ 1945{
1946 struct drm_display_mode *m; 1946 struct drm_display_mode *m;
diff --git a/drivers/gpu/drm/gma500/cdv_intel_crt.c b/drivers/gpu/drm/gma500/cdv_intel_crt.c
index 187422018601..8c175345d85c 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_crt.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_crt.c
@@ -82,7 +82,7 @@ static int cdv_intel_crt_mode_valid(struct drm_connector *connector,
82} 82}
83 83
84static bool cdv_intel_crt_mode_fixup(struct drm_encoder *encoder, 84static bool cdv_intel_crt_mode_fixup(struct drm_encoder *encoder,
85 struct drm_display_mode *mode, 85 const struct drm_display_mode *mode,
86 struct drm_display_mode *adjusted_mode) 86 struct drm_display_mode *adjusted_mode)
87{ 87{
88 return true; 88 return true;
diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c
index c3e9a0f701df..a68509ba22a8 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_display.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_display.c
@@ -913,7 +913,7 @@ static void cdv_intel_crtc_commit(struct drm_crtc *crtc)
913} 913}
914 914
915static bool cdv_intel_crtc_mode_fixup(struct drm_crtc *crtc, 915static bool cdv_intel_crtc_mode_fixup(struct drm_crtc *crtc,
916 struct drm_display_mode *mode, 916 const struct drm_display_mode *mode,
917 struct drm_display_mode *adjusted_mode) 917 struct drm_display_mode *adjusted_mode)
918{ 918{
919 return true; 919 return true;
diff --git a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
index 88b59d4a7b7f..a86f87b9ddde 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_hdmi.c
@@ -90,7 +90,7 @@ static void cdv_hdmi_mode_set(struct drm_encoder *encoder,
90} 90}
91 91
92static bool cdv_hdmi_mode_fixup(struct drm_encoder *encoder, 92static bool cdv_hdmi_mode_fixup(struct drm_encoder *encoder,
93 struct drm_display_mode *mode, 93 const struct drm_display_mode *mode,
94 struct drm_display_mode *adjusted_mode) 94 struct drm_display_mode *adjusted_mode)
95{ 95{
96 return true; 96 return true;
diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
index ff5b58eb878c..c7f9468b74ba 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_lvds.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_lvds.c
@@ -270,7 +270,7 @@ static int cdv_intel_lvds_mode_valid(struct drm_connector *connector,
270} 270}
271 271
272static bool cdv_intel_lvds_mode_fixup(struct drm_encoder *encoder, 272static bool cdv_intel_lvds_mode_fixup(struct drm_encoder *encoder,
273 struct drm_display_mode *mode, 273 const struct drm_display_mode *mode,
274 struct drm_display_mode *adjusted_mode) 274 struct drm_display_mode *adjusted_mode)
275{ 275{
276 struct drm_device *dev = encoder->dev; 276 struct drm_device *dev = encoder->dev;
diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
index b34ff097b979..d4813e03f5ee 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.c
@@ -684,7 +684,7 @@ void mdfld_dsi_dpi_dpms(struct drm_encoder *encoder, int mode)
684} 684}
685 685
686bool mdfld_dsi_dpi_mode_fixup(struct drm_encoder *encoder, 686bool mdfld_dsi_dpi_mode_fixup(struct drm_encoder *encoder,
687 struct drm_display_mode *mode, 687 const struct drm_display_mode *mode,
688 struct drm_display_mode *adjusted_mode) 688 struct drm_display_mode *adjusted_mode)
689{ 689{
690 struct mdfld_dsi_encoder *dsi_encoder = mdfld_dsi_encoder(encoder); 690 struct mdfld_dsi_encoder *dsi_encoder = mdfld_dsi_encoder(encoder);
diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.h b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.h
index 6f762478b959..2b40663e1696 100644
--- a/drivers/gpu/drm/gma500/mdfld_dsi_dpi.h
+++ b/drivers/gpu/drm/gma500/mdfld_dsi_dpi.h
@@ -65,7 +65,7 @@ extern struct mdfld_dsi_encoder *mdfld_dsi_dpi_init(struct drm_device *dev,
65/* MDFLD DPI helper functions */ 65/* MDFLD DPI helper functions */
66extern void mdfld_dsi_dpi_dpms(struct drm_encoder *encoder, int mode); 66extern void mdfld_dsi_dpi_dpms(struct drm_encoder *encoder, int mode);
67extern bool mdfld_dsi_dpi_mode_fixup(struct drm_encoder *encoder, 67extern bool mdfld_dsi_dpi_mode_fixup(struct drm_encoder *encoder,
68 struct drm_display_mode *mode, 68 const struct drm_display_mode *mode,
69 struct drm_display_mode *adjusted_mode); 69 struct drm_display_mode *adjusted_mode);
70extern void mdfld_dsi_dpi_prepare(struct drm_encoder *encoder); 70extern void mdfld_dsi_dpi_prepare(struct drm_encoder *encoder);
71extern void mdfld_dsi_dpi_commit(struct drm_encoder *encoder); 71extern void mdfld_dsi_dpi_commit(struct drm_encoder *encoder);
diff --git a/drivers/gpu/drm/gma500/mdfld_intel_display.c b/drivers/gpu/drm/gma500/mdfld_intel_display.c
index 3f3cd619c79f..dec6a9aea3c6 100644
--- a/drivers/gpu/drm/gma500/mdfld_intel_display.c
+++ b/drivers/gpu/drm/gma500/mdfld_intel_display.c
@@ -117,7 +117,7 @@ static void psb_intel_crtc_commit(struct drm_crtc *crtc)
117} 117}
118 118
119static bool psb_intel_crtc_mode_fixup(struct drm_crtc *crtc, 119static bool psb_intel_crtc_mode_fixup(struct drm_crtc *crtc,
120 struct drm_display_mode *mode, 120 const struct drm_display_mode *mode,
121 struct drm_display_mode *adjusted_mode) 121 struct drm_display_mode *adjusted_mode)
122{ 122{
123 return true; 123 return true;
diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b/drivers/gpu/drm/gma500/oaktrail_crtc.c
index f821c835ca90..cdafd2acc72f 100644
--- a/drivers/gpu/drm/gma500/oaktrail_crtc.c
+++ b/drivers/gpu/drm/gma500/oaktrail_crtc.c
@@ -487,7 +487,7 @@ oaktrail_crtc_mode_set_exit:
487} 487}
488 488
489static bool oaktrail_crtc_mode_fixup(struct drm_crtc *crtc, 489static bool oaktrail_crtc_mode_fixup(struct drm_crtc *crtc,
490 struct drm_display_mode *mode, 490 const struct drm_display_mode *mode,
491 struct drm_display_mode *adjusted_mode) 491 struct drm_display_mode *adjusted_mode)
492{ 492{
493 return true; 493 return true;
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
index c10899c953b9..2eb3dc4e9c9b 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
@@ -191,7 +191,7 @@ static int oaktrail_hdmi_mode_valid(struct drm_connector *connector,
191} 191}
192 192
193static bool oaktrail_hdmi_mode_fixup(struct drm_encoder *encoder, 193static bool oaktrail_hdmi_mode_fixup(struct drm_encoder *encoder,
194 struct drm_display_mode *mode, 194 const struct drm_display_mode *mode,
195 struct drm_display_mode *adjusted_mode) 195 struct drm_display_mode *adjusted_mode)
196{ 196{
197 return true; 197 return true;
diff --git a/drivers/gpu/drm/gma500/psb_intel_display.c b/drivers/gpu/drm/gma500/psb_intel_display.c
index 36c3c99612f6..30dc22a7156c 100644
--- a/drivers/gpu/drm/gma500/psb_intel_display.c
+++ b/drivers/gpu/drm/gma500/psb_intel_display.c
@@ -543,7 +543,7 @@ void psb_intel_encoder_destroy(struct drm_encoder *encoder)
543} 543}
544 544
545static bool psb_intel_crtc_mode_fixup(struct drm_crtc *crtc, 545static bool psb_intel_crtc_mode_fixup(struct drm_crtc *crtc,
546 struct drm_display_mode *mode, 546 const struct drm_display_mode *mode,
547 struct drm_display_mode *adjusted_mode) 547 struct drm_display_mode *adjusted_mode)
548{ 548{
549 return true; 549 return true;
diff --git a/drivers/gpu/drm/gma500/psb_intel_drv.h b/drivers/gpu/drm/gma500/psb_intel_drv.h
index 2515f83248cb..ebe1a28f60e1 100644
--- a/drivers/gpu/drm/gma500/psb_intel_drv.h
+++ b/drivers/gpu/drm/gma500/psb_intel_drv.h
@@ -268,7 +268,7 @@ extern struct drm_framebuffer *psb_intel_framebuffer_create(struct drm_device
268 *mode_cmd, 268 *mode_cmd,
269 void *mm_private); 269 void *mm_private);
270extern bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder, 270extern bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder,
271 struct drm_display_mode *mode, 271 const struct drm_display_mode *mode,
272 struct drm_display_mode *adjusted_mode); 272 struct drm_display_mode *adjusted_mode);
273extern int psb_intel_lvds_mode_valid(struct drm_connector *connector, 273extern int psb_intel_lvds_mode_valid(struct drm_connector *connector,
274 struct drm_display_mode *mode); 274 struct drm_display_mode *mode);
diff --git a/drivers/gpu/drm/gma500/psb_intel_lvds.c b/drivers/gpu/drm/gma500/psb_intel_lvds.c
index c83f5b5d1057..37adc9edf974 100644
--- a/drivers/gpu/drm/gma500/psb_intel_lvds.c
+++ b/drivers/gpu/drm/gma500/psb_intel_lvds.c
@@ -375,7 +375,7 @@ int psb_intel_lvds_mode_valid(struct drm_connector *connector,
375} 375}
376 376
377bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder, 377bool psb_intel_lvds_mode_fixup(struct drm_encoder *encoder,
378 struct drm_display_mode *mode, 378 const struct drm_display_mode *mode,
379 struct drm_display_mode *adjusted_mode) 379 struct drm_display_mode *adjusted_mode)
380{ 380{
381 struct drm_device *dev = encoder->dev; 381 struct drm_device *dev = encoder->dev;
diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
index d39b15be7649..0466c7b985f8 100644
--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
@@ -901,7 +901,7 @@ static bool psb_intel_sdvo_set_tv_format(struct psb_intel_sdvo *psb_intel_sdvo)
901 901
902static bool 902static bool
903psb_intel_sdvo_set_output_timings_from_mode(struct psb_intel_sdvo *psb_intel_sdvo, 903psb_intel_sdvo_set_output_timings_from_mode(struct psb_intel_sdvo *psb_intel_sdvo,
904 struct drm_display_mode *mode) 904 const struct drm_display_mode *mode)
905{ 905{
906 struct psb_intel_sdvo_dtd output_dtd; 906 struct psb_intel_sdvo_dtd output_dtd;
907 907
@@ -918,7 +918,7 @@ psb_intel_sdvo_set_output_timings_from_mode(struct psb_intel_sdvo *psb_intel_sdv
918 918
919static bool 919static bool
920psb_intel_sdvo_set_input_timings_for_mode(struct psb_intel_sdvo *psb_intel_sdvo, 920psb_intel_sdvo_set_input_timings_for_mode(struct psb_intel_sdvo *psb_intel_sdvo,
921 struct drm_display_mode *mode, 921 const struct drm_display_mode *mode,
922 struct drm_display_mode *adjusted_mode) 922 struct drm_display_mode *adjusted_mode)
923{ 923{
924 /* Reset the input timing to the screen. Assume always input 0. */ 924 /* Reset the input timing to the screen. Assume always input 0. */
@@ -942,7 +942,7 @@ psb_intel_sdvo_set_input_timings_for_mode(struct psb_intel_sdvo *psb_intel_sdvo,
942} 942}
943 943
944static bool psb_intel_sdvo_mode_fixup(struct drm_encoder *encoder, 944static bool psb_intel_sdvo_mode_fixup(struct drm_encoder *encoder,
945 struct drm_display_mode *mode, 945 const struct drm_display_mode *mode,
946 struct drm_display_mode *adjusted_mode) 946 struct drm_display_mode *adjusted_mode)
947{ 947{
948 struct psb_intel_sdvo *psb_intel_sdvo = to_psb_intel_sdvo(encoder); 948 struct psb_intel_sdvo *psb_intel_sdvo = to_psb_intel_sdvo(encoder);
diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
index d3f2e8785010..36d952280c50 100644
--- a/drivers/gpu/drm/i2c/ch7006_drv.c
+++ b/drivers/gpu/drm/i2c/ch7006_drv.c
@@ -88,7 +88,7 @@ static void ch7006_encoder_restore(struct drm_encoder *encoder)
88} 88}
89 89
90static bool ch7006_encoder_mode_fixup(struct drm_encoder *encoder, 90static bool ch7006_encoder_mode_fixup(struct drm_encoder *encoder,
91 struct drm_display_mode *mode, 91 const struct drm_display_mode *mode,
92 struct drm_display_mode *adjusted_mode) 92 struct drm_display_mode *adjusted_mode)
93{ 93{
94 struct ch7006_priv *priv = to_ch7006_priv(encoder); 94 struct ch7006_priv *priv = to_ch7006_priv(encoder);
diff --git a/drivers/gpu/drm/i2c/ch7006_mode.c b/drivers/gpu/drm/i2c/ch7006_mode.c
index c860f24a5afc..9b83574141a6 100644
--- a/drivers/gpu/drm/i2c/ch7006_mode.c
+++ b/drivers/gpu/drm/i2c/ch7006_mode.c
@@ -172,7 +172,7 @@ struct ch7006_mode ch7006_modes[] = {
172}; 172};
173 173
174struct ch7006_mode *ch7006_lookup_mode(struct drm_encoder *encoder, 174struct ch7006_mode *ch7006_lookup_mode(struct drm_encoder *encoder,
175 struct drm_display_mode *drm_mode) 175 const struct drm_display_mode *drm_mode)
176{ 176{
177 struct ch7006_priv *priv = to_ch7006_priv(encoder); 177 struct ch7006_priv *priv = to_ch7006_priv(encoder);
178 struct ch7006_mode *mode; 178 struct ch7006_mode *mode;
diff --git a/drivers/gpu/drm/i2c/ch7006_priv.h b/drivers/gpu/drm/i2c/ch7006_priv.h
index 17667b7d57e7..09599f4c0c9a 100644
--- a/drivers/gpu/drm/i2c/ch7006_priv.h
+++ b/drivers/gpu/drm/i2c/ch7006_priv.h
@@ -111,7 +111,7 @@ extern struct ch7006_tv_norm_info ch7006_tv_norms[];
111extern struct ch7006_mode ch7006_modes[]; 111extern struct ch7006_mode ch7006_modes[];
112 112
113struct ch7006_mode *ch7006_lookup_mode(struct drm_encoder *encoder, 113struct ch7006_mode *ch7006_lookup_mode(struct drm_encoder *encoder,
114 struct drm_display_mode *drm_mode); 114 const struct drm_display_mode *drm_mode);
115 115
116void ch7006_setup_levels(struct drm_encoder *encoder); 116void ch7006_setup_levels(struct drm_encoder *encoder);
117void ch7006_setup_subcarrier(struct drm_encoder *encoder); 117void ch7006_setup_subcarrier(struct drm_encoder *encoder);
diff --git a/drivers/gpu/drm/i2c/sil164_drv.c b/drivers/gpu/drm/i2c/sil164_drv.c
index b7d45ab4ba69..30b8ae5e5c4a 100644
--- a/drivers/gpu/drm/i2c/sil164_drv.c
+++ b/drivers/gpu/drm/i2c/sil164_drv.c
@@ -254,7 +254,7 @@ sil164_encoder_restore(struct drm_encoder *encoder)
254 254
255static bool 255static bool
256sil164_encoder_mode_fixup(struct drm_encoder *encoder, 256sil164_encoder_mode_fixup(struct drm_encoder *encoder,
257 struct drm_display_mode *mode, 257 const struct drm_display_mode *mode,
258 struct drm_display_mode *adjusted_mode) 258 struct drm_display_mode *adjusted_mode)
259{ 259{
260 return true; 260 return true;
diff --git a/drivers/gpu/drm/i915/dvo.h b/drivers/gpu/drm/i915/dvo.h
index 8c2ad014c47f..58914691a77b 100644
--- a/drivers/gpu/drm/i915/dvo.h
+++ b/drivers/gpu/drm/i915/dvo.h
@@ -86,7 +86,7 @@ struct intel_dvo_dev_ops {
86 * buses with clock limitations. 86 * buses with clock limitations.
87 */ 87 */
88 bool (*mode_fixup)(struct intel_dvo_device *dvo, 88 bool (*mode_fixup)(struct intel_dvo_device *dvo,
89 struct drm_display_mode *mode, 89 const struct drm_display_mode *mode,
90 struct drm_display_mode *adjusted_mode); 90 struct drm_display_mode *adjusted_mode);
91 91
92 /* 92 /*
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 61d55d3141c7..48e3b76e0ab2 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -132,7 +132,7 @@ static int intel_crt_mode_valid(struct drm_connector *connector,
132} 132}
133 133
134static bool intel_crt_mode_fixup(struct drm_encoder *encoder, 134static bool intel_crt_mode_fixup(struct drm_encoder *encoder,
135 struct drm_display_mode *mode, 135 const struct drm_display_mode *mode,
136 struct drm_display_mode *adjusted_mode) 136 struct drm_display_mode *adjusted_mode)
137{ 137{
138 return true; 138 return true;
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 95817c4edbe9..2bc1505132c3 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -703,7 +703,8 @@ intel_dp_i2c_init(struct intel_dp *intel_dp,
703} 703}
704 704
705static bool 705static bool
706intel_dp_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, 706intel_dp_mode_fixup(struct drm_encoder *encoder,
707 const struct drm_display_mode *mode,
707 struct drm_display_mode *adjusted_mode) 708 struct drm_display_mode *adjusted_mode)
708{ 709{
709 struct drm_device *dev = encoder->dev; 710 struct drm_device *dev = encoder->dev;
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index 60ba50b956f2..36c542e5036b 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -136,7 +136,7 @@ static int intel_dvo_mode_valid(struct drm_connector *connector,
136} 136}
137 137
138static bool intel_dvo_mode_fixup(struct drm_encoder *encoder, 138static bool intel_dvo_mode_fixup(struct drm_encoder *encoder,
139 struct drm_display_mode *mode, 139 const struct drm_display_mode *mode,
140 struct drm_display_mode *adjusted_mode) 140 struct drm_display_mode *adjusted_mode)
141{ 141{
142 struct intel_dvo *intel_dvo = enc_to_intel_dvo(encoder); 142 struct intel_dvo *intel_dvo = enc_to_intel_dvo(encoder);
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 5b2c88ca6edb..98f602427eb8 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -685,7 +685,7 @@ static int intel_hdmi_mode_valid(struct drm_connector *connector,
685} 685}
686 686
687static bool intel_hdmi_mode_fixup(struct drm_encoder *encoder, 687static bool intel_hdmi_mode_fixup(struct drm_encoder *encoder,
688 struct drm_display_mode *mode, 688 const struct drm_display_mode *mode,
689 struct drm_display_mode *adjusted_mode) 689 struct drm_display_mode *adjusted_mode)
690{ 690{
691 return true; 691 return true;
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 9b706a540d70..49f09a8b05e9 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -229,7 +229,7 @@ static inline u32 panel_fitter_scaling(u32 source, u32 target)
229} 229}
230 230
231static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, 231static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
232 struct drm_display_mode *mode, 232 const struct drm_display_mode *mode,
233 struct drm_display_mode *adjusted_mode) 233 struct drm_display_mode *adjusted_mode)
234{ 234{
235 struct drm_device *dev = encoder->dev; 235 struct drm_device *dev = encoder->dev;
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 2f5106a488c5..26a6a4d0d078 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -935,7 +935,7 @@ static bool intel_sdvo_set_tv_format(struct intel_sdvo *intel_sdvo)
935 935
936static bool 936static bool
937intel_sdvo_set_output_timings_from_mode(struct intel_sdvo *intel_sdvo, 937intel_sdvo_set_output_timings_from_mode(struct intel_sdvo *intel_sdvo,
938 struct drm_display_mode *mode) 938 const struct drm_display_mode *mode)
939{ 939{
940 struct intel_sdvo_dtd output_dtd; 940 struct intel_sdvo_dtd output_dtd;
941 941
@@ -954,7 +954,7 @@ intel_sdvo_set_output_timings_from_mode(struct intel_sdvo *intel_sdvo,
954 * Unfortunately we have to set up the full output mode to do that. */ 954 * Unfortunately we have to set up the full output mode to do that. */
955static bool 955static bool
956intel_sdvo_get_preferred_input_mode(struct intel_sdvo *intel_sdvo, 956intel_sdvo_get_preferred_input_mode(struct intel_sdvo *intel_sdvo,
957 struct drm_display_mode *mode, 957 const struct drm_display_mode *mode,
958 struct drm_display_mode *adjusted_mode) 958 struct drm_display_mode *adjusted_mode)
959{ 959{
960 struct intel_sdvo_dtd input_dtd; 960 struct intel_sdvo_dtd input_dtd;
@@ -979,7 +979,7 @@ intel_sdvo_get_preferred_input_mode(struct intel_sdvo *intel_sdvo,
979} 979}
980 980
981static bool intel_sdvo_mode_fixup(struct drm_encoder *encoder, 981static bool intel_sdvo_mode_fixup(struct drm_encoder *encoder,
982 struct drm_display_mode *mode, 982 const struct drm_display_mode *mode,
983 struct drm_display_mode *adjusted_mode) 983 struct drm_display_mode *adjusted_mode)
984{ 984{
985 struct intel_sdvo *intel_sdvo = to_intel_sdvo(encoder); 985 struct intel_sdvo *intel_sdvo = to_intel_sdvo(encoder);
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index 3b413c9042c0..befce6c49704 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -891,7 +891,8 @@ intel_tv_mode_valid(struct drm_connector *connector,
891 891
892 892
893static bool 893static bool
894intel_tv_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, 894intel_tv_mode_fixup(struct drm_encoder *encoder,
895 const struct drm_display_mode *mode,
895 struct drm_display_mode *adjusted_mode) 896 struct drm_display_mode *adjusted_mode)
896{ 897{
897 struct drm_device *dev = encoder->dev; 898 struct drm_device *dev = encoder->dev;
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index d303061b251e..a4d7c500c97b 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -78,8 +78,8 @@ static inline void mga_wait_busy(struct mga_device *mdev)
78 * to just pass that straight through, so this does nothing 78 * to just pass that straight through, so this does nothing
79 */ 79 */
80static bool mga_crtc_mode_fixup(struct drm_crtc *crtc, 80static bool mga_crtc_mode_fixup(struct drm_crtc *crtc,
81 struct drm_display_mode *mode, 81 const struct drm_display_mode *mode,
82 struct drm_display_mode *adjusted_mode) 82 struct drm_display_mode *adjusted_mode)
83{ 83{
84 return true; 84 return true;
85} 85}
@@ -1322,8 +1322,8 @@ void mga_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
1322 * to handle any encoder-specific limitations 1322 * to handle any encoder-specific limitations
1323 */ 1323 */
1324static bool mga_encoder_mode_fixup(struct drm_encoder *encoder, 1324static bool mga_encoder_mode_fixup(struct drm_encoder *encoder,
1325 struct drm_display_mode *mode, 1325 const struct drm_display_mode *mode,
1326 struct drm_display_mode *adjusted_mode) 1326 struct drm_display_mode *adjusted_mode)
1327{ 1327{
1328 return true; 1328 return true;
1329} 1329}
diff --git a/drivers/gpu/drm/nouveau/nv04_crtc.c b/drivers/gpu/drm/nouveau/nv04_crtc.c
index 4c31c63e5528..43accc11102f 100644
--- a/drivers/gpu/drm/nouveau/nv04_crtc.c
+++ b/drivers/gpu/drm/nouveau/nv04_crtc.c
@@ -215,7 +215,7 @@ nv_crtc_dpms(struct drm_crtc *crtc, int mode)
215} 215}
216 216
217static bool 217static bool
218nv_crtc_mode_fixup(struct drm_crtc *crtc, struct drm_display_mode *mode, 218nv_crtc_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode,
219 struct drm_display_mode *adjusted_mode) 219 struct drm_display_mode *adjusted_mode)
220{ 220{
221 return true; 221 return true;
diff --git a/drivers/gpu/drm/nouveau/nv04_dac.c b/drivers/gpu/drm/nouveau/nv04_dac.c
index 8300266ffaea..38f19479417c 100644
--- a/drivers/gpu/drm/nouveau/nv04_dac.c
+++ b/drivers/gpu/drm/nouveau/nv04_dac.c
@@ -332,7 +332,7 @@ nv17_dac_detect(struct drm_encoder *encoder, struct drm_connector *connector)
332} 332}
333 333
334static bool nv04_dac_mode_fixup(struct drm_encoder *encoder, 334static bool nv04_dac_mode_fixup(struct drm_encoder *encoder,
335 struct drm_display_mode *mode, 335 const struct drm_display_mode *mode,
336 struct drm_display_mode *adjusted_mode) 336 struct drm_display_mode *adjusted_mode)
337{ 337{
338 if (nv04_dac_in_use(encoder)) 338 if (nv04_dac_in_use(encoder))
diff --git a/drivers/gpu/drm/nouveau/nv04_dfp.c b/drivers/gpu/drm/nouveau/nv04_dfp.c
index 2258746016f8..c2675623b7cd 100644
--- a/drivers/gpu/drm/nouveau/nv04_dfp.c
+++ b/drivers/gpu/drm/nouveau/nv04_dfp.c
@@ -179,7 +179,7 @@ static struct drm_encoder *get_tmds_slave(struct drm_encoder *encoder)
179} 179}
180 180
181static bool nv04_dfp_mode_fixup(struct drm_encoder *encoder, 181static bool nv04_dfp_mode_fixup(struct drm_encoder *encoder,
182 struct drm_display_mode *mode, 182 const struct drm_display_mode *mode,
183 struct drm_display_mode *adjusted_mode) 183 struct drm_display_mode *adjusted_mode)
184{ 184{
185 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 185 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
diff --git a/drivers/gpu/drm/nouveau/nv17_tv.c b/drivers/gpu/drm/nouveau/nv17_tv.c
index 696d7e7dc2a0..67be5db021f5 100644
--- a/drivers/gpu/drm/nouveau/nv17_tv.c
+++ b/drivers/gpu/drm/nouveau/nv17_tv.c
@@ -338,7 +338,7 @@ static int nv17_tv_mode_valid(struct drm_encoder *encoder,
338} 338}
339 339
340static bool nv17_tv_mode_fixup(struct drm_encoder *encoder, 340static bool nv17_tv_mode_fixup(struct drm_encoder *encoder,
341 struct drm_display_mode *mode, 341 const struct drm_display_mode *mode,
342 struct drm_display_mode *adjusted_mode) 342 struct drm_display_mode *adjusted_mode)
343{ 343{
344 struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder); 344 struct nv17_tv_norm_params *tv_norm = get_tv_norm(encoder);
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
index 97a477b3d52d..22cebd5dd694 100644
--- a/drivers/gpu/drm/nouveau/nv50_crtc.c
+++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
@@ -527,7 +527,7 @@ nv50_crtc_commit(struct drm_crtc *crtc)
527} 527}
528 528
529static bool 529static bool
530nv50_crtc_mode_fixup(struct drm_crtc *crtc, struct drm_display_mode *mode, 530nv50_crtc_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode,
531 struct drm_display_mode *adjusted_mode) 531 struct drm_display_mode *adjusted_mode)
532{ 532{
533 return true; 533 return true;
diff --git a/drivers/gpu/drm/nouveau/nv50_dac.c b/drivers/gpu/drm/nouveau/nv50_dac.c
index eb216a446b89..2c36a6b92c53 100644
--- a/drivers/gpu/drm/nouveau/nv50_dac.c
+++ b/drivers/gpu/drm/nouveau/nv50_dac.c
@@ -175,7 +175,8 @@ nv50_dac_restore(struct drm_encoder *encoder)
175} 175}
176 176
177static bool 177static bool
178nv50_dac_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, 178nv50_dac_mode_fixup(struct drm_encoder *encoder,
179 const struct drm_display_mode *mode,
179 struct drm_display_mode *adjusted_mode) 180 struct drm_display_mode *adjusted_mode)
180{ 181{
181 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 182 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c
index a9514eaa74c1..93240bde891b 100644
--- a/drivers/gpu/drm/nouveau/nv50_sor.c
+++ b/drivers/gpu/drm/nouveau/nv50_sor.c
@@ -327,7 +327,8 @@ nv50_sor_restore(struct drm_encoder *encoder)
327} 327}
328 328
329static bool 329static bool
330nv50_sor_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, 330nv50_sor_mode_fixup(struct drm_encoder *encoder,
331 const struct drm_display_mode *mode,
331 struct drm_display_mode *adjusted_mode) 332 struct drm_display_mode *adjusted_mode)
332{ 333{
333 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 334 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c
index c486d3ce3c2c..d0d60e1e7f95 100644
--- a/drivers/gpu/drm/nouveau/nvd0_display.c
+++ b/drivers/gpu/drm/nouveau/nvd0_display.c
@@ -607,7 +607,7 @@ nvd0_crtc_commit(struct drm_crtc *crtc)
607} 607}
608 608
609static bool 609static bool
610nvd0_crtc_mode_fixup(struct drm_crtc *crtc, struct drm_display_mode *mode, 610nvd0_crtc_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode,
611 struct drm_display_mode *adjusted_mode) 611 struct drm_display_mode *adjusted_mode)
612{ 612{
613 return true; 613 return true;
@@ -938,7 +938,8 @@ nvd0_dac_dpms(struct drm_encoder *encoder, int mode)
938} 938}
939 939
940static bool 940static bool
941nvd0_dac_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, 941nvd0_dac_mode_fixup(struct drm_encoder *encoder,
942 const struct drm_display_mode *mode,
942 struct drm_display_mode *adjusted_mode) 943 struct drm_display_mode *adjusted_mode)
943{ 944{
944 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 945 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
@@ -1377,7 +1378,8 @@ nvd0_sor_dpms(struct drm_encoder *encoder, int mode)
1377} 1378}
1378 1379
1379static bool 1380static bool
1380nvd0_sor_mode_fixup(struct drm_encoder *encoder, struct drm_display_mode *mode, 1381nvd0_sor_mode_fixup(struct drm_encoder *encoder,
1382 const struct drm_display_mode *mode,
1381 struct drm_display_mode *adjusted_mode) 1383 struct drm_display_mode *adjusted_mode)
1382{ 1384{
1383 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 1385 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index a4664e015a6f..9e6f76fec527 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1624,7 +1624,7 @@ int atombios_crtc_mode_set(struct drm_crtc *crtc,
1624} 1624}
1625 1625
1626static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc, 1626static bool atombios_crtc_mode_fixup(struct drm_crtc *crtc,
1627 struct drm_display_mode *mode, 1627 const struct drm_display_mode *mode,
1628 struct drm_display_mode *adjusted_mode) 1628 struct drm_display_mode *adjusted_mode)
1629{ 1629{
1630 if (!radeon_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode)) 1630 if (!radeon_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
index 5131b3b0f7d2..0355536f61e4 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -608,7 +608,7 @@ int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
608} 608}
609 609
610void radeon_dp_set_link_config(struct drm_connector *connector, 610void radeon_dp_set_link_config(struct drm_connector *connector,
611 struct drm_display_mode *mode) 611 const struct drm_display_mode *mode)
612{ 612{
613 struct radeon_connector *radeon_connector = to_radeon_connector(connector); 613 struct radeon_connector *radeon_connector = to_radeon_connector(connector);
614 struct radeon_connector_atom_dig *dig_connector; 614 struct radeon_connector_atom_dig *dig_connector;
diff --git a/drivers/gpu/drm/radeon/atombios_encoders.c b/drivers/gpu/drm/radeon/atombios_encoders.c
index 486ccdf4aacd..7dfc62fae6a6 100644
--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -58,7 +58,7 @@ static inline bool radeon_encoder_is_digital(struct drm_encoder *encoder)
58} 58}
59 59
60static bool radeon_atom_mode_fixup(struct drm_encoder *encoder, 60static bool radeon_atom_mode_fixup(struct drm_encoder *encoder,
61 struct drm_display_mode *mode, 61 const struct drm_display_mode *mode,
62 struct drm_display_mode *adjusted_mode) 62 struct drm_display_mode *adjusted_mode)
63{ 63{
64 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 64 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
@@ -2234,7 +2234,7 @@ radeon_atom_ext_dpms(struct drm_encoder *encoder, int mode)
2234} 2234}
2235 2235
2236static bool radeon_atom_ext_mode_fixup(struct drm_encoder *encoder, 2236static bool radeon_atom_ext_mode_fixup(struct drm_encoder *encoder,
2237 struct drm_display_mode *mode, 2237 const struct drm_display_mode *mode,
2238 struct drm_display_mode *adjusted_mode) 2238 struct drm_display_mode *adjusted_mode)
2239{ 2239{
2240 return true; 2240 return true;
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index 64a008d14493..7ddef8f30d0e 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1401,7 +1401,7 @@ void radeon_modeset_fini(struct radeon_device *rdev)
1401 radeon_i2c_fini(rdev); 1401 radeon_i2c_fini(rdev);
1402} 1402}
1403 1403
1404static bool is_hdtv_mode(struct drm_display_mode *mode) 1404static bool is_hdtv_mode(const struct drm_display_mode *mode)
1405{ 1405{
1406 /* try and guess if this is a tv or a monitor */ 1406 /* try and guess if this is a tv or a monitor */
1407 if ((mode->vdisplay == 480 && mode->hdisplay == 720) || /* 480p */ 1407 if ((mode->vdisplay == 480 && mode->hdisplay == 720) || /* 480p */
@@ -1414,7 +1414,7 @@ static bool is_hdtv_mode(struct drm_display_mode *mode)
1414} 1414}
1415 1415
1416bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc, 1416bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
1417 struct drm_display_mode *mode, 1417 const struct drm_display_mode *mode,
1418 struct drm_display_mode *adjusted_mode) 1418 struct drm_display_mode *adjusted_mode)
1419{ 1419{
1420 struct drm_device *dev = crtc->dev; 1420 struct drm_device *dev = crtc->dev;
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
index 210317c7045e..d5fd615897ec 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
@@ -990,7 +990,7 @@ static void radeon_set_pll(struct drm_crtc *crtc, struct drm_display_mode *mode)
990} 990}
991 991
992static bool radeon_crtc_mode_fixup(struct drm_crtc *crtc, 992static bool radeon_crtc_mode_fixup(struct drm_crtc *crtc,
993 struct drm_display_mode *mode, 993 const struct drm_display_mode *mode,
994 struct drm_display_mode *adjusted_mode) 994 struct drm_display_mode *adjusted_mode)
995{ 995{
996 if (!radeon_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode)) 996 if (!radeon_crtc_scaling_mode_fixup(crtc, mode, adjusted_mode))
diff --git a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
index a0c82229e8f0..670e9910f869 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c
@@ -244,7 +244,7 @@ static void radeon_legacy_lvds_mode_set(struct drm_encoder *encoder,
244} 244}
245 245
246static bool radeon_legacy_mode_fixup(struct drm_encoder *encoder, 246static bool radeon_legacy_mode_fixup(struct drm_encoder *encoder,
247 struct drm_display_mode *mode, 247 const struct drm_display_mode *mode,
248 struct drm_display_mode *adjusted_mode) 248 struct drm_display_mode *adjusted_mode)
249{ 249{
250 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); 250 struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 5b10ffd7bb2f..f380d59c5763 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -488,7 +488,7 @@ extern void radeon_connector_hotplug(struct drm_connector *connector);
488extern int radeon_dp_mode_valid_helper(struct drm_connector *connector, 488extern int radeon_dp_mode_valid_helper(struct drm_connector *connector,
489 struct drm_display_mode *mode); 489 struct drm_display_mode *mode);
490extern void radeon_dp_set_link_config(struct drm_connector *connector, 490extern void radeon_dp_set_link_config(struct drm_connector *connector,
491 struct drm_display_mode *mode); 491 const struct drm_display_mode *mode);
492extern void radeon_dp_link_train(struct drm_encoder *encoder, 492extern void radeon_dp_link_train(struct drm_encoder *encoder,
493 struct drm_connector *connector); 493 struct drm_connector *connector);
494extern bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector); 494extern bool radeon_dp_needs_link_train(struct radeon_connector *radeon_connector);
@@ -678,7 +678,7 @@ void radeon_enc_destroy(struct drm_encoder *encoder);
678void radeon_copy_fb(struct drm_device *dev, struct drm_gem_object *dst_obj); 678void radeon_copy_fb(struct drm_device *dev, struct drm_gem_object *dst_obj);
679void radeon_combios_asic_init(struct drm_device *dev); 679void radeon_combios_asic_init(struct drm_device *dev);
680bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc, 680bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
681 struct drm_display_mode *mode, 681 const struct drm_display_mode *mode,
682 struct drm_display_mode *adjusted_mode); 682 struct drm_display_mode *adjusted_mode);
683void radeon_panel_mode_fixup(struct drm_encoder *encoder, 683void radeon_panel_mode_fixup(struct drm_encoder *encoder,
684 struct drm_display_mode *adjusted_mode); 684 struct drm_display_mode *adjusted_mode);
diff --git a/drivers/gpu/drm/udl/udl_encoder.c b/drivers/gpu/drm/udl/udl_encoder.c
index 56e75f0f1df5..0731ab2e6c06 100644
--- a/drivers/gpu/drm/udl/udl_encoder.c
+++ b/drivers/gpu/drm/udl/udl_encoder.c
@@ -27,7 +27,7 @@ static void udl_encoder_disable(struct drm_encoder *encoder)
27} 27}
28 28
29static bool udl_mode_fixup(struct drm_encoder *encoder, 29static bool udl_mode_fixup(struct drm_encoder *encoder,
30 struct drm_display_mode *mode, 30 const struct drm_display_mode *mode,
31 struct drm_display_mode *adjusted_mode) 31 struct drm_display_mode *adjusted_mode)
32{ 32{
33 return true; 33 return true;
diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
index 0d7816789da1..ac2d717714ce 100644
--- a/drivers/gpu/drm/udl/udl_modeset.c
+++ b/drivers/gpu/drm/udl/udl_modeset.c
@@ -251,7 +251,7 @@ static void udl_crtc_dpms(struct drm_crtc *crtc, int mode)
251} 251}
252 252
253static bool udl_crtc_mode_fixup(struct drm_crtc *crtc, 253static bool udl_crtc_mode_fixup(struct drm_crtc *crtc,
254 struct drm_display_mode *mode, 254 const struct drm_display_mode *mode,
255 struct drm_display_mode *adjusted_mode) 255 struct drm_display_mode *adjusted_mode)
256 256
257{ 257{
diff --git a/drivers/staging/omapdrm/omap_crtc.c b/drivers/staging/omapdrm/omap_crtc.c
index 8b864afb40b6..62e0022561bc 100644
--- a/drivers/staging/omapdrm/omap_crtc.c
+++ b/drivers/staging/omapdrm/omap_crtc.c
@@ -60,7 +60,7 @@ static void omap_crtc_dpms(struct drm_crtc *crtc, int mode)
60} 60}
61 61
62static bool omap_crtc_mode_fixup(struct drm_crtc *crtc, 62static bool omap_crtc_mode_fixup(struct drm_crtc *crtc,
63 struct drm_display_mode *mode, 63 const struct drm_display_mode *mode,
64 struct drm_display_mode *adjusted_mode) 64 struct drm_display_mode *adjusted_mode)
65{ 65{
66 return true; 66 return true;
diff --git a/drivers/staging/omapdrm/omap_encoder.c b/drivers/staging/omapdrm/omap_encoder.c
index 06c52cb62d2f..31c735d39217 100644
--- a/drivers/staging/omapdrm/omap_encoder.c
+++ b/drivers/staging/omapdrm/omap_encoder.c
@@ -48,7 +48,7 @@ static void omap_encoder_dpms(struct drm_encoder *encoder, int mode)
48} 48}
49 49
50static bool omap_encoder_mode_fixup(struct drm_encoder *encoder, 50static bool omap_encoder_mode_fixup(struct drm_encoder *encoder,
51 struct drm_display_mode *mode, 51 const struct drm_display_mode *mode,
52 struct drm_display_mode *adjusted_mode) 52 struct drm_display_mode *adjusted_mode)
53{ 53{
54 struct omap_encoder *omap_encoder = to_omap_encoder(encoder); 54 struct omap_encoder *omap_encoder = to_omap_encoder(encoder);
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 7988e55c98d0..e01cc80c9c30 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -62,7 +62,7 @@ struct drm_crtc_helper_funcs {
62 62
63 /* Provider can fixup or change mode timings before modeset occurs */ 63 /* Provider can fixup or change mode timings before modeset occurs */
64 bool (*mode_fixup)(struct drm_crtc *crtc, 64 bool (*mode_fixup)(struct drm_crtc *crtc,
65 struct drm_display_mode *mode, 65 const struct drm_display_mode *mode,
66 struct drm_display_mode *adjusted_mode); 66 struct drm_display_mode *adjusted_mode);
67 /* Actually set the mode */ 67 /* Actually set the mode */
68 int (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode, 68 int (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode,
@@ -96,7 +96,7 @@ struct drm_encoder_helper_funcs {
96 void (*restore)(struct drm_encoder *encoder); 96 void (*restore)(struct drm_encoder *encoder);
97 97
98 bool (*mode_fixup)(struct drm_encoder *encoder, 98 bool (*mode_fixup)(struct drm_encoder *encoder,
99 struct drm_display_mode *mode, 99 const struct drm_display_mode *mode,
100 struct drm_display_mode *adjusted_mode); 100 struct drm_display_mode *adjusted_mode);
101 void (*prepare)(struct drm_encoder *encoder); 101 void (*prepare)(struct drm_encoder *encoder);
102 void (*commit)(struct drm_encoder *encoder); 102 void (*commit)(struct drm_encoder *encoder);
diff --git a/include/drm/drm_encoder_slave.h b/include/drm/drm_encoder_slave.h
index 2f65633d28a7..7dc385233805 100644
--- a/include/drm/drm_encoder_slave.h
+++ b/include/drm/drm_encoder_slave.h
@@ -54,7 +54,7 @@ struct drm_encoder_slave_funcs {
54 void (*save)(struct drm_encoder *encoder); 54 void (*save)(struct drm_encoder *encoder);
55 void (*restore)(struct drm_encoder *encoder); 55 void (*restore)(struct drm_encoder *encoder);
56 bool (*mode_fixup)(struct drm_encoder *encoder, 56 bool (*mode_fixup)(struct drm_encoder *encoder,
57 struct drm_display_mode *mode, 57 const struct drm_display_mode *mode,
58 struct drm_display_mode *adjusted_mode); 58 struct drm_display_mode *adjusted_mode);
59 int (*mode_valid)(struct drm_encoder *encoder, 59 int (*mode_valid)(struct drm_encoder *encoder,
60 struct drm_display_mode *mode); 60 struct drm_display_mode *mode);