aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c15
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h1
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 45c35681eb48..5d8ec3a33502 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -206,7 +206,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
206 target_clock = fixed_mode->clock; 206 target_clock = fixed_mode->clock;
207 } 207 }
208 208
209 max_link_clock = drm_dp_bw_code_to_link_rate(intel_dp_max_link_bw(intel_dp)); 209 max_link_clock = intel_dp_max_link_rate(intel_dp);
210 max_lanes = intel_dp_max_lane_count(intel_dp); 210 max_lanes = intel_dp_max_lane_count(intel_dp);
211 211
212 max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes); 212 max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes);
@@ -1242,6 +1242,19 @@ static int rate_to_index(int find, const int *rates)
1242 return i; 1242 return i;
1243} 1243}
1244 1244
1245int
1246intel_dp_max_link_rate(struct intel_dp *intel_dp)
1247{
1248 int rates[DP_MAX_SUPPORTED_RATES] = {};
1249 int len;
1250
1251 len = intel_supported_rates(intel_dp, rates);
1252 if (WARN_ON(len <= 0))
1253 return 162000;
1254
1255 return rates[rate_to_index(0, rates) - 1];
1256}
1257
1245bool 1258bool
1246intel_dp_compute_config(struct intel_encoder *encoder, 1259intel_dp_compute_config(struct intel_encoder *encoder,
1247 struct intel_crtc_state *pipe_config) 1260 struct intel_crtc_state *pipe_config)
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 69c8437be611..d5a1f1f46ce5 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1062,6 +1062,7 @@ void intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *co
1062void intel_dp_mst_suspend(struct drm_device *dev); 1062void intel_dp_mst_suspend(struct drm_device *dev);
1063void intel_dp_mst_resume(struct drm_device *dev); 1063void intel_dp_mst_resume(struct drm_device *dev);
1064int intel_dp_max_link_bw(struct intel_dp *intel_dp); 1064int intel_dp_max_link_bw(struct intel_dp *intel_dp);
1065int intel_dp_max_link_rate(struct intel_dp *intel_dp);
1065void intel_dp_hot_plug(struct intel_encoder *intel_encoder); 1066void intel_dp_hot_plug(struct intel_encoder *intel_encoder);
1066void vlv_power_sequencer_reset(struct drm_i915_private *dev_priv); 1067void vlv_power_sequencer_reset(struct drm_i915_private *dev_priv);
1067uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes); 1068uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes);