drm: Constify adjusted_mode a bit
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 19 Mar 2020 16:38:44 +0000 (18:38 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 27 Mar 2020 15:41:48 +0000 (17:41 +0200)
The DP link computation functions shouldn't modify the
adjusted_mode so make it const.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200319163844.22783-3-ville.syrjala@linux.intel.com
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
drivers/gpu/drm/i915/display/intel_dp.c

index c33a39065704f33bba6fe96735c546f8f222cb5e..2e715e6d7bb405c9496d22e0633407df8fdf4b02 100644 (file)
@@ -2125,7 +2125,8 @@ static int intel_dp_dsc_compute_config(struct intel_dp *intel_dp,
 {
        struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
        struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
-       struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
+       const struct drm_display_mode *adjusted_mode =
+               &pipe_config->hw.adjusted_mode;
        u8 dsc_max_bpc;
        int pipe_bpp;
        int ret;
@@ -2240,7 +2241,8 @@ intel_dp_compute_link_config(struct intel_encoder *encoder,
                             struct intel_crtc_state *pipe_config,
                             struct drm_connector_state *conn_state)
 {
-       struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
+       const struct drm_display_mode *adjusted_mode =
+               &pipe_config->hw.adjusted_mode;
        struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
        struct link_config_limits limits;
        int common_len;