]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
thunderbolt: Increase DPRX capabilities read timeout
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 28 Aug 2024 12:07:54 +0000 (15:07 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Fri, 3 Jan 2025 09:50:08 +0000 (11:50 +0200)
Some graphics drivers such as i915 support runtime power management and
if there is nothing connected at the moment they will runtime suspend to
save power. At least i915 is polling for new connections every 10
seconds if the hardware does support sending PME. To allow i915 and
other graphics from detect the just established DisplayPort tunnel allow
the DPRX capabilities read to take up to 12 seconds.

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

index 41cf6378ad2516ca4eaffcf28681db35611032d5..f9e75c221fef289fc26c885b97b0f1e2db7f2d63 100644 (file)
@@ -1186,9 +1186,12 @@ static int tb_dp_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up,
                 * return that bandwidth (it may be smaller than the
                 * 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.
+                * established. Since at least i915 can runtime suspend
+                * if there is nothing connected, and that it polls any
+                * new connections every 10 seconds, we use 12 seconds
+                * here.
                 */
-               ret = tb_dp_wait_dprx(tunnel, 5100);
+               ret = tb_dp_wait_dprx(tunnel, 12000);
                if (ret)
                        return ret;
                ret = tb_dp_read_cap(tunnel, DP_COMMON_CAP, &rate, &lanes);