public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] thunderbolt: Re-add DP resources on resume
@ 2025-09-17  8:24 Jiayi Li
  2025-09-17  8:36 ` Mika Westerberg
  2025-09-17 10:12 ` 李佳怡
  0 siblings, 2 replies; 11+ messages in thread
From: Jiayi Li @ 2025-09-17  8:24 UTC (permalink / raw)
  To: westeri
  Cc: andreas.noever, michael.jamet, YehezkelShB, linux-usb,
	linux-kernel, jiayi_dec, Jiayi Li

During suspend, DP resources are released through tb_disconnect_and_release_dp()
but were not being re-added during resume, preventing DP tunnels from being
re-established.

This caused DP displays connected via Thunderbolt docks (such as Targus docks)
to not display after S3 resume. The issue was visible in logs:

[246.397437] tb_cfg_ack_plug:819: thunderbolt 0000:2c:00.0: acking hot plug event on 3:10
[246.398282] tb_dp_resource_available:2019: thunderbolt 0000:2c:00.0: 3:10: DP OUT resource available
[246.398291] tb_tunnel_dp:1875: thunderbolt 0000:2c:00.0: looking for DP IN <-> DP OUT pairs:
[246.398294] tb_tunnel_dp:1899: thunderbolt 0000:2c:00.0: no suitable DP IN adapter available, not tunneling

Add call to tb_add_dp_resources() in tb_resume_noirq() to ensure DP resources
are properly re-added during resume, allowing DP tunnels to be re-established.

Signed-off-by: Jiayi Li <lijiayi@kylinos.cn>
---
 drivers/thunderbolt/tb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index c14ab1fbeeaf..cb652df3fc9f 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -3119,6 +3119,7 @@ static int tb_resume_noirq(struct tb *tb)
 		tb_switch_reset(tb->root_switch);
 
 	tb_switch_resume(tb->root_switch, false);
+	tb_add_dp_resources(tb->root_switch);
 	tb_free_invalid_tunnels(tb);
 	tb_free_unplugged_children(tb->root_switch);
 	tb_restore_children(tb->root_switch);
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-09-19  8:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17  8:24 [PATCH RFC] thunderbolt: Re-add DP resources on resume Jiayi Li
2025-09-17  8:36 ` Mika Westerberg
2025-09-17 10:12 ` 李佳怡
2025-09-17 12:50   ` Mika Westerberg
2025-09-18  8:34     ` 李佳怡
2025-09-18 16:20       ` Mika Westerberg
2025-09-18 16:43         ` Mika Westerberg
2025-09-19  7:24           ` 李佳怡
2025-09-19  7:30             ` Mika Westerberg
2025-09-19  8:00               ` 李佳怡
2025-09-19  8:41                 ` Mika Westerberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox