From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH 12/12] drm/dp: Add drm_dp_link_choose() helper Date: Mon, 29 Feb 2016 07:29:22 +0100 Message-ID: <20160229062922.GA23745@ulmo> References: <1450097764-30063-1-git-send-email-thierry.reding@gmail.com> <1450097764-30063-13-git-send-email-thierry.reding@gmail.com> <87oac1n77s.fsf@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1694627084==" Return-path: Received: from mail-wm0-x231.google.com (mail-wm0-x231.google.com [IPv6:2a00:1450:400c:c09::231]) by gabe.freedesktop.org (Postfix) with ESMTPS id E70226E0DC for ; Mon, 29 Feb 2016 06:29:25 +0000 (UTC) Received: by mail-wm0-x231.google.com with SMTP id l68so44496679wml.1 for ; Sun, 28 Feb 2016 22:29:25 -0800 (PST) In-Reply-To: <87oac1n77s.fsf@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Jani Nikula Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1694627084== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mP3DRpeJDSE+ciuQ" Content-Disposition: inline --mP3DRpeJDSE+ciuQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 31, 2016 at 04:39:51PM +0200, Jani Nikula wrote: > On Mon, 14 Dec 2015, Thierry Reding wrote: > > From: Thierry Reding > > > > 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 > > --- > > 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_h= elper.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); > > =20 > > +/** > > + * 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 config= uration > > + * with the lowest number of lanes and the lowest possible link rate t= hat can > > + * match the bitrate requirements of a video mode. However it must ens= ure not > > + * to exceed the capabilities of the sink. >=20 > 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 --mP3DRpeJDSE+ciuQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJW0+U+AAoJEN0jrNd/PrOh7o8P/i+FnEG/tuM/60D3f0iCcZXv uQJtnUWseIJKYBGsKI0Jsqpu4fNbpr1gA/5DAk1iltWwZanTpLYW5Eja+AK/lpmR 4Bo6h6RXmYmB7/ZbrfTJA8OiFjH3eF+Zxrw1XFPD+LQaNUvYfb+kxsuGUTztWa8o O1xH1IZrDYtifnJ3+YkrEBjXCRlPUEikcPPp4XuRCet9HZ0RALyHAVbHMHIwJh20 wKOs86IKKp2cOrsfG14YT17qVRKtIacRkHBj2hlDtrzfb/yaDRnsQnKXUN2q92o2 1nsJoWMAAZa06wUoF49+74DB6zdBzLOuuF5RSwkN0aa4JtGIXM+TzIem01+64GEU FCdN0JxqDyu6czejeM4SdUP5FSEvR8whvdyGKSxmOfPGs56jSmpIr2nr18nwJuQ3 OOFtb51CvhAvxh9nldLoajLVgUgrgtAj1dJKTAMeM9AjGkaNrCJVuiFCHYenSNXn 0tS+xK9CU3Jx1a4K5XL+I8YmYE3TMWs2TbueCC/PwSX9Gzeoshq1XK921NtkSwEu yvIIYhmfyhnKobZYtF5XiC36KatkBOzGI4f5VUyFyquyYsUHQH6vIgTZzv/KON9i 9L+Akbip8Ln6TE8dwIE/8LQzG/cdFAjACt7LjqhTk58ug1uZEFTy11DJ76ypCgTy OB0H5IzKlMrVf0ZfDLpT =0MWi -----END PGP SIGNATURE----- --mP3DRpeJDSE+ciuQ-- --===============1694627084== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1694627084==--