From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm/dp: Do not busy-loop during link training Date: Mon, 11 Jan 2016 09:36:04 +0100 Message-ID: <20160111083604.GA11159@ulmo> References: <1450099316-31126-1-git-send-email-thierry.reding@gmail.com> <20151214144809.GO4437@intel.com> <20151214152341.GA1998@ulmo> <20151214163028.GS4437@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1032139724==" Return-path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by gabe.freedesktop.org (Postfix) with ESMTPS id 651B36E219 for ; Mon, 11 Jan 2016 00:36:07 -0800 (PST) Received: by mail-wm0-f53.google.com with SMTP id f206so255910645wmf.0 for ; Mon, 11 Jan 2016 00:36:07 -0800 (PST) In-Reply-To: <20151214163028.GS4437@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1032139724== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Dec 14, 2015 at 06:30:28PM +0200, Ville Syrj=C3=A4l=C3=A4 wrote: > On Mon, Dec 14, 2015 at 04:23:41PM +0100, Thierry Reding wrote: > > On Mon, Dec 14, 2015 at 04:48:09PM +0200, Ville Syrj=C3=A4l=C3=A4 wrote: > > > On Mon, Dec 14, 2015 at 02:21:56PM +0100, Thierry Reding wrote: > > > > From: Thierry Reding > > > >=20 > > > > Use microsecond sleeps for the clock recovery and channel equalizat= ion > > > > delays during link training. The duration of these delays can be fr= om > > > > 100 us up to 16 ms. It is rude to busy-loop for that amount of time. > > >=20 > > > Do you have some numbers on how this affects a typical link training > > > cycle? > >=20 > > Not really. Sinks aren't required to provide a value here, in which case > > the specification says that a default of 100 us and 400 us should be > > used for clock recovery and channel equalization, respectively. If the > > sink provides an AUX_RD_INTERVAL value, it is used for both CR and CE > > (and is in units of 4 ms). Best case a typical link training cycle would > > therefore take something like 0.5 ms and worst case, since the number of > > retries should be limited to 5, it'd be around 5 * 16 ms =3D 80 ms. Tha= t's > > not counting the actual AUX transactions, though they should be pretty > > fast. > >=20 > > Since this patch uses usleep_range(min, min * 2) the worst case now > > becomes ~ 160 ms. >=20 > Would be nice to have some *actual* numbers in the commit message, > otherwise it's all just guesswork. I only have a limited range of test equipment. In the primary test-case, which is an eDP panel, the difference was ~4.5 ms for udelay()/mdelay() and ~5 ms for the usleep_range() case. I'll see if I can get one more test setup running for better comparison. Thierry --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJWk2lwAAoJEN0jrNd/PrOhLT4QAK/kTcen/BOtg3Qe/Zajy/am NHxga9qEZi0KklG0mpS+s8/L3mc0DCrltSV/x9iWDdyKaSrybpeuU0Atl0Omr9sM W4lNz2HbJHtbyTLrpSKluzUt+HrJJ+l6AgyICyvswgvDNZFZqojgxtefaj/6QcjJ gQOVSfg26y3NAleR8Wwsl1TPwcji6tB0Yw0cGaxnlqy+l2jaX2x36WrJnfn4XEuF kPj9L9bgB0CAMRLc2mLIN/xXbz2HozDttg9K1Gu7OpFcHakMfRAzFzWBROT+um4q wd9aWPXS8oAzvUIPdyAh+/jfcO8FUZNcYv6hpIL9VjuDGqFc6NmpMLpsalJ8oMvh 8epWqLRDZNVlF1UsY04YbDLNSu9lTR7X6suPYeem0bCXH7DYEP8UjyeCPgbvVjxT 8fyx9JsuVK2e70HdO5fej9M7NAeMC+8Btn4tv42hm1itbZA7UeVqAPFoi1+2Jep5 /bw2isf6JkBrX3ADFqaLox1K78h/LZz3HcHRtqXC8erN41QCyPw0uAmDRPvsyZ00 E0BJ0JIbPFBLJVfpaefBUXAflkMLQ//o556z33AFOQdeXfjtGePc+9jLRKtG8d4j lHSVqka6ASEWE9uxkjWER3p7pwKHCVupFK7o6kX9U1Ciw1GB4B+oU0PbipfCeBDl ASJHSjX2hhisiNTOfXyl =cE5n -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv-- --===============1032139724== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1032139724==--