thunderbolt: Add bandwidth management for Display Port tunnels

Titan Ridge supports Display Port 1.4 which adds HBR3 (High Bit Rate)
rates that may be up to 8.1 Gb/s over 4 lanes. This translates to
effective data bandwidth of 25.92 Gb/s (as 8/10 encoding is removed by
the DP adapters when going over Thunderbolt fabric). If another high
rate monitor is connected we may need to reduce the bandwidth it
consumes so that it fits into the total 40 Gb/s available on the
Thunderbolt fabric.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
Mika Westerberg
2019-03-26 16:03:48 +03:00
parent 8afe909b78
commit a11b88add4
6 changed files with 381 additions and 4 deletions

View File

@@ -557,3 +557,25 @@ bool tb_path_is_invalid(struct tb_path *path)
}
return false;
}
/**
* tb_path_switch_on_path() - Does the path go through certain switch
* @path: Path to check
* @sw: Switch to check
*
* Goes over all hops on path and checks if @sw is any of them.
* Direction does not matter.
*/
bool tb_path_switch_on_path(const struct tb_path *path,
const struct tb_switch *sw)
{
int i;
for (i = 0; i < path->path_length; i++) {
if (path->hops[i].in_port->sw == sw ||
path->hops[i].out_port->sw == sw)
return true;
}
return false;
}