[Intel-gfx] [RFC] drm: Add utility function to check for edp1.4

Thierry Reding treding at nvidia.com
Mon Nov 3 09:25:01 CET 2014


On Fri, Oct 31, 2014 at 05:06:39PM +0100, Daniel Vetter wrote:
> On Wed, Oct 29, 2014 at 02:42:29PM +0100, Thierry Reding wrote:
> > On Wed, Oct 22, 2014 at 11:45:23AM +0530, sonika.jindal at intel.com wrote:
> > > From: Sonika Jindal <sonika.jindal at intel.com>
> > > 
> > > v2: Reading DP_EDP_REV, only when DISPLAY_CONTROL_CAPABLE field is set (Satheesh)
> > > 
> > > v3: Moving the utility function to drm_dp_helper (Daniel)
> > > 
> > > Signed-off-by: Sonika Jindal <sonika.jindal at intel.com>
> > > ---
> > >  drivers/gpu/drm/drm_dp_helper.c |   15 +++++++++++++++
> > >  include/drm/drm_dp_helper.h     |    2 ++
> > >  2 files changed, 17 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> > > index 08e33b8..a54a760 100644
> > > --- a/drivers/gpu/drm/drm_dp_helper.c
> > > +++ b/drivers/gpu/drm/drm_dp_helper.c
> > > @@ -768,3 +768,18 @@ void drm_dp_aux_unregister(struct drm_dp_aux *aux)
> > >  	i2c_del_adapter(&aux->ddc);
> > >  }
> > >  EXPORT_SYMBOL(drm_dp_aux_unregister);
> > > +
> > > +bool drm_dp_is_edp_v1_4(struct drm_dp_aux *aux, const u8 dpcd[DP_RECEIVER_CAP_SIZE])
> > 
> > I'd prefer if this didn't take a dpcd argument but rather directly
> > accessed the DP_EDP_CONFIGURATION_CAP register so that it can be used
> > directly rather than rely on the driver to have read a dpcd block in the
> > appropriate format.
> 
> The idea is that you'd grab the DPCD field anyway since it's needed all
> over the place. We have a pile of helpers already that take exactly this
> block and decode parts of it. So I think this makes sense - dp aux is fast
> but not entirely free, so caching seems useful.

If we want to always cache part of the DPCD wouldn't it be better to add
the cache to struct drm_dp_aux instead of having to duplicate this in
every driver?

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20141103/8ab9109a/attachment.sig>


More information about the Intel-gfx mailing list