drm: Constify generic_edid_names[]
Subsystems (21)
PATCH 1/4 drm: Constify generic_edid_names[]
From: Ville Syrjälä <[email protected]>
Make generic_edid_names[] const since it's supposed to be immutable.
--- drivers/gpu/drm/drm_edid_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_edid_load.c +1 -1
@@ -32,7 +32,7 @@ MODULE_PARM_DESC(edid_firmware, "Do not probe monitor, use specified EDID blob " "from built-in data or /lib/firmware instead. ");#define GENERIC_EDIDS 6 -static const char *generic_edid_name[GENERIC_EDIDS ] = { +static const char *const generic_edid_name[GENERIC_EDIDS ] = {"edid/800x600.bin" ,"edid/1024x768.bin" ,"edid/1280x1024.bin" ,
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/4 drm: Constify TV mode names
From: Ville Syrjälä <[email protected]>
Make the mode names passed to drm_mode_create_tv_properties() const.
drivers/gpu/drm/i2c/ch7006.ko:
-.rodata 596
+.rodata 664
-.data 7064
+.data 6992
drivers/gpu/drm/nouveau/nouveau.ko:
-.rodata 146808 +.rodata 146904 -.data 178624 +.data 178528
--- drivers/gpu/drm/drm_crtc.c | 2 +- drivers/gpu/drm/i2c/ch7006_drv.c | 6 +++--- drivers/gpu/drm/i2c/ch7006_mode.c | 4 ++-- drivers/gpu/drm/i2c/ch7006_priv.h | 2 +- drivers/gpu/drm/i915/intel_tv.c | 4 ++-- drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/tvnv17.h | 2 +- include/drm/drm_crtc.h | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-)
drivers/gpu/drm/drm_crtc.c +1 -1
@@ -1519,7 +1519,7 @@ EXPORT_SYMBOL(drm_mode_create_dvi_i_properties);*/ int drm_mode_create_tv_properties (struct drm_device *dev,unsigned int num_modes, -char *modes[]) +const char *const modes[]) {struct drm_property *tv_selector;struct drm_property *tv_subconnector;
drivers/gpu/drm/i2c/ch7006_drv.c +3 -3
@@ -119,8 +119,8 @@ static void ch7006_encoder_mode_set(struct drm_encoder *encoder,struct ch7006_encoder_params *params = &priv->params;struct ch7006_state *state = &priv->state;uint8_t *regs = state->regs; -struct ch7006_mode *mode = priv->mode; -struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; +const struct ch7006_mode *mode = priv->mode; +const struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm];int start_active;ch7006_dbg (client,"\n" );
@@ -226,7 +226,7 @@ static int ch7006_encoder_get_modes(struct drm_encoder *encoder, struct drm_connector *connector) {struct ch7006_priv *priv =to_ch7006_priv (encoder); -struct ch7006_mode *mode; +const struct ch7006_mode *mode;int n =0 ;for (mode = ch7006_modes; mode->mode.clock; mode++) {
drivers/gpu/drm/i2c/ch7006_mode.c +2 -2
@@ -26,7 +26,7 @@#include "ch7006_priv.h" -char *ch7006_tv_norm_names[] = { +const char *const ch7006_tv_norm_names[] = { [TV_NORM_PAL ] ="PAL" , [TV_NORM_PAL_M ] ="PAL-M" , [TV_NORM_PAL_N ] ="PAL-N" ,
@@ -202,7 +202,7 @@ void ch7006_setup_levels(struct drm_encoder *encoder)struct i2c_client *client =drm_i2c_encoder_get_client (encoder);struct ch7006_priv *priv =to_ch7006_priv (encoder);uint8_t *regs = priv->state.regs; -struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; +const struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm];int gain;int black_level;
drivers/gpu/drm/i2c/ch7006_priv.h +1 -1
@@ -106,7 +106,7 @@ extern int ch7006_debug;extern char *ch7006_tv_norm;extern int ch7006_scale; -extern char *ch7006_tv_norm_names[]; +extern const char *const ch7006_tv_norm_names[];extern struct ch7006_tv_norm_info ch7006_tv_norms[];extern struct ch7006_mode ch7006_modes[];
drivers/gpu/drm/i915/intel_tv.c +2 -2
@@ -1579,7 +1579,7 @@ intel_tv_init(struct drm_device *dev)struct intel_encoder *intel_encoder;struct intel_connector *intel_connector;u32 tv_dac_on, tv_dac_off, save_tv_dac; -char *tv_format_names[ARRAY_SIZE (tv_modes)]; +const char *tv_format_names[ARRAY_SIZE (tv_modes)];int i, initial_mode =0 ;if ((I915_READ (TV_CTL ) &TV_FUSE_STATE_MASK ) ==TV_FUSE_STATE_DISABLED )
@@ -1677,7 +1677,7 @@ intel_tv_init(struct drm_device *dev)/* Create TV properties then attach current values */ for (i =0 ; i <ARRAY_SIZE (tv_modes); i++) - tv_format_names[i] = (char *)tv_modes[i].name; + tv_format_names[i] = tv_modes[i].name;drm_mode_create_tv_properties (dev,ARRAY_SIZE (tv_modes), tv_format_names);
drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c +1 -1
@@ -32,7 +32,7 @@#include "hw.h" #include "tvnv17.h" -char *nv17_tv_norm_names[NUM_TV_NORMS ] = { +const char *const nv17_tv_norm_names[NUM_TV_NORMS ] = { [TV_NORM_PAL ] ="PAL" , [TV_NORM_PAL_M ] ="PAL-M" , [TV_NORM_PAL_N ] ="PAL-N" ,
drivers/gpu/drm/nouveau/dispnv04/tvnv17.h +1 -1
@@ -85,7 +85,7 @@ struct nv17_tv_encoder {#define to_tv_enc (x) container_of(nouveau_encoder(x), \ struct nv17_tv_encoder, base) -extern char *nv17_tv_norm_names[NUM_TV_NORMS ]; +extern const char *const nv17_tv_norm_names[NUM_TV_NORMS ]; extern struct nv17_tv_norm_params { enum {
include/drm/drm_crtc.h +1 -1
@@ -1390,7 +1390,7 @@ extern int drm_property_add_enum(struct drm_property *property, int index,extern int drm_mode_create_dvi_i_properties (struct drm_device *dev);extern int drm_mode_create_tv_properties (struct drm_device *dev,unsigned int num_modes, -char *modes[]); +const char *const modes[]);extern int drm_mode_create_scaling_mode_property (struct drm_device *dev);extern int drm_mode_create_aspect_ratio_property (struct drm_device *dev);extern int drm_mode_create_dirty_info_property (struct drm_device *dev);
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/4 drm/i2c/ch7006: Constify ch7006_tv_norms[] and ch7006_modes[]
In reply to [email protected]From: Ville Syrjälä <[email protected]>
drivers/gpu/drm/i2c/ch7006.ko:
-.text 5913
+.text 5897
-.rodata 664
+.rodata 7256
-.data 6992
+.data 416
--- drivers/gpu/drm/i2c/ch7006_mode.c | 22 +++++++++++----------- drivers/gpu/drm/i2c/ch7006_priv.h | 10 +++++----- 2 files changed, 16 insertions(+), 16 deletions(-)
drivers/gpu/drm/i2c/ch7006_mode.c +11 -11
@@ -46,7 +46,7 @@ const char * const ch7006_tv_norm_names[] = { .vtotal = 625, \ .hvirtual = 810 -struct ch7006_tv_norm_info ch7006_tv_norms[] = { +const struct ch7006_tv_norm_info ch7006_tv_norms[] = { [TV_NORM_NTSC_M ] = {NTSC_LIKE_TIMINGS , .black_level =0.339 * fixed1,
@@ -142,7 +142,7 @@ struct ch7006_tv_norm_info ch7006_tv_norms[] = {#define PAL_LIKE (1 << TV_NORM_PAL | 1 << TV_NORM_PAL_N | 1 << TV_NORM_PAL_NC) -struct ch7006_mode ch7006_modes[] = { +const struct ch7006_mode ch7006_modes[] = { MODE(21000, 512, 384, 840, 500, N, N, 181.797557582, 5_4, 0x6, PAL_LIKE), MODE(26250, 512, 384, 840, 625, N, N, 145.438046066, 1_1, 0x1, PAL_LIKE), MODE(20140, 512, 384, 800, 420, N, N, 213.257083791, 5_4, 0x4, NTSC_LIKE),
@@ -171,11 +171,11 @@ struct ch7006_mode ch7006_modes[] = { {} }; -struct ch7006_mode *ch7006_lookup_mode (struct drm_encoder *encoder, -const struct drm_display_mode *drm_mode) +const struct ch7006_mode *ch7006_lookup_mode (struct drm_encoder *encoder, +const struct drm_display_mode *drm_mode) {struct ch7006_priv *priv =to_ch7006_priv (encoder); -struct ch7006_mode *mode; +const struct ch7006_mode *mode;for (mode = ch7006_modes; mode->mode.clock; mode++) {
@@ -233,8 +233,8 @@ void ch7006_setup_subcarrier(struct drm_encoder *encoder)struct i2c_client *client =drm_i2c_encoder_get_client (encoder);struct ch7006_priv *priv =to_ch7006_priv (encoder);struct ch7006_state *state = &priv->state; -struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; -struct ch7006_mode *mode = priv->mode; +const struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; +const struct ch7006_mode *mode = priv->mode;uint32_t subc_inc; subc_inc = round_fixed((mode->subc_coeff >> 8)
@@ -257,7 +257,7 @@ void ch7006_setup_pll(struct drm_encoder *encoder)struct i2c_client *client =drm_i2c_encoder_get_client (encoder);struct ch7006_priv *priv =to_ch7006_priv (encoder);uint8_t *regs = priv->state.regs; -struct ch7006_mode *mode = priv->mode; +const struct ch7006_mode *mode = priv->mode;int n, best_n =0 ;int m, best_m =0 ;int freq, best_freq =0 ;
@@ -328,9 +328,9 @@ void ch7006_setup_properties(struct drm_encoder *encoder)struct i2c_client *client =drm_i2c_encoder_get_client (encoder);struct ch7006_priv *priv =to_ch7006_priv (encoder);struct ch7006_state *state = &priv->state; -struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; -struct ch7006_mode *ch_mode = priv->mode; -struct drm_display_mode *mode = &ch_mode->mode; +const struct ch7006_tv_norm_info *norm = &ch7006_tv_norms[priv->norm]; +const struct ch7006_mode *ch_mode = priv->mode; +const struct drm_display_mode *mode = &ch_mode->mode;uint8_t *regs = state->regs;int flicker, contrast, hpos, vpos;uint64_t scale, aspect;
drivers/gpu/drm/i2c/ch7006_priv.h +5 -5
@@ -78,7 +78,7 @@ struct ch7006_state {struct ch7006_priv {struct ch7006_encoder_params params; -struct ch7006_mode *mode; +const struct ch7006_mode *mode;struct ch7006_state state;struct ch7006_state saved_state;
@@ -107,11 +107,11 @@ extern char *ch7006_tv_norm;extern int ch7006_scale;extern const char *const ch7006_tv_norm_names[]; -extern struct ch7006_tv_norm_info ch7006_tv_norms[]; -extern struct ch7006_mode ch7006_modes[]; +extern const struct ch7006_tv_norm_info ch7006_tv_norms[]; +extern const struct ch7006_mode ch7006_modes[]; -struct ch7006_mode *ch7006_lookup_mode (struct drm_encoder *encoder, -const struct drm_display_mode *drm_mode); +const struct ch7006_mode *ch7006_lookup_mode (struct drm_encoder *encoder, +const struct drm_display_mode *drm_mode);void ch7006_setup_levels (struct drm_encoder *encoder);void ch7006_setup_subcarrier (struct drm_encoder *encoder);
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/4 drm: Constify loads of function pointer structs
In reply to [email protected]From: Ville Syrjälä <[email protected]>
Moves a bunch of junk to .rodata from .data.
drivers/gpu/drm/armada/armada.ko:
-.rodata 1040 +.rodata 1100 -.data 1156 +.data 1096
drivers/gpu/drm/atmel-hlcdc/atmel-hlcdc-dc.ko:
-.text 12488
+.text 12480
-.rodata 1696
+.rodata 1760
-.data 776
+.data 712
drivers/gpu/drm/bochs/bochs-drm.ko:
-.text 7608
+.text 7600
-.rodata 648 +.rodata 716 -.data 612 +.data 544
drivers/gpu/drm/bridge/dw_hdmi.ko:
-.rodata 120
+.rodata 216
-.data 96
+.data 0
drivers/gpu/drm/bridge/nxp-ptn3460.ko:
-.rodata 440 +.rodata 536 -.data 208 +.data 112
drivers/gpu/drm/cirrus/cirrus.ko:
-.text 10104
+.text 10092
-.rodata 528 +.rodata 596 -.data 608 +.data 540
drivers/gpu/drm/exynos/exynosdrm.ko:
-.text 125792
+.text 125788
-.rodata 10972
+.rodata 11748
-.data 6720
+.data 5944
drivers/gpu/drm/i2c/adv7511.ko:
-.rodata 1368
+.rodata 1416
-.data 164
+.data 116
drivers/gpu/drm/i2c/ch7006.ko:
-.text 5752 +.text 5760 -.rodata 6608 +.rodata 6656
-.data 216
+.data 168
drivers/gpu/drm/i2c/sil164.ko:
-.text 1660
+.text 1656
-.rodata 56
+.rodata 104 -.data 212 +.data 164
drivers/gpu/drm/i2c/tda998x.ko:
-.rodata 668 +.rodata 716 -.data 212 +.data 164
drivers/gpu/drm/imx/dw_hdmi-imx.ko:
-.rodata 768 +.rodata 824 -.data 188 +.data 132
drivers/gpu/drm/imx/imxdrm.ko:
-.rodata 624 +.rodata 652 -.data 372 +.data 344
drivers/gpu/drm/imx/imx-ipuv3-crtc.ko:
-.rodata 224 +.rodata 280 -.data 184 +.data 128
drivers/gpu/drm/imx/imx-ldb.ko:
-.rodata 660 +.rodata 784 -.data 240 +.data 116
drivers/gpu/drm/imx/imx-tve.ko:
-.rodata 400 +.rodata 524 -.data 416 +.data 292
drivers/gpu/drm/imx/parallel-display.ko:
-.rodata 400 +.rodata 524 -.data 216
+.data 92
drivers/gpu/drm/mgag200/mgag200.ko:
-.text 29244
+.text 29232
-.rodata 600 +.rodata 668 -.data 688 +.data 620
drivers/gpu/drm/nouveau/nouveau.ko:
-.rodata 105688 +.rodata 105792 -.data 125724 +.data 125620
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.ko:
-.rodata 772 +.rodata 828 -.data 148
+.data 92
drivers/gpu/drm/rockchip/rockchipdrm.ko:
-.rodata 748 +.rodata 760 -.data 448 +.data 436
drivers/gpu/drm/sti/sticompositor.ko:
-.text 12216
+.text 12212
-.rodata 1284
+.rodata 1400
-.data 488
+.data 372
drivers/gpu/drm/sti/sti_drv.ko:
-.rodata 516 +.rodata 544 -.data 368 +.data 340
drivers/gpu/drm/sti/stidvo.ko:
-.text 3356
+.text 3348
-.rodata 188 +.rodata 256 -.data 572 +.data 504
drivers/gpu/drm/sti/sti_hda.ko:
-.text 3008 +.text 3004 -.rodata 2820 +.rodata 2888
-.data 684
+.data 616
drivers/gpu/drm/sti/stihdmi.ko:
-.text 6988 +.text 6980 -.rodata 1340 +.rodata 1408
-.data 176
+.data 108
drivers/gpu/drm/tegra/tegra-drm.ko:
-.rodata 13672
+.rodata 13684
-.data 1108
+.data 1096
drivers/gpu/drm/udl/udl.ko:
-.text 11336
+.text 11332
-.rodata 560 +.rodata 684 -.data 696 +.data 572
drivers/gpu/drm/vmwgfx/vmwgfx.ko:
-.text 132244
+.text 132240
-.rodata 18296
+.rodata 18680
-.data 5096
+.data 4712
--- drivers/gpu/drm/armada/armada_crtc.c | 2 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 4 ++-- drivers/gpu/drm/bochs/bochs_kms.c | 6 +++--- drivers/gpu/drm/bridge/dw_hdmi.c | 6 +++--- drivers/gpu/drm/bridge/nxp-ptn3460.c | 6 +++--- drivers/gpu/drm/cirrus/cirrus_mode.c | 4 ++-- drivers/gpu/drm/drm_encoder_slave.c | 2 +- drivers/gpu/drm/exynos/exynos_dp_core.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_crtc.c | 4 ++-- drivers/gpu/drm/exynos/exynos_drm_dpi.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_fb.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_mic.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_vidi.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_hdmi.c | 8 ++++---- drivers/gpu/drm/i2c/adv7511.c | 2 +- drivers/gpu/drm/i2c/ch7006_drv.c | 2 +- drivers/gpu/drm/i2c/sil164_drv.c | 2 +- drivers/gpu/drm/i2c/tda998x_drv.c | 5 ++--- drivers/gpu/drm/imx/dw_hdmi-imx.c | 4 ++-- drivers/gpu/drm/imx/imx-drm-core.c | 2 +- drivers/gpu/drm/imx/imx-ldb.c | 8 ++++---- drivers/gpu/drm/imx/imx-tve.c | 8 ++++---- drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- drivers/gpu/drm/imx/parallel-display.c | 8 ++++---- drivers/gpu/drm/mgag200/mgag200_mode.c | 4 ++-- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 6 +++--- drivers/gpu/drm/nouveau/nouveau_encoder.h | 2 +- drivers/gpu/drm/rcar-du/rcar_du_hdmicon.c | 6 +++--- drivers/gpu/drm/rcar-du/rcar_du_hdmienc.c | 8 ++++---- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 4 ++-- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 2 +- drivers/gpu/drm/sti/sti_crtc.c | 4 ++-- drivers/gpu/drm/sti/sti_drv.c | 2 +- drivers/gpu/drm/sti/sti_dvo.c | 4 ++-- drivers/gpu/drm/sti/sti_hda.c | 4 ++-- drivers/gpu/drm/sti/sti_hdmi.c | 4 ++-- drivers/gpu/drm/tegra/fb.c | 2 +- drivers/gpu/drm/udl/udl_connector.c | 4 ++-- drivers/gpu/drm/udl/udl_modeset.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 6 +++--- include/drm/drm_encoder_slave.h | 2 +- 45 files changed, 101 insertions(+), 102 deletions(-)
drivers/gpu/drm/armada/armada_crtc.c +1 -1
@@ -1003,7 +1003,7 @@ armada_drm_crtc_set_property(struct drm_crtc *crtc,return 0 ; } -static struct drm_crtc_funcs armada_crtc_funcs = { +static const struct drm_crtc_funcs armada_crtc_funcs = { .cursor_set = armada_drm_crtc_cursor_set, .cursor_move = armada_drm_crtc_cursor_move, .destroy = armada_drm_crtc_destroy,
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c +2 -2
@@ -146,7 +146,7 @@ atmel_hlcdc_rgb_encoder_mode_set(struct drm_encoder *encoder, cfg); } -static struct drm_encoder_helper_funcs atmel_hlcdc_panel_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs atmel_hlcdc_panel_encoder_helper_funcs = { .mode_fixup = atmel_hlcdc_panel_encoder_mode_fixup, .mode_set = atmel_hlcdc_rgb_encoder_mode_set, .disable = atmel_hlcdc_panel_encoder_disable,
@@ -192,7 +192,7 @@ atmel_hlcdc_rgb_best_encoder(struct drm_connector *connector)return &rgb->encoder; } -static struct drm_connector_helper_funcs atmel_hlcdc_panel_connector_helper_funcs = { +static const struct drm_connector_helper_funcs atmel_hlcdc_panel_connector_helper_funcs = { .get_modes = atmel_hlcdc_panel_get_modes, .mode_valid = atmel_hlcdc_rgb_mode_valid, .best_encoder = atmel_hlcdc_rgb_best_encoder,
drivers/gpu/drm/bochs/bochs_kms.c +3 -3
@@ -245,13 +245,13 @@ static enum drm_connector_status bochs_connector_detect(struct drm_connectorreturn connector_status_connected; } -struct drm_connector_helper_funcs bochs_connector_connector_helper_funcs = { +static const struct drm_connector_helper_funcs bochs_connector_connector_helper_funcs = { .get_modes = bochs_connector_get_modes, .mode_valid = bochs_connector_mode_valid, .best_encoder = bochs_connector_best_encoder, }; -struct drm_connector_funcs bochs_connector_connector_funcs = { +static const struct drm_connector_funcs bochs_connector_connector_funcs = { .dpms = drm_helper_connector_dpms, .detect = bochs_connector_detect, .fill_modes = drm_helper_probe_single_connector_modes,
@@ -283,7 +283,7 @@ int bochs_kms_init(struct bochs_device *bochs) bochs->dev->mode_config.preferred_depth =24 ; bochs->dev->mode_config.prefer_shadow =0 ; - bochs->dev->mode_config.funcs = (void *)&bochs_mode_funcs; + bochs->dev->mode_config.funcs = &bochs_mode_funcs;bochs_crtc_init (bochs->dev);bochs_encoder_init (bochs->dev);
drivers/gpu/drm/bridge/dw_hdmi.c +3 -3
@@ -1488,20 +1488,20 @@ static void dw_hdmi_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs dw_hdmi_connector_funcs = { +static const struct drm_connector_funcs dw_hdmi_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = dw_hdmi_connector_detect, .destroy = dw_hdmi_connector_destroy, }; -static struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs dw_hdmi_connector_helper_funcs = { .get_modes = dw_hdmi_connector_get_modes, .mode_valid = dw_hdmi_connector_mode_valid, .best_encoder = dw_hdmi_connector_best_encoder, }; -static struct drm_bridge_funcs dw_hdmi_bridge_funcs = { +static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = { .enable = dw_hdmi_bridge_enable, .disable = dw_hdmi_bridge_disable, .pre_enable = dw_hdmi_bridge_nop,
drivers/gpu/drm/bridge/nxp-ptn3460.c +3 -3
@@ -242,7 +242,7 @@ static struct drm_encoder *ptn3460_best_encoder(struct drm_connector *connector)return ptn_bridge->bridge.encoder; } -static struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = { +static const struct drm_connector_helper_funcs ptn3460_connector_helper_funcs = { .get_modes = ptn3460_get_modes, .best_encoder = ptn3460_best_encoder, };
@@ -258,7 +258,7 @@ static void ptn3460_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs ptn3460_connector_funcs = { +static const struct drm_connector_funcs ptn3460_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = ptn3460_detect,
@@ -299,7 +299,7 @@ static int ptn3460_bridge_attach(struct drm_bridge *bridge)return ret; } -static struct drm_bridge_funcs ptn3460_bridge_funcs = { +static const struct drm_bridge_funcs ptn3460_bridge_funcs = { .pre_enable = ptn3460_pre_enable, .enable = ptn3460_enable, .disable = ptn3460_disable,
drivers/gpu/drm/cirrus/cirrus_mode.c +2 -2
@@ -533,12 +533,12 @@ static void cirrus_connector_destroy(struct drm_connector *connector)kfree (connector); } -struct drm_connector_helper_funcs cirrus_vga_connector_helper_funcs = { +static const struct drm_connector_helper_funcs cirrus_vga_connector_helper_funcs = { .get_modes = cirrus_vga_get_modes, .best_encoder = cirrus_connector_best_encoder, }; -struct drm_connector_funcs cirrus_vga_connector_funcs = { +static const struct drm_connector_funcs cirrus_vga_connector_funcs = { .dpms = drm_helper_connector_dpms, .detect = cirrus_vga_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/drm_encoder_slave.c +1 -1
@@ -124,7 +124,7 @@ EXPORT_SYMBOL(drm_i2c_encoder_destroy);* Wrapper fxns which can be plugged in to drm_encoder_helper_funcs: */ -static inline struct drm_encoder_slave_funcs * +static inline const struct drm_encoder_slave_funcs *get_slave_funcs (struct drm_encoder *enc) {return to_encoder_slave (enc)->slave_funcs;
drivers/gpu/drm/exynos/exynos_dp_core.c +4 -4
@@ -953,7 +953,7 @@ static void exynos_dp_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs exynos_dp_connector_funcs = { +static const struct drm_connector_funcs exynos_dp_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = exynos_dp_detect,
@@ -998,7 +998,7 @@ static struct drm_encoder *exynos_dp_best_encoder(return &dp->encoder; } -static struct drm_connector_helper_funcs exynos_dp_connector_helper_funcs = { +static const struct drm_connector_helper_funcs exynos_dp_connector_helper_funcs = { .get_modes = exynos_dp_get_modes, .best_encoder = exynos_dp_best_encoder, };
@@ -1123,14 +1123,14 @@ static void exynos_dp_disable(struct drm_encoder *encoder) dp->dpms_mode =DRM_MODE_DPMS_OFF ; } -static struct drm_encoder_helper_funcs exynos_dp_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_dp_encoder_helper_funcs = { .mode_fixup = exynos_dp_mode_fixup, .mode_set = exynos_dp_mode_set, .enable = exynos_dp_enable, .disable = exynos_dp_disable, }; -static struct drm_encoder_funcs exynos_dp_encoder_funcs = { +static const struct drm_encoder_funcs exynos_dp_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/exynos/exynos_drm_crtc.c +2 -2
@@ -95,7 +95,7 @@ static void exynos_crtc_atomic_flush(struct drm_crtc *crtc, { } -static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = { +static const struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = { .enable = exynos_drm_crtc_enable, .disable = exynos_drm_crtc_disable, .mode_fixup = exynos_drm_crtc_mode_fixup,
@@ -115,7 +115,7 @@ static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)kfree (exynos_crtc); } -static struct drm_crtc_funcs exynos_crtc_funcs = { +static const struct drm_crtc_funcs exynos_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, .destroy = exynos_drm_crtc_destroy,
drivers/gpu/drm/exynos/exynos_drm_dpi.c +4 -4
@@ -57,7 +57,7 @@ static void exynos_dpi_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs exynos_dpi_connector_funcs = { +static const struct drm_connector_funcs exynos_dpi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dpi_detect, .fill_modes = drm_helper_probe_single_connector_modes,
@@ -100,7 +100,7 @@ exynos_dpi_best_encoder(struct drm_connector *connector)return &ctx->encoder; } -static struct drm_connector_helper_funcs exynos_dpi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs exynos_dpi_connector_helper_funcs = { .get_modes = exynos_dpi_get_modes, .best_encoder = exynos_dpi_best_encoder, };
@@ -161,14 +161,14 @@ static void exynos_dpi_disable(struct drm_encoder *encoder) } } -static struct drm_encoder_helper_funcs exynos_dpi_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_dpi_encoder_helper_funcs = { .mode_fixup = exynos_dpi_mode_fixup, .mode_set = exynos_dpi_mode_set, .enable = exynos_dpi_enable, .disable = exynos_dpi_disable, }; -static struct drm_encoder_funcs exynos_dpi_encoder_funcs = { +static const struct drm_encoder_funcs exynos_dpi_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/exynos/exynos_drm_dsi.c +4 -4
@@ -1603,7 +1603,7 @@ static void exynos_dsi_connector_destroy(struct drm_connector *connector) connector->dev =NULL ; } -static struct drm_connector_funcs exynos_dsi_connector_funcs = { +static const struct drm_connector_funcs exynos_dsi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .detect = exynos_dsi_detect, .fill_modes = drm_helper_probe_single_connector_modes,
@@ -1631,7 +1631,7 @@ exynos_dsi_best_encoder(struct drm_connector *connector)return &dsi->encoder; } -static struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs = { .get_modes = exynos_dsi_get_modes, .best_encoder = exynos_dsi_best_encoder, };
@@ -1684,14 +1684,14 @@ static void exynos_dsi_mode_set(struct drm_encoder *encoder, vm->hsync_len = m->hsync_end - m->hsync_start; } -static struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = { .mode_fixup = exynos_dsi_mode_fixup, .mode_set = exynos_dsi_mode_set, .enable = exynos_dsi_enable, .disable = exynos_dsi_disable, }; -static struct drm_encoder_funcs exynos_dsi_encoder_funcs = { +static const struct drm_encoder_funcs exynos_dsi_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/exynos/exynos_drm_fb.c +1 -1
@@ -116,7 +116,7 @@ static int exynos_drm_fb_dirty(struct drm_framebuffer *fb,return 0 ; } -static struct drm_framebuffer_funcs exynos_drm_fb_funcs = { +static const struct drm_framebuffer_funcs exynos_drm_fb_funcs = { .destroy = exynos_drm_fb_destroy, .create_handle = exynos_drm_fb_create_handle, .dirty = exynos_drm_fb_dirty,
drivers/gpu/drm/exynos/exynos_drm_mic.c +1 -1
@@ -389,7 +389,7 @@ already_disabled:mutex_unlock (&mic_mutex); } -struct drm_bridge_funcs mic_bridge_funcs = { +static const struct drm_bridge_funcs mic_bridge_funcs = { .disable = mic_disable, .post_disable = mic_post_disable, .pre_enable = mic_pre_enable,
drivers/gpu/drm/exynos/exynos_drm_vidi.c +4 -4
@@ -316,7 +316,7 @@ static void vidi_connector_destroy(struct drm_connector *connector) { } -static struct drm_connector_funcs vidi_connector_funcs = { +static const struct drm_connector_funcs vidi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = vidi_detect,
@@ -360,7 +360,7 @@ static struct drm_encoder *vidi_best_encoder(struct drm_connector *connector)return &ctx->encoder; } -static struct drm_connector_helper_funcs vidi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs vidi_connector_helper_funcs = { .get_modes = vidi_get_modes, .best_encoder = vidi_best_encoder, };
@@ -408,14 +408,14 @@ static void exynos_vidi_disable(struct drm_encoder *encoder) { } -static struct drm_encoder_helper_funcs exynos_vidi_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_vidi_encoder_helper_funcs = { .mode_fixup = exynos_vidi_mode_fixup, .mode_set = exynos_vidi_mode_set, .enable = exynos_vidi_enable, .disable = exynos_vidi_disable, }; -static struct drm_encoder_funcs exynos_vidi_encoder_funcs = { +static const struct drm_encoder_funcs exynos_vidi_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/exynos/exynos_hdmi.c +4 -4
@@ -956,7 +956,7 @@ static void hdmi_connector_destroy(struct drm_connector *connector)drm_connector_cleanup (connector); } -static struct drm_connector_funcs hdmi_connector_funcs = { +static const struct drm_connector_funcs hdmi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = hdmi_detect,
@@ -1034,7 +1034,7 @@ static struct drm_encoder *hdmi_best_encoder(struct drm_connector *connector)return &hdata->encoder; } -static struct drm_connector_helper_funcs hdmi_connector_helper_funcs = { +static const struct drm_connector_helper_funcs hdmi_connector_helper_funcs = { .get_modes = hdmi_get_modes, .mode_valid = hdmi_mode_valid, .best_encoder = hdmi_best_encoder,
@@ -1792,14 +1792,14 @@ static void hdmi_disable(struct drm_encoder *encoder) hdata->powered = false; } -static struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = { .mode_fixup = hdmi_mode_fixup, .mode_set = hdmi_mode_set, .enable = hdmi_enable, .disable = hdmi_disable, }; -static struct drm_encoder_funcs exynos_hdmi_encoder_funcs = { +static const struct drm_encoder_funcs exynos_hdmi_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/i2c/adv7511.c +1 -1
@@ -752,7 +752,7 @@ static void adv7511_encoder_mode_set(struct drm_encoder *encoder, adv7511->f_tmds = mode->clock; } -static struct drm_encoder_slave_funcs adv7511_encoder_funcs = { +static const struct drm_encoder_slave_funcs adv7511_encoder_funcs = { .dpms = adv7511_encoder_dpms, .mode_valid = adv7511_encoder_mode_valid, .mode_set = adv7511_encoder_mode_set,
drivers/gpu/drm/i2c/ch7006_drv.c +1 -1
@@ -371,7 +371,7 @@ static int ch7006_encoder_set_property(struct drm_encoder *encoder,return 0 ; } -static struct drm_encoder_slave_funcs ch7006_encoder_funcs = { +static const struct drm_encoder_slave_funcs ch7006_encoder_funcs = { .set_config = ch7006_encoder_set_config, .destroy = ch7006_encoder_destroy, .dpms = ch7006_encoder_dpms,
drivers/gpu/drm/i2c/sil164_drv.c +1 -1
@@ -341,7 +341,7 @@ sil164_encoder_destroy(struct drm_encoder *encoder)drm_i2c_encoder_destroy (encoder); } -static struct drm_encoder_slave_funcs sil164_encoder_funcs = { +static const struct drm_encoder_slave_funcs sil164_encoder_funcs = { .set_config = sil164_encoder_set_config, .destroy = sil164_encoder_destroy, .dpms = sil164_encoder_dpms,
drivers/gpu/drm/i2c/tda998x_drv.c +2 -3
@@ -1213,7 +1213,7 @@ tda998x_encoder_slave_create_resources(struct drm_encoder *encoder,return 0 ; } -static struct drm_encoder_slave_funcs tda998x_encoder_slave_funcs = { +static const struct drm_encoder_slave_funcs tda998x_encoder_slave_funcs = { .set_config = tda998x_encoder_slave_set_config, .destroy = tda998x_encoder_slave_destroy, .dpms = tda998x_encoder_slave_dpms,
@@ -1467,8 +1467,7 @@ tda998x_connector_best_encoder(struct drm_connector *connector)return &priv->encoder; } -static -const struct drm_connector_helper_funcs tda998x_connector_helper_funcs = { +static const struct drm_connector_helper_funcs tda998x_connector_helper_funcs = { .get_modes = tda998x_connector_get_modes, .mode_valid = tda998x_connector_mode_valid, .best_encoder = tda998x_connector_best_encoder,
drivers/gpu/drm/imx/dw_hdmi-imx.c +2 -2
@@ -131,7 +131,7 @@ static void dw_hdmi_imx_encoder_prepare(struct drm_encoder *encoder)imx_drm_set_bus_format (encoder,MEDIA_BUS_FMT_RGB888_1X24 ); } -static struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs = { .mode_fixup = dw_hdmi_imx_encoder_mode_fixup, .mode_set = dw_hdmi_imx_encoder_mode_set, .prepare = dw_hdmi_imx_encoder_prepare,
@@ -139,7 +139,7 @@ static struct drm_encoder_helper_funcs dw_hdmi_imx_encoder_helper_funcs = { .disable = dw_hdmi_imx_encoder_disable, }; -static struct drm_encoder_funcs dw_hdmi_imx_encoder_funcs = { +static const struct drm_encoder_funcs dw_hdmi_imx_encoder_funcs = { .destroy = drm_encoder_cleanup, };
drivers/gpu/drm/imx/imx-drm-core.c +1 -1
@@ -222,7 +222,7 @@ static void imx_drm_output_poll_changed(struct drm_device *drm)#endif } -static struct drm_mode_config_funcs imx_drm_mode_config_funcs = { +static const struct drm_mode_config_funcs imx_drm_mode_config_funcs = { .fb_create = drm_fb_cma_create, .output_poll_changed = imx_drm_output_poll_changed, };
drivers/gpu/drm/imx/imx-ldb.c +4 -4
@@ -358,23 +358,23 @@ static void imx_ldb_encoder_disable(struct drm_encoder *encoder)drm_panel_unprepare (imx_ldb_ch->panel); } -static struct drm_connector_funcs imx_ldb_connector_funcs = { +static const struct drm_connector_funcs imx_ldb_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = imx_ldb_connector_detect, .destroy = imx_drm_connector_destroy, }; -static struct drm_connector_helper_funcs imx_ldb_connector_helper_funcs = { +static const struct drm_connector_helper_funcs imx_ldb_connector_helper_funcs = { .get_modes = imx_ldb_connector_get_modes, .best_encoder = imx_ldb_connector_best_encoder, }; -static struct drm_encoder_funcs imx_ldb_encoder_funcs = { +static const struct drm_encoder_funcs imx_ldb_encoder_funcs = { .destroy = imx_drm_encoder_destroy, }; -static struct drm_encoder_helper_funcs imx_ldb_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs imx_ldb_encoder_helper_funcs = { .dpms = imx_ldb_encoder_dpms, .mode_fixup = imx_ldb_encoder_mode_fixup, .prepare = imx_ldb_encoder_prepare,
drivers/gpu/drm/imx/imx-tve.c +4 -4
@@ -360,24 +360,24 @@ static void imx_tve_encoder_disable(struct drm_encoder *encoder)tve_disable (tve); } -static struct drm_connector_funcs imx_tve_connector_funcs = { +static const struct drm_connector_funcs imx_tve_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = imx_tve_connector_detect, .destroy = imx_drm_connector_destroy, }; -static struct drm_connector_helper_funcs imx_tve_connector_helper_funcs = { +static const struct drm_connector_helper_funcs imx_tve_connector_helper_funcs = { .get_modes = imx_tve_connector_get_modes, .best_encoder = imx_tve_connector_best_encoder, .mode_valid = imx_tve_connector_mode_valid, }; -static struct drm_encoder_funcs imx_tve_encoder_funcs = { +static const struct drm_encoder_funcs imx_tve_encoder_funcs = { .destroy = imx_drm_encoder_destroy, }; -static struct drm_encoder_helper_funcs imx_tve_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs imx_tve_encoder_helper_funcs = { .dpms = imx_tve_encoder_dpms, .mode_fixup = imx_tve_encoder_mode_fixup, .prepare = imx_tve_encoder_prepare,
drivers/gpu/drm/imx/ipuv3-crtc.c +1 -1
@@ -269,7 +269,7 @@ static void ipu_crtc_commit(struct drm_crtc *crtc)ipu_fb_enable (ipu_crtc); } -static struct drm_crtc_helper_funcs ipu_helper_funcs = { +static const struct drm_crtc_helper_funcs ipu_helper_funcs = { .dpms = ipu_crtc_dpms, .mode_fixup = ipu_crtc_mode_fixup, .mode_set = ipu_crtc_mode_set,
drivers/gpu/drm/imx/parallel-display.c +4 -4
@@ -144,23 +144,23 @@ static void imx_pd_encoder_disable(struct drm_encoder *encoder)drm_panel_unprepare (imxpd->panel); } -static struct drm_connector_funcs imx_pd_connector_funcs = { +static const struct drm_connector_funcs imx_pd_connector_funcs = { .dpms = drm_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = imx_pd_connector_detect, .destroy = imx_drm_connector_destroy, }; -static struct drm_connector_helper_funcs imx_pd_connector_helper_funcs = { +static const struct drm_connector_helper_funcs imx_pd_connector_helper_funcs = { .get_modes = imx_pd_connector_get_modes, .best_encoder = imx_pd_connector_best_encoder, }; -static struct drm_encoder_funcs imx_pd_encoder_funcs = { +static const struct drm_encoder_funcs imx_pd_encoder_funcs = { .destroy = imx_drm_encoder_destroy, }; -static struct drm_encoder_helper_funcs imx_pd_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs imx_pd_encoder_helper_funcs = { .dpms = imx_pd_encoder_dpms, .mode_fixup = imx_pd_encoder_mode_fixup, .prepare = imx_pd_encoder_prepare,
drivers/gpu/drm/mgag200/mgag200_mode.c +2 -2
@@ -1684,13 +1684,13 @@ static void mga_connector_destroy(struct drm_connector *connector)kfree (connector); } -struct drm_connector_helper_funcs mga_vga_connector_helper_funcs = { +static const struct drm_connector_helper_funcs mga_vga_connector_helper_funcs = { .get_modes = mga_vga_get_modes, .mode_valid = mga_vga_mode_valid, .best_encoder = mga_connector_best_encoder, }; -struct drm_connector_funcs mga_vga_connector_funcs = { +static const struct drm_connector_funcs mga_vga_connector_funcs = { .dpms = drm_helper_connector_dpms, .detect = mga_vga_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c +3 -3
@@ -769,7 +769,7 @@ static void nv17_tv_destroy(struct drm_encoder *encoder)kfree (tv_enc); } -static struct drm_encoder_helper_funcs nv17_tv_helper_funcs = { +static const struct drm_encoder_helper_funcs nv17_tv_helper_funcs = { .dpms = nv17_tv_dpms, .save = nv17_tv_save, .restore = nv17_tv_restore,
@@ -780,14 +780,14 @@ static struct drm_encoder_helper_funcs nv17_tv_helper_funcs = { .detect = nv17_tv_detect, }; -static struct drm_encoder_slave_funcs nv17_tv_slave_funcs = { +static const struct drm_encoder_slave_funcs nv17_tv_slave_funcs = { .get_modes = nv17_tv_get_modes, .mode_valid = nv17_tv_mode_valid, .create_resources = nv17_tv_create_resources, .set_property = nv17_tv_set_property, }; -static struct drm_encoder_funcs nv17_tv_funcs = { +static const struct drm_encoder_funcs nv17_tv_funcs = { .destroy = nv17_tv_destroy, };
drivers/gpu/drm/nouveau/nouveau_encoder.h +1 -1
@@ -80,7 +80,7 @@ static inline struct drm_encoder *to_drm_encoder(struct nouveau_encoder *enc)return &enc->base.base; } -static inline struct drm_encoder_slave_funcs * +static inline const struct drm_encoder_slave_funcs *get_slave_funcs (struct drm_encoder *enc) {return to_encoder_slave (enc)->slave_funcs;
drivers/gpu/drm/rcar-du/rcar_du_hdmicon.c +3 -3
@@ -28,7 +28,7 @@ static int rcar_du_hdmi_connector_get_modes(struct drm_connector *connector) {struct rcar_du_connector *con =to_rcar_connector (connector);struct drm_encoder *encoder =rcar_encoder_to_drm_encoder (con->encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->get_modes ==NULL )return 0 ;
@@ -41,7 +41,7 @@ static int rcar_du_hdmi_connector_mode_valid(struct drm_connector *connector, {struct rcar_du_connector *con =to_rcar_connector (connector);struct drm_encoder *encoder =rcar_encoder_to_drm_encoder (con->encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->mode_valid ==NULL )return MODE_OK ;
@@ -66,7 +66,7 @@ rcar_du_hdmi_connector_detect(struct drm_connector *connector, bool force) {struct rcar_du_connector *con =to_rcar_connector (connector);struct drm_encoder *encoder =rcar_encoder_to_drm_encoder (con->encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->detect ==NULL )return connector_status_unknown;
drivers/gpu/drm/rcar-du/rcar_du_hdmienc.c +4 -4
@@ -35,7 +35,7 @@ struct rcar_du_hdmienc {static void rcar_du_hdmienc_disable (struct drm_encoder *encoder) {struct rcar_du_hdmienc *hdmienc =to_rcar_hdmienc (encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->dpms) sfuncs->dpms (encoder,DRM_MODE_DPMS_OFF );
@@ -50,7 +50,7 @@ static void rcar_du_hdmienc_disable(struct drm_encoder *encoder)static void rcar_du_hdmienc_enable (struct drm_encoder *encoder) {struct rcar_du_hdmienc *hdmienc =to_rcar_hdmienc (encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (hdmienc->renc->lvds) rcar_du_lvdsenc_enable(hdmienc->renc->lvds, encoder->crtc,
@@ -67,7 +67,7 @@ static int rcar_du_hdmienc_atomic_check(struct drm_encoder *encoder, struct drm_connector_state *conn_state) {struct rcar_du_hdmienc *hdmienc =to_rcar_hdmienc (encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode;const struct drm_display_mode *mode = &crtc_state->mode;
@@ -89,7 +89,7 @@ static void rcar_du_hdmienc_mode_set(struct drm_encoder *encoder, struct drm_display_mode *adjusted_mode) {struct rcar_du_hdmienc *hdmienc =to_rcar_hdmienc (encoder); -struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder); +const struct drm_encoder_slave_funcs *sfuncs =to_slave_funcs (encoder);if (sfuncs->mode_set) sfuncs->mode_set (encoder, mode, adjusted_mode);
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +2 -2
@@ -173,7 +173,7 @@ dw_hdmi_rockchip_mode_valid(struct drm_connector *connector,return (valid) ?MODE_OK :MODE_BAD ; } -static struct drm_encoder_funcs dw_hdmi_rockchip_encoder_funcs = { +static const struct drm_encoder_funcs dw_hdmi_rockchip_encoder_funcs = { .destroy = drm_encoder_cleanup, };
@@ -218,7 +218,7 @@ static void dw_hdmi_rockchip_encoder_prepare(struct drm_encoder *encoder) ROCKCHIP_OUT_MODE_AAAA); } -static struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = { +static const struct drm_encoder_helper_funcs dw_hdmi_rockchip_encoder_helper_funcs = { .mode_fixup = dw_hdmi_rockchip_encoder_mode_fixup, .mode_set = dw_hdmi_rockchip_encoder_mode_set, .prepare = dw_hdmi_rockchip_encoder_prepare,
drivers/gpu/drm/rockchip/rockchip_drm_fb.c +1 -1
@@ -66,7 +66,7 @@ static int rockchip_drm_fb_create_handle(struct drm_framebuffer *fb, rockchip_fb->obj[0], handle); } -static struct drm_framebuffer_funcs rockchip_drm_fb_funcs = { +static const struct drm_framebuffer_funcs rockchip_drm_fb_funcs = { .destroy = rockchip_drm_fb_destroy, .create_handle = rockchip_drm_fb_create_handle, };
drivers/gpu/drm/sti/sti_crtc.c +2 -2
@@ -226,7 +226,7 @@ static void sti_crtc_atomic_flush(struct drm_crtc *crtc, } } -static struct drm_crtc_helper_funcs sti_crtc_helper_funcs = { +static const struct drm_crtc_helper_funcs sti_crtc_helper_funcs = { .enable = sti_crtc_enable, .disable = sti_crtc_disabling, .mode_fixup = sti_crtc_mode_fixup,
@@ -338,7 +338,7 @@ void sti_crtc_disable_vblank(struct drm_device *drm_dev, int crtc) }EXPORT_SYMBOL (sti_crtc_disable_vblank); -static struct drm_crtc_funcs sti_crtc_funcs = { +static const struct drm_crtc_funcs sti_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, .destroy = sti_crtc_destroy,
drivers/gpu/drm/sti/sti_drv.c +1 -1
@@ -107,7 +107,7 @@ static int sti_atomic_commit(struct drm_device *drm,return 0 ; } -static struct drm_mode_config_funcs sti_mode_config_funcs = { +static const struct drm_mode_config_funcs sti_mode_config_funcs = { .fb_create = drm_fb_cma_create, .atomic_check = drm_atomic_helper_check, .atomic_commit = sti_atomic_commit,
drivers/gpu/drm/sti/sti_dvo.c +2 -2
@@ -329,7 +329,7 @@ struct drm_encoder *sti_dvo_best_encoder(struct drm_connector *connector)return dvo_connector->encoder; } -static struct drm_connector_helper_funcs sti_dvo_connector_helper_funcs = { +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,
@@ -364,7 +364,7 @@ static void sti_dvo_connector_destroy(struct drm_connector *connector)kfree (dvo_connector); } -static struct drm_connector_funcs sti_dvo_connector_funcs = { +static const struct drm_connector_funcs sti_dvo_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_dvo_connector_detect,
drivers/gpu/drm/sti/sti_hda.c +2 -2
@@ -589,7 +589,7 @@ struct drm_encoder *sti_hda_best_encoder(struct drm_connector *connector)return hda_connector->encoder; } -static struct drm_connector_helper_funcs sti_hda_connector_helper_funcs = { +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,
@@ -611,7 +611,7 @@ static void sti_hda_connector_destroy(struct drm_connector *connector)kfree (hda_connector); } -static struct drm_connector_funcs sti_hda_connector_funcs = { +static const struct drm_connector_funcs sti_hda_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_hda_connector_detect,
drivers/gpu/drm/sti/sti_hdmi.c +2 -2
@@ -628,7 +628,7 @@ struct drm_encoder *sti_hdmi_best_encoder(struct drm_connector *connector)return hdmi_connector->encoder; } -static struct drm_connector_helper_funcs sti_hdmi_connector_helper_funcs = { +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,
@@ -663,7 +663,7 @@ static void sti_hdmi_connector_destroy(struct drm_connector *connector)kfree (hdmi_connector); } -static struct drm_connector_funcs sti_hdmi_connector_funcs = { +static const struct drm_connector_funcs sti_hdmi_connector_funcs = { .dpms = drm_atomic_helper_connector_dpms, .fill_modes = drm_helper_probe_single_connector_modes, .detect = sti_hdmi_connector_detect,
drivers/gpu/drm/tegra/fb.c +1 -1
@@ -86,7 +86,7 @@ static int tegra_fb_create_handle(struct drm_framebuffer *framebuffer,return drm_gem_handle_create (file, &fb->planes[0 ]->gem, handle); } -static struct drm_framebuffer_funcs tegra_fb_funcs = { +static const struct drm_framebuffer_funcs tegra_fb_funcs = { .destroy = tegra_fb_destroy, .create_handle = tegra_fb_create_handle, };
drivers/gpu/drm/udl/udl_connector.c +2 -2
@@ -122,13 +122,13 @@ static void udl_connector_destroy(struct drm_connector *connector)kfree (connector); } -static struct drm_connector_helper_funcs udl_connector_helper_funcs = { +static const struct drm_connector_helper_funcs udl_connector_helper_funcs = { .get_modes = udl_get_modes, .mode_valid = udl_mode_valid, .best_encoder = udl_best_single_encoder, }; -static struct drm_connector_funcs udl_connector_funcs = { +static const struct drm_connector_funcs udl_connector_funcs = { .dpms = drm_helper_connector_dpms, .detect = udl_detect, .fill_modes = drm_helper_probe_single_connector_modes,
drivers/gpu/drm/udl/udl_modeset.c +1 -1
@@ -400,7 +400,7 @@ static void udl_crtc_commit(struct drm_crtc *crtc)udl_crtc_dpms (crtc,DRM_MODE_DPMS_ON ); } -static struct drm_crtc_helper_funcs udl_helper_funcs = { +static const struct drm_crtc_helper_funcs udl_helper_funcs = { .dpms = udl_crtc_dpms, .mode_fixup = udl_crtc_mode_fixup, .mode_set = udl_crtc_mode_set,
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +2 -2
@@ -470,7 +470,7 @@ int vmw_kms_readback(struct vmw_private *dev_priv, } -static struct drm_framebuffer_funcs vmw_framebuffer_surface_funcs = { +static const struct drm_framebuffer_funcs vmw_framebuffer_surface_funcs = { .destroy = vmw_framebuffer_surface_destroy, .dirty = vmw_framebuffer_surface_dirty, };
@@ -647,7 +647,7 @@ static int vmw_framebuffer_dmabuf_dirty(struct drm_framebuffer *framebuffer,return ret; } -static struct drm_framebuffer_funcs vmw_framebuffer_dmabuf_funcs = { +static const struct drm_framebuffer_funcs vmw_framebuffer_dmabuf_funcs = { .destroy = vmw_framebuffer_dmabuf_destroy, .dirty = vmw_framebuffer_dmabuf_dirty, };
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +3 -3
@@ -294,7 +294,7 @@ static int vmw_ldu_crtc_set_config(struct drm_mode_set *set)return vmw_ldu_commit_list (dev_priv); } -static struct drm_crtc_funcs vmw_legacy_crtc_funcs = { +static const struct drm_crtc_funcs vmw_legacy_crtc_funcs = { .save = vmw_du_crtc_save, .restore = vmw_du_crtc_restore, .cursor_set = vmw_du_crtc_cursor_set,
@@ -314,7 +314,7 @@ static void vmw_ldu_encoder_destroy(struct drm_encoder *encoder)vmw_ldu_destroy (vmw_encoder_to_ldu (encoder)); } -static struct drm_encoder_funcs vmw_legacy_encoder_funcs = { +static const struct drm_encoder_funcs vmw_legacy_encoder_funcs = { .destroy = vmw_ldu_encoder_destroy, };
@@ -327,7 +327,7 @@ static void vmw_ldu_connector_destroy(struct drm_connector *connector)vmw_ldu_destroy (vmw_connector_to_ldu (connector)); } -static struct drm_connector_funcs vmw_legacy_connector_funcs = { +static const struct drm_connector_funcs vmw_legacy_connector_funcs = { .dpms = vmw_du_connector_dpms, .save = vmw_du_connector_save, .restore = vmw_du_connector_restore,
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +3 -3
@@ -530,7 +530,7 @@ out_no_fence:return ret; } -static struct drm_crtc_funcs vmw_screen_object_crtc_funcs = { +static const struct drm_crtc_funcs vmw_screen_object_crtc_funcs = { .save = vmw_du_crtc_save, .restore = vmw_du_crtc_restore, .cursor_set = vmw_du_crtc_cursor_set,
@@ -550,7 +550,7 @@ static void vmw_sou_encoder_destroy(struct drm_encoder *encoder)vmw_sou_destroy (vmw_encoder_to_sou (encoder)); } -static struct drm_encoder_funcs vmw_screen_object_encoder_funcs = { +static const struct drm_encoder_funcs vmw_screen_object_encoder_funcs = { .destroy = vmw_sou_encoder_destroy, };
@@ -563,7 +563,7 @@ static void vmw_sou_connector_destroy(struct drm_connector *connector)vmw_sou_destroy (vmw_connector_to_sou (connector)); } -static struct drm_connector_funcs vmw_sou_connector_funcs = { +static const struct drm_connector_funcs vmw_sou_connector_funcs = { .dpms = vmw_du_connector_dpms, .save = vmw_du_connector_save, .restore = vmw_du_connector_restore,
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +3 -3
@@ -1038,7 +1038,7 @@ out_finish:/* * Screen Target CRTC dispatch table */ -static struct drm_crtc_funcs vmw_stdu_crtc_funcs = { +static const struct drm_crtc_funcs vmw_stdu_crtc_funcs = { .save = vmw_du_crtc_save, .restore = vmw_du_crtc_restore, .cursor_set = vmw_du_crtc_cursor_set,
@@ -1070,7 +1070,7 @@ static void vmw_stdu_encoder_destroy(struct drm_encoder *encoder)vmw_stdu_destroy (vmw_encoder_to_stdu (encoder)); } -static struct drm_encoder_funcs vmw_stdu_encoder_funcs = { +static const struct drm_encoder_funcs vmw_stdu_encoder_funcs = { .destroy = vmw_stdu_encoder_destroy, };
@@ -1097,7 +1097,7 @@ static void vmw_stdu_connector_destroy(struct drm_connector *connector) -static struct drm_connector_funcs vmw_stdu_connector_funcs = { +static const struct drm_connector_funcs vmw_stdu_connector_funcs = { .dpms = vmw_du_connector_dpms, .save = vmw_du_connector_save, .restore = vmw_du_connector_restore,
include/drm/drm_encoder_slave.h +1 -1
@@ -95,7 +95,7 @@ struct drm_encoder_slave_funcs {struct drm_encoder_slave {struct drm_encoder base; -struct drm_encoder_slave_funcs *slave_funcs; +const struct drm_encoder_slave_funcs *slave_funcs;void *slave_priv;void *bus_priv; };
Signature · 6 lines
2.4.6 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · On Mon, Aug 31, 2015 at 8:09 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Make generic_edid_names[] const since it's supposed to be immutable.
Signed-off-by Ville Syrjälä <[email protected]>
For the series:
Quoted 20 lines
--- drivers/gpu/drm/drm_edid_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_edid_load.c +1
-2@@ -32,7 +32,7 @@ MODULE_PARM_DESC(edid_firmware, "Do not probe monitor, use specified EDID blob " "from built-in data or /lib/firmware instead. ");#define GENERIC_EDIDS 6 -static const char *generic_edid_name[GENERIC_EDIDS ] = { +static const char *const generic_edid_name[GENERIC_EDIDS ] = {"edid/800x600.bin" ,"edid/1024x768.bin" ,"edid/1280x1024.bin" , --2.4.6
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Alex Deucher
Quoted 5 lines · On Mon, Aug 31, 2015 at 8:09 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Make generic_edid_names[] const since it's supposed to be immutable.
Signed-off-by Ville Syrjälä <[email protected]>For the series:
Reviewed-by Alex Deucher <[email protected]>
Merged patches 1-3 to drm-misc, but 4th conflicts badly. Just for easier merging I'd prefer if you can split it up per-driver if possible - with all the atomic conversions I expect a lot of random context conflicts to keep coming in.
Thanks, Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 8 lines · Daniel Vetter
Quoted 7 lines · Alex Deucher
Quoted 5 lines · On Mon, Aug 31, 2015 at 8:09 AM, <[email protected]> wrote:
From: Ville Syrjälä <[email protected]>
Make generic_edid_names[] const since it's supposed to be immutable.
Signed-off-by Ville Syrjälä <[email protected]>
Quoted 7 lines
Quoted 2 lines
For the series:
Reviewed-by Alex Deucher <[email protected]>Merged patches 1-3 to drm-misc, but 4th conflicts badly. Just for easier merging I'd prefer if you can split it up per-driver if possible - with all the atomic conversions I expect a lot of random context conflicts to keep coming in.
Well, that was a good waste of some time, but I did manage to split it up.
Not sure I should bother spamming the list with it, but it's available here:git://github.com/vsyrjala/linux.git const_funcs
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel