thunderbolt: Include the additional DP IN double word in debugfs dump
authorMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 29 Apr 2022 14:14:57 +0000 (17:14 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 17 Jan 2023 09:37:11 +0000 (11:37 +0200)
When DisplayPort bandwidth allocation mode is supported by the DP IN
adapter it has an extra double word in the adapter config space. Include
this in the debugfs register dump.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/thunderbolt/debugfs.c

index 834bcad42e9fe8cfa5a1e065bed7b512f817bb0d..4339e706cc3a12ad455b01ab4a0e99898c06c9aa 100644 (file)
@@ -1159,7 +1159,10 @@ static void port_cap_show(struct tb_port *port, struct seq_file *s,
                if (tb_port_is_pcie_down(port) || tb_port_is_pcie_up(port)) {
                        length = PORT_CAP_PCIE_LEN;
                } else if (tb_port_is_dpin(port) || tb_port_is_dpout(port)) {
-                       length = PORT_CAP_DP_LEN;
+                       if (usb4_dp_port_bw_mode_supported(port))
+                               length = PORT_CAP_DP_LEN + 1;
+                       else
+                               length = PORT_CAP_DP_LEN;
                } else if (tb_port_is_usb3_down(port) ||
                           tb_port_is_usb3_up(port)) {
                        length = PORT_CAP_USB3_LEN;