[PATCH 12/12] drm/dp: Add drm_dp_link_choose() helper

Thierry Reding thierry.reding at gmail.com
Mon Feb 29 06:29:22 UTC 2016


On Sun, Jan 31, 2016 at 04:39:51PM +0200, Jani Nikula wrote:
> On Mon, 14 Dec 2015, Thierry Reding <thierry.reding at gmail.com> wrote:
> > From: Thierry Reding <treding at nvidia.com>
> >
> > This helper chooses an appropriate configuration, according to the
> > bitrate requirements of the video mode and the capabilities of the
> > DisplayPort sink.
> >
> > Signed-off-by: Thierry Reding <treding at nvidia.com>
> > ---
> >  drivers/gpu/drm/drm_dp_helper.c | 55 +++++++++++++++++++++++++++++++++++++++++
> >  include/drm/drm_dp_helper.h     |  5 ++++
> >  2 files changed, 60 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
> > index da519acfeba7..95825155dc89 100644
> > --- a/drivers/gpu/drm/drm_dp_helper.c
> > +++ b/drivers/gpu/drm/drm_dp_helper.c
> > @@ -512,6 +512,61 @@ int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link)
> >  }
> >  EXPORT_SYMBOL(drm_dp_link_configure);
> >  
> > +/**
> > + * drm_dp_link_choose() - choose the lowest possible configuration for a mode
> > + * @link: DRM DP link object
> > + * @mode: DRM display mode
> > + * @info: DRM display information
> > + *
> > + * According to the eDP specification, a source should select a configuration
> > + * with the lowest number of lanes and the lowest possible link rate that can
> > + * match the bitrate requirements of a video mode. However it must ensure not
> > + * to exceed the capabilities of the sink.
> 
> Eventually this would have to take into account the intersection of
> per-sink and per-source supported rates, including the intermediate
> frequencies. Until then, i915 couldn't switch over.

I'm not sure I understand what you're saying. The idea is that drivers
will call the drm_dp_link_probe() helper to probe the sink for supported
frequencies, number of lanes and capabilities.

After that, drivers are supposed to adjust the maximum values to account
for their limitations. Hence the name for struct drm_dp_*link*, because
it contains the negotiated parameters for the link between source and
sink.

That seems to me like the logical procedure when following the spec. Is
that not how i915 works?

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160229/4a80c4ed/attachment.sig>


More information about the dri-devel mailing list