diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-08-18 09:49:58 -0400 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-08-22 10:59:02 -0400 |
commit | 5f88a9c61978b20acba4b5a76555eb3a4a03ab73 (patch) | |
tree | 5801ade8b6321a7d31e2c7b4d4070a3484b94962 /drivers/gpu/drm/i915/intel_dp_mst.c | |
parent | d2419ffc10e4c9559c6d67994e3e12919865c3b4 (diff) |
drm/i915: Constify states passed to enable/disable/etc. encoder hooks
The enable/disable/etc. encoder hooks aren't supposed to alter the
state(s), so pass them as const. Unfortunately C lacks any kind of deep
const thingy, so this can't catch all abuses. But at least it acts as a
hint to the reader telling them not to mess about with the state(s).
v2: Update intel_tv_mode_find() and ironlake_edp_pll_on() as well
v3: Deal with intel_sdvo_connector_state
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170818134958.15502-9-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp_mst.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp_mst.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c index 93fc8ab9bb31..8e3aad0ea60b 100644 --- a/drivers/gpu/drm/i915/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/intel_dp_mst.c | |||
@@ -123,8 +123,8 @@ static int intel_dp_mst_atomic_check(struct drm_connector *connector, | |||
123 | } | 123 | } |
124 | 124 | ||
125 | static void intel_mst_disable_dp(struct intel_encoder *encoder, | 125 | static void intel_mst_disable_dp(struct intel_encoder *encoder, |
126 | struct intel_crtc_state *old_crtc_state, | 126 | const struct intel_crtc_state *old_crtc_state, |
127 | struct drm_connector_state *old_conn_state) | 127 | const struct drm_connector_state *old_conn_state) |
128 | { | 128 | { |
129 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); | 129 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); |
130 | struct intel_digital_port *intel_dig_port = intel_mst->primary; | 130 | struct intel_digital_port *intel_dig_port = intel_mst->primary; |
@@ -146,8 +146,8 @@ static void intel_mst_disable_dp(struct intel_encoder *encoder, | |||
146 | } | 146 | } |
147 | 147 | ||
148 | static void intel_mst_post_disable_dp(struct intel_encoder *encoder, | 148 | static void intel_mst_post_disable_dp(struct intel_encoder *encoder, |
149 | struct intel_crtc_state *old_crtc_state, | 149 | const struct intel_crtc_state *old_crtc_state, |
150 | struct drm_connector_state *old_conn_state) | 150 | const struct drm_connector_state *old_conn_state) |
151 | { | 151 | { |
152 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); | 152 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); |
153 | struct intel_digital_port *intel_dig_port = intel_mst->primary; | 153 | struct intel_digital_port *intel_dig_port = intel_mst->primary; |
@@ -176,8 +176,8 @@ static void intel_mst_post_disable_dp(struct intel_encoder *encoder, | |||
176 | } | 176 | } |
177 | 177 | ||
178 | static void intel_mst_pre_enable_dp(struct intel_encoder *encoder, | 178 | static void intel_mst_pre_enable_dp(struct intel_encoder *encoder, |
179 | struct intel_crtc_state *pipe_config, | 179 | const struct intel_crtc_state *pipe_config, |
180 | struct drm_connector_state *conn_state) | 180 | const struct drm_connector_state *conn_state) |
181 | { | 181 | { |
182 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); | 182 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); |
183 | struct intel_digital_port *intel_dig_port = intel_mst->primary; | 183 | struct intel_digital_port *intel_dig_port = intel_mst->primary; |
@@ -219,8 +219,8 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder, | |||
219 | } | 219 | } |
220 | 220 | ||
221 | static void intel_mst_enable_dp(struct intel_encoder *encoder, | 221 | static void intel_mst_enable_dp(struct intel_encoder *encoder, |
222 | struct intel_crtc_state *pipe_config, | 222 | const struct intel_crtc_state *pipe_config, |
223 | struct drm_connector_state *conn_state) | 223 | const struct drm_connector_state *conn_state) |
224 | { | 224 | { |
225 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); | 225 | struct intel_dp_mst_encoder *intel_mst = enc_to_mst(&encoder->base); |
226 | struct intel_digital_port *intel_dig_port = intel_mst->primary; | 226 | struct intel_digital_port *intel_dig_port = intel_mst->primary; |