Skip to contentSkip to conversation

drm/dp/mst: dump branch OUI in debugfs

PATCH In review Dave Airlie 2 participants 3 messages Jul 14, 2015 – Jul 15, 2015

Subsystems (2)
lore
Share & tools
lore

Dave Airlie

author maintainer
#0 lore raw

PATCH 1/1 drm/dp/mst: dump branch OUI in debugfs

From: Dave Airlie <[email protected]>

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.

---
 drivers/gpu/drm/drm_dp_mst_topology.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/drm_dp_mst_topology.c +5 -0
index 8a3bfcd..e17a639 100644
@@ -2657,6 +2657,11 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
 			seq_printf(m, "%02x ", buf[i]);
 		seq_printf(m, "\n");
 
+		ret = drm_dp_dpcd_read(mgr->aux, DP_BRANCH_OUI, buf, DP_RECEIVER_CAP_SIZE);
+		seq_printf(m, "branch oui: ");
+		for (i = 0; i < DP_RECEIVER_CAP_SIZE; i++)
+			seq_printf(m, "%02x ", buf[i]);
+		seq_printf(m, "\n");
 		bret = dump_dp_payload_table(mgr, buf);
 		if (bret == true) {
 			seq_printf(m, "payload table: ");
Signature · 6 lines
2.4.3

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 16 lines · Dave Airlie

From: Dave Airlie <[email protected]>

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.

---
 drivers/gpu/drm/drm_dp_mst_topology.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/drm_dp_mst_topology.c +0 -0
index 8a3bfcd..e17a639 100644

drivers/gpu/drm/drm_dp_mst_topology.c void drm_dp_mst_dump_topology(struct seq_file *m, · line 2660

Quoted 4 lines
drivers/gpu/drm/drm_dp_mst_topology.c +1 -0
@@ -2657,6 +2657,11 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
 			seq_printf(m, "%02x ", buf[i]);
 		seq_printf(m, "\n");
 
+		ret = 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)...

drivers/gpu/drm/drm_dp_mst_topology.c void drm_dp_mst_dump_topology(struct seq_file *m, · line 2664

Quoted 4 lines
drivers/gpu/drm/drm_dp_mst_topology.c +4 -0
+		seq_printf(m, "branch oui: ");
+		for (i = 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

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

author maintainer
#2 lore raw
Quoted 31 lines · Thierry Reding
Quoted 16 lines · Dave Airlie

From: Dave Airlie <[email protected]>

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.

---
 drivers/gpu/drm/drm_dp_mst_topology.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/drm_dp_mst_topology.c +0 -0
index 8a3bfcd..e17a639 100644

drivers/gpu/drm/drm_dp_mst_topology.c void drm_dp_mst_dump_topology(struct seq_file *m, · line 2660

Quoted 4 lines
drivers/gpu/drm/drm_dp_mst_topology.c +1 -0
@@ -2657,6 +2657,11 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
                      seq_printf(m, "%02x ", buf[i]);
              seq_printf(m, "\n");
 
+             ret = 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)...

drivers/gpu/drm/drm_dp_mst_topology.c void drm_dp_mst_dump_topology(struct seq_file *m, · line 2664

Quoted 4 lines
drivers/gpu/drm/drm_dp_mst_topology.c +4 -0
+             seq_printf(m, "branch oui: ");
+             for (i = 0; i < DP_RECEIVER_CAP_SIZE; i++)
+                     seq_printf(m, "%02x ", buf[i]);
+             seq_printf(m, "\n");
Quoted 7 lines

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).

Yes I wanted to dump a portion of OUI space for debugging. I don't really care if humans want to parse it, it's debugfs after all.

Dave.
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel