From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm/dp/mst: dump branch OUI in debugfs Date: Tue, 14 Jul 2015 10:28:09 +0200 Message-ID: <20150714082808.GC12465@ulmo.nvidia.com> References: <1436837679-14551-1-git-send-email-airlied@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1163283379==" Return-path: Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by gabe.freedesktop.org (Postfix) with ESMTPS id 78CC36E987 for ; Tue, 14 Jul 2015 01:28:15 -0700 (PDT) Received: by pactm7 with SMTP id tm7so2029986pac.2 for ; Tue, 14 Jul 2015 01:28:15 -0700 (PDT) In-Reply-To: <1436837679-14551-1-git-send-email-airlied@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Dave Airlie Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1163283379== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="sHrvAb52M6C8blB9" Content-Disposition: inline --sHrvAb52M6C8blB9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 14, 2015 at 11:34:39AM +1000, Dave Airlie wrote: > From: Dave Airlie >=20 > It appears some MST docks are worse than other, but the only > way to know is to see the sw revisions in here, so dump > the branch OUI so we can look at the sw revision. >=20 > Signed-off-by: Dave Airlie > --- > drivers/gpu/drm/drm_dp_mst_topology.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_= dp_mst_topology.c > index 8a3bfcd..e17a639 100644 > --- a/drivers/gpu/drm/drm_dp_mst_topology.c > +++ b/drivers/gpu/drm/drm_dp_mst_topology.c > @@ -2657,6 +2657,11 @@ void drm_dp_mst_dump_topology(struct seq_file *m, > seq_printf(m, "%02x ", buf[i]); > seq_printf(m, "\n"); > =20 > + ret =3D drm_dp_dpcd_read(mgr->aux, DP_BRANCH_OUI, buf, DP_RECEIVER_CAP= _SIZE); According to the specification, the OUI is 24-bit, whereas the receiver capability field is 15 bytes (well, at least that is the value defined for DP_RECEIVER_CAP_SIZE)... > + seq_printf(m, "branch oui: "); > + for (i =3D 0; i < DP_RECEIVER_CAP_SIZE; i++) > + seq_printf(m, "%02x ", buf[i]); > + seq_printf(m, "\n"); So this will really dump out more than just the OUI. Perhaps it'd be worth splitting that up further? 0x503 to 0x508 is an identification string and displaying it as string would presumably be more useful than the hexdump equivalent. Similarly 0x509 is a hardware revision and 0x50a/0x50b the firmware major/minor version, which might be more readable in an idiomatic format (X.Y). Thierry --sHrvAb52M6C8blB9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJVpMgSAAoJEN0jrNd/PrOhbFkP/1wJQNcqOgi0HmWcfMxQxV3n VcYhpGe1VfTTCu/R0KfGT58KAUWx1xGHBSCBhSHSPAS2dI22YbySRH+Dz+sD7aie f4kOjo1lsDw/xGYEXOa1XkSAE/FJr0mn5GcDpmz09/cS4pFYIvX25kSuQotfkS1O Bmeh5AL4pClFkWz0PpZJfyKASFF9i8YDD+9ZDIjss6JcVmugFjfdmGxNMCFXpicT VusaXvSlOZXfOIn+cGYsBAD7gosWy07tN0AebQ0cRrqlXuyF3CHkYxffDgx8kxbv BHlwtcoK5wXUy5eQLC2m3lYgo6TH73hYEAzuT2rvPyP+n0/0N1eekYt6rdiNMe0R 12ZizYd4jzBNkFikjYjKHSF4sHU0npElCS8yM1qn6uRKpno4gLfrGm81D8Xj6Jdz 5hFqzYqUwAeuPM3uTn1/BuRnzHIxkqGPuwWqAdovm95O4d1SyKArXzoA6V6qihfb rUB0TKG1+yo/IQvtY/YlSCzoeHX2++KZgt79XVtJlVxZGsJ9+eHnXmoVXIxu60B7 OkZjrKIHPwnyy4Y1hbTxqEHTSnU4XpcWmgIGQvG+NMj2vcJ8luz1sVEqSKIXMRv8 NsdeHiY0z9qHWH5puElf6eLMZMFeOst/ssL0SR/mr4hXRfpQi8LoWWOaQ2YZHrbB EOVRa7hbn7NXdlERX398 =CCuc -----END PGP SIGNATURE----- --sHrvAb52M6C8blB9-- --===============1163283379== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9kcmktZGV2ZWwK --===============1163283379==--