drm/i915: Fix max link rate in intel_dp_mode_valid()
Consider the link rates reported by the sink via DP_SUPPORTED_LINK_RATES when checking modes against the max link rate. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Sonika Jindal <sonika.jindal@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
2ecae76ad6
commit
50fec21a7d
|
@ -206,7 +206,7 @@ intel_dp_mode_valid(struct drm_connector *connector,
|
|||
target_clock = fixed_mode->clock;
|
||||
}
|
||||
|
||||
max_link_clock = drm_dp_bw_code_to_link_rate(intel_dp_max_link_bw(intel_dp));
|
||||
max_link_clock = intel_dp_max_link_rate(intel_dp);
|
||||
max_lanes = intel_dp_max_lane_count(intel_dp);
|
||||
|
||||
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)
|
|||
return i;
|
||||
}
|
||||
|
||||
int
|
||||
intel_dp_max_link_rate(struct intel_dp *intel_dp)
|
||||
{
|
||||
int rates[DP_MAX_SUPPORTED_RATES] = {};
|
||||
int len;
|
||||
|
||||
len = intel_supported_rates(intel_dp, rates);
|
||||
if (WARN_ON(len <= 0))
|
||||
return 162000;
|
||||
|
||||
return rates[rate_to_index(0, rates) - 1];
|
||||
}
|
||||
|
||||
bool
|
||||
intel_dp_compute_config(struct intel_encoder *encoder,
|
||||
struct intel_crtc_state *pipe_config)
|
||||
|
|
|
@ -1062,6 +1062,7 @@ void intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *co
|
|||
void intel_dp_mst_suspend(struct drm_device *dev);
|
||||
void intel_dp_mst_resume(struct drm_device *dev);
|
||||
int intel_dp_max_link_bw(struct intel_dp *intel_dp);
|
||||
int intel_dp_max_link_rate(struct intel_dp *intel_dp);
|
||||
void intel_dp_hot_plug(struct intel_encoder *intel_encoder);
|
||||
void vlv_power_sequencer_reset(struct drm_i915_private *dev_priv);
|
||||
uint32_t intel_dp_pack_aux(const uint8_t *src, int src_bytes);
|
||||
|
|
Loading…
Reference in New Issue