On Sat, Oct 03, 2020 at 03:18:44AM +0300, Imre Deak wrote: > Some BIOSes set an unsupported/imprecise DP link rate (for instance on > TGL A stepping). Make sure that we do an encoder recompute and a modeset > in this case. > > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > Signed-off-by: Imre Deak <imre.deak@xxxxxxxxx> Reviewed-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_dp.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > index d33a3d9fdc3a..df5277c2b9ba 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -3707,6 +3707,18 @@ bool intel_dp_initial_fastset_check(struct intel_encoder *encoder, > struct intel_crtc_state *crtc_state) > { > struct drm_i915_private *i915 = to_i915(encoder->base.dev); > + struct intel_dp *intel_dp = enc_to_intel_dp(encoder); > + > + /* > + * If BIOS has set an unsupported or non-standard link rate for some > + * reason force an encoder recompute and full modeset. > + */ > + if (intel_dp_rate_index(intel_dp->source_rates, intel_dp->num_source_rates, > + crtc_state->port_clock) < 0) { > + drm_dbg_kms(&i915->drm, "Forcing full modeset due to unsupported link rate\n"); > + crtc_state->uapi.connectors_changed = true; > + return false; > + } > > /* > * FIXME hack to force full modeset when DSC is being used. > -- > 2.25.1 -- Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx