thunderbolt: Add USB3 bandwidth management
authorMika Westerberg <mika.westerberg@linux.intel.com>
Tue, 24 Mar 2020 12:44:13 +0000 (14:44 +0200)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 22 Jun 2020 16:58:20 +0000 (19:58 +0300)
commit0bd680cd900cf0ec85c275731262aaa2ead369b7
tree12786e6491803d1e053afaeed593bcfd930d33c2
parent5b7b8c0af15a376175302fc91c2af06f356821b0
thunderbolt: Add USB3 bandwidth management

USB3 supports both isochronous and non-isochronous traffic. The former
requires guaranteed bandwidth and can take up to 90% of the total
bandwidth. With USB4 USB3 is tunneled over USB4 fabric which means that
we need to make sure there is enough bandwidth allocated for the USB3
tunnels in addition to DisplayPort tunnels.

Whereas DisplayPort bandwidth management is static and done before the
DP tunnel is established, the USB3 bandwidth management is dynamic and
allows increasing and decreasing the allocated bandwidth according to
what is currently consumed. This is done through host router USB3
downstream adapter registers.

This adds USB3 bandwidth management to the software connection manager
so that we always try to allocate maximum bandwidth for DP tunnels and
what is left is allocated for USB3.

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