* [PATCH] drm/dp/mst: dump branch OUI in debugfs
@ 2015-07-14 1:34 Dave Airlie
2015-07-14 8:28 ` Thierry Reding
0 siblings, 1 reply; 3+ messages in thread
From: Dave Airlie @ 2015-07-14 1:34 UTC (permalink / raw)
To: dri-devel
From: Dave Airlie <airlied@redhat.com>
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.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/drm_dp_mst_topology.c | 5 +++++
1 file changed, 5 insertions(+)
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");
+ 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: ");
--
2.4.3
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/dp/mst: dump branch OUI in debugfs
2015-07-14 1:34 [PATCH] drm/dp/mst: dump branch OUI in debugfs Dave Airlie
@ 2015-07-14 8:28 ` Thierry Reding
2015-07-15 0:09 ` Dave Airlie
0 siblings, 1 reply; 3+ messages in thread
From: Thierry Reding @ 2015-07-14 8:28 UTC (permalink / raw)
To: Dave Airlie; +Cc: dri-devel
[-- Attachment #1.1: Type: text/plain, Size: 1620 bytes --]
On Tue, Jul 14, 2015 at 11:34:39AM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> 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.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
> drivers/gpu/drm/drm_dp_mst_topology.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> 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");
>
> + 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)...
> + 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
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/dp/mst: dump branch OUI in debugfs
2015-07-14 8:28 ` Thierry Reding
@ 2015-07-15 0:09 ` Dave Airlie
0 siblings, 0 replies; 3+ messages in thread
From: Dave Airlie @ 2015-07-15 0:09 UTC (permalink / raw)
To: Thierry Reding; +Cc: dri-devel
On 14 July 2015 at 18:28, Thierry Reding <thierry.reding@gmail.com> wrote:
> On Tue, Jul 14, 2015 at 11:34:39AM +1000, Dave Airlie wrote:
>> From: Dave Airlie <airlied@redhat.com>
>>
>> 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.
>>
>> Signed-off-by: Dave Airlie <airlied@redhat.com>
>> ---
>> drivers/gpu/drm/drm_dp_mst_topology.c | 5 +++++
>> 1 file changed, 5 insertions(+)
>>
>> 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");
>>
>> + 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)...
>
>> + 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).
>
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
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-15 0:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14 1:34 [PATCH] drm/dp/mst: dump branch OUI in debugfs Dave Airlie
2015-07-14 8:28 ` Thierry Reding
2015-07-15 0:09 ` Dave Airlie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.