[Intel-gfx] [PATCH v3] drm/i915: Disable fast link training if DP config changes
Daniel Vetter
daniel at ffwll.ch
Wed Dec 16 05:49:51 PST 2015
On Wed, Dec 16, 2015 at 03:04:47PM +0200, Mika Kahola wrote:
> On Wed, 2015-12-16 at 14:41 +0200, Ville Syrjälä wrote:
> > On Wed, Dec 16, 2015 at 02:26:58PM +0200, Mika Kahola wrote:
> > > Disable DP fast link training if DP link configuration
> > > changes. If one of the DP link parameters i.e. link
> > > bandwidth, lane count, rate selection, port clock or bpp
> > > changes the link training does no longer apply the
> > > previously computed voltage swing and pre-emphasis values.
> > > Instead, the link training is started with zero values.
> > >
> > > v3: Remove cached old link parameters. Instead, disable
> > > fast link training feature when link parameters are
> > > set (Ville)
> > >
> > > v2: Readout DPCD register to check if no aux handshaking is
> > > required in link training (Ander)
> > >
> > > Signed-off-by: Mika Kahola <mika.kahola at intel.com>
> > > ---
> > > drivers/gpu/drm/i915/intel_dp.c | 3 ++-
> > > drivers/gpu/drm/i915/intel_dp_link_training.c | 16 ++++++++++++++++
> > > drivers/gpu/drm/i915/intel_drv.h | 1 +
> > > 3 files changed, 19 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > > index 31ba241..92adf21 100644
> > > --- a/drivers/gpu/drm/i915/intel_dp.c
> > > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > > @@ -1679,6 +1679,7 @@ void intel_dp_set_link_params(struct intel_dp *intel_dp,
> > > {
> > > intel_dp->link_rate = pipe_config->port_clock;
> > > intel_dp->lane_count = pipe_config->lane_count;
> > > + intel_dp->train_set_valid = false;
> >
> > This would disable the optimization every time we fire up the link.
> > You would have to check the new vs. current params first, and clear
> > the flag only if there's a difference.
> Yeah, you're right. A step too far..
Or should we clear in the detection code upon hotplug? Lane reversal, usb
type C and stuff like that need to probe the link in there too.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list