thunderbolt: Two fixes for reported display issues
Subsystems (2)
cover thunderbolt: Two fixes for reported display issues
Hi all,
This series includes two fixes for the display related issues reported by Koba Ko.
Mika Westerberg (2):
thunderbolt: Increase DisplayPort Connection Manager handshake timeout
thunderbolt: Do not touch CL state configuration during discovery
drivers/thunderbolt/tb.c | 17 ++++++++++++----- drivers/thunderbolt/tunnel.c | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-)
Signature · 1 line
2.39.2
PATCH 1/2 thunderbolt: Increase DisplayPort Connection Manager handshake timeout
It turns out that when plugging in VGA cable through USB-C to VGA/DVI dongle the Connection Manager handshake can take longer time, at least on Intel Titan Ridge based docks such as Dell WD91TB. This leads to following error in the dmesg:
thunderbolt 0000:00:0d.3: 3:10: DP tunnel activation failed, aborting
and the display stays blank (because we failed to establish the tunnel). For this reason increase the timeout to 3s.
--- drivers/thunderbolt/tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thunderbolt/tunnel.c +1 -1
@@ -531,7 +531,7 @@ static int tb_dp_xchg_caps(struct tb_tunnel *tunnel)* Perform connection manager handshake between IN and OUT ports * before capabilities exchange can take place. */ - ret =tb_dp_cm_handshake (in, out,1500 ); + ret =tb_dp_cm_handshake (in, out,3000 );if (ret)return ret;
Signature · 1 line
2.39.2
PATCH 2/2 thunderbolt: Do not touch CL state configuration during discovery
In reply to Mika WesterbergIf the boot firmware has already established tunnels, especially ones that have special requirements from the link such as DisplayPort, we should not blindly enable CL states (nor change the TMU configuration). Otherwise the existing tunnels may not work as expected.
For this reason, skip the CL state enabling when we go over the existing topology. This will als keep the TMU settings untouched because we do not change the TMU configururation when CL states are not enabled.
--- drivers/thunderbolt/tb.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)
drivers/thunderbolt/tb.c +12 -5
@@ -737,6 +737,7 @@ static void tb_scan_port(struct tb_port *port) {struct tb_cm *tcm =tb_priv (port->sw->tb);struct tb_port *upstream_port; +bool discovery = false;struct tb_switch *sw;int ret;
@@ -804,8 +805,10 @@ static void tb_scan_port(struct tb_port *port)* tunnels and know which switches were authorized already by * the boot firmware. */ -if (!tcm->hotplug_active) +if (!tcm->hotplug_active) {dev_set_uevent_suppress (&sw->dev, true); + discovery = true; + }/* * At the moment Thunderbolt 2 and beyond (devices with LC) we
@@ -835,10 +838,14 @@ static void tb_scan_port(struct tb_port *port)* CL0s and CL1 are enabled and supported together. * Silently ignore CLx enabling in case CLx is not supported. */ - ret =tb_switch_enable_clx (sw,TB_CL1 ); -if (ret && ret != -EOPNOTSUPP ) -tb_sw_warn (sw,"failed to enable %s on upstream port\n" , -tb_switch_clx_name (TB_CL1 )); +if (discovery) { +tb_sw_dbg (sw,"discovery, not touching CL states\n" ); + }else { + ret =tb_switch_enable_clx (sw,TB_CL1 ); +if (ret && ret != -EOPNOTSUPP ) +tb_sw_warn (sw,"failed to enable %s on upstream port\n" , +tb_switch_clx_name (TB_CL1 )); + }if (tb_switch_is_clx_enabled (sw,TB_CL1 ))/*
Signature · 1 line
2.39.2
Re: [PATCH 2/2] thunderbolt: Do not touch CL state configuration during discovery
Quoted 8 lines · Mika Westerberg
If the boot firmware has already established tunnels, especially ones that have special requirements from the link such as DisplayPort, we should not blindly enable CL states (nor change the TMU configuration). Otherwise the existing tunnels may not work as expected.
For this reason, skip the CL state enabling when we go over the existing topology. This will als keep the TMU settings untouched because we do
^ also
Quoted 1 line
not change the TMU configururation when CL states are not enabled.
^ configuration
For the both patches in the series:
Re: [PATCH 2/2] thunderbolt: Do not touch CL state configuration during discovery
Quoted 10 lines · Yehezkel Bernat
Quoted 8 lines · Mika Westerberg
If the boot firmware has already established tunnels, especially ones that have special requirements from the link such as DisplayPort, we should not blindly enable CL states (nor change the TMU configuration). Otherwise the existing tunnels may not work as expected.
For this reason, skip the CL state enabling when we go over the existing topology. This will als keep the TMU settings untouched because we do
Quoted 8 lines
^ also
Quoted 1 line
not change the TMU configururation when CL states are not enabled.
^ configuration
For the both patches in the series:
Acked-by Yehezkel Bernat <[email protected]>
Thanks! Fixed the typos and applied both to thunderbolt.git/fixes.