On Wed, 2018-01-31 at 13:20 -0800, Rodrigo Vivi wrote: > Since commit 'c4fb60b9aba9 ("drm/i915/bios: add DP max link > rate to VBT child device struct")' we have the new entry > defined for max dp rate that is in use for CNL. > > Let's start using it for all VBT 216+ and > also organize the cnl adjusted rates in terms of rate > and not array size. > > Cc: Jani Nikula <jani.nikula@xxxxxxxxx> > Cc: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > --- > drivers/gpu/drm/i915/i915_drv.h | 1 + > drivers/gpu/drm/i915/intel_bios.c | 3 +++ > drivers/gpu/drm/i915/intel_dp.c | 37 +++++++++++++++++++++++++++++-------- > 3 files changed, 33 insertions(+), 8 deletions(-) <snip> > +static int intel_dp_adjusted_max_rate(struct intel_dp *intel_dp) > +{ > + struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp); > + struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev); > + const struct ddi_vbt_port_info *info = > + &dev_priv->vbt.ddi_port_info[dig_port->base.port]; > + > + if (info->dp_max_link_rate) > + return info->dp_max_link_rate; What if this value is higher than cnl_adjusted_max_rate() ? -DK > + > + if (IS_CANNONLAKE(dev_priv)) > + return cnl_adjusted_max_rate(intel_dp); > + > + return INT_MAX; /* No adjusted limit */ > } > _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx