diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-11-27 04:29:01 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-11-27 04:29:01 +0000 |
commit | b4e9bec0a9d1e9625e996d93a04b6c7a2e7545c7 (patch) | |
tree | 1f9e2569b10f525321cf78b5cb8b306611410458 /sys | |
parent | 717d01ffcc35bad5843392d0ce8b11ff2b9ac0ad (diff) |
drm/i915/dp: Ensure sink rate values are always valid
From Imre Deak
47901b77bf7dc801a084a0b377aee5974d9bc4ce in linux 5.10.y/5.10.82
6c34bd4532a3f39952952ddc102737595729afc4 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/i915/display/intel_dp.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/display/intel_dp.c b/sys/dev/pci/drm/i915/display/intel_dp.c index 7f2727c077a..c4c4a99b79f 100644 --- a/sys/dev/pci/drm/i915/display/intel_dp.c +++ b/sys/dev/pci/drm/i915/display/intel_dp.c @@ -154,6 +154,12 @@ static void vlv_steal_power_sequencer(struct drm_i915_private *dev_priv, enum pipe pipe); static void intel_dp_unset_edid(struct intel_dp *intel_dp); +static void intel_dp_set_default_sink_rates(struct intel_dp *intel_dp) +{ + intel_dp->sink_rates[0] = 162000; + intel_dp->num_sink_rates = 1; +} + /* update sink rates from dpcd */ static void intel_dp_set_sink_rates(struct intel_dp *intel_dp) { @@ -4678,6 +4684,9 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp) */ intel_psr_init_dpcd(intel_dp); + /* Clear the default sink rates */ + intel_dp->num_sink_rates = 0; + /* Read the eDP 1.4+ supported link rates. */ if (intel_dp->edp_dpcd[0] >= DP_EDP_14) { __le16 sink_rates[DP_MAX_SUPPORTED_RATES]; @@ -7781,6 +7790,8 @@ intel_dp_init_connector(struct intel_digital_port *dig_port, return false; intel_dp_set_source_rates(intel_dp); + intel_dp_set_default_sink_rates(intel_dp); + intel_dp_set_common_rates(intel_dp); intel_dp->reset_link_params = true; intel_dp->pps_pipe = INVALID_PIPE; |