[Intel-gfx] [PATCH 2/4] drm/i915/dp: Switch to using the DRM function for reading DP link status

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Aug 4 05:48:54 UTC 2016


On Thu, Aug 04, 2016 at 04:11:06AM +0100, Chris Wilson wrote:
> On Wed, Aug 03, 2016 at 08:07:39PM -0700, Dhinakaran Pandiyan wrote:
> > Since a DRM function that reads link DP link status is available, let's
> > use that instead of the i915 clone.
> > 
> > Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_dp.c               | 15 +++------------
> >  drivers/gpu/drm/i915/intel_dp_link_training.c | 11 ++++++++---
> >  drivers/gpu/drm/i915/intel_drv.h              |  2 --
> >  3 files changed, 11 insertions(+), 17 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 3ca33bd..c5c0201 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -2863,17 +2863,6 @@ static void chv_dp_post_pll_disable(struct intel_encoder *encoder)
> >  	chv_phy_post_pll_disable(encoder);
> >  }
> >  
> > -/*
> > - * Fetch AUX CH registers 0x202 - 0x207 which contain
> > - * link status information
> > - */
> > -bool
> > -intel_dp_get_link_status(struct intel_dp *intel_dp, uint8_t link_status[DP_LINK_STATUS_SIZE])
> > -{
> > -	return drm_dp_dpcd_read(&intel_dp->aux, DP_LANE0_1_STATUS, link_status,
> > -				DP_LINK_STATUS_SIZE) == DP_LINK_STATUS_SIZE;
> 
> Or just wrap it here since you add the same code everywhere, and don't
> care what the invalid length actually is.

I don't think anyone cares actually, and I can't really imagine anyone
being happy with a partial link status block. So might be a good idea
to just change drm_dp_dpcd_read_link_status() to return success vs.
failure only.

-- 
Ville Syrjälä
Intel OTC


More information about the dri-devel mailing list