Patch "thunderbolt: Calculate DisplayPort tunnel bandwidth after DPRX capabilities read" has been added to the 6.8-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    thunderbolt: Calculate DisplayPort tunnel bandwidth after DPRX capabilities read

to the 6.8-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     thunderbolt-calculate-displayport-tunnel-bandwidth-a.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2c1fb148d887501f7ed62c55c164d571a44a33c6
Author: Gil Fine <gil.fine@xxxxxxxxxxxxxxx>
Date:   Tue Jan 23 15:56:42 2024 +0200

    thunderbolt: Calculate DisplayPort tunnel bandwidth after DPRX capabilities read
    
    [ Upstream commit ccd845021147dc8257a05ed8f5a7f9c61a9101e3 ]
    
    According to USB4 Connection Manager guide, after DisplayPort tunnel was
    setup, the DPRX capabilities read is performed by the DPTX. According to
    VESA spec, this shall be completed within 5 seconds after the DisplayPort
    tunnel was setup. Hence, if the bit: DPRX Capabilities Read Done, was
    not set to '1' by this time, we timeout and fail calculating DisplayPort
    tunnel consumed bandwidth.
    
    Signed-off-by: Gil Fine <gil.fine@xxxxxxxxxxxxxxx>
    Signed-off-by: Mika Westerberg <mika.westerberg@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/thunderbolt/tunnel.c b/drivers/thunderbolt/tunnel.c
index 6fffb2c82d3d1..4f09216b70f90 100644
--- a/drivers/thunderbolt/tunnel.c
+++ b/drivers/thunderbolt/tunnel.c
@@ -1196,17 +1196,13 @@ static int tb_dp_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up,
 		/*
 		 * Then see if the DPRX negotiation is ready and if yes
 		 * return that bandwidth (it may be smaller than the
-		 * reduced one). Otherwise return the remote (possibly
-		 * reduced) caps.
+		 * reduced one). According to VESA spec, the DPRX
+		 * negotiation shall compete in 5 seconds after tunnel
+		 * established. We give it 100ms extra just in case.
 		 */
-		ret = tb_dp_wait_dprx(tunnel, 150);
-		if (ret) {
-			if (ret == -ETIMEDOUT)
-				ret = tb_dp_read_cap(tunnel, DP_REMOTE_CAP,
-						     &rate, &lanes);
-			if (ret)
-				return ret;
-		}
+		ret = tb_dp_wait_dprx(tunnel, 5100);
+		if (ret)
+			return ret;
 		ret = tb_dp_read_cap(tunnel, DP_COMMON_CAP, &rate, &lanes);
 		if (ret)
 			return ret;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux