aboutsummaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/tunnel.h
diff options
context:
space:
mode:
authorMika Westerberg2020-03-28 12:52:31 +0200
committerMika Westerberg2020-06-22 19:58:20 +0300
commit7c0ee8fd3bd7b5be6024f1839e9c26d1c9570e82 (patch)
tree649fa849194ce5517061466e97557796e431b081 /drivers/thunderbolt/tunnel.h
parent9cac51a049dbbca0b078bb9cffa7a8d928cf0f06 (diff)
thunderbolt: Report consumed bandwidth in both directions
Whereas DisplayPort bandwidth is consumed only in one direction (from DP IN adapter to DP OUT adapter), USB3 adds separate bandwidth for both upstream and downstream directions. For this reason extend the tunnel consumed bandwidth routines to support both directions and implement this for DP. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tunnel.h')
-rw-r--r--drivers/thunderbolt/tunnel.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/thunderbolt/tunnel.h b/drivers/thunderbolt/tunnel.h
index 3f5ba93225e7..cc952b2be792 100644
--- a/drivers/thunderbolt/tunnel.h
+++ b/drivers/thunderbolt/tunnel.h
@@ -42,7 +42,8 @@ struct tb_tunnel {
size_t npaths;
int (*init)(struct tb_tunnel *tunnel);
int (*activate)(struct tb_tunnel *tunnel, bool activate);
- int (*consumed_bandwidth)(struct tb_tunnel *tunnel);
+ int (*consumed_bandwidth)(struct tb_tunnel *tunnel, int *consumed_up,
+ int *consumed_down);
struct list_head list;
enum tb_tunnel_type type;
unsigned int max_bw;
@@ -69,7 +70,8 @@ void tb_tunnel_deactivate(struct tb_tunnel *tunnel);
bool tb_tunnel_is_invalid(struct tb_tunnel *tunnel);
bool tb_tunnel_switch_on_path(const struct tb_tunnel *tunnel,
const struct tb_switch *sw);
-int tb_tunnel_consumed_bandwidth(struct tb_tunnel *tunnel);
+int tb_tunnel_consumed_bandwidth(struct tb_tunnel *tunnel, int *consumed_up,
+ int *consumed_down);
static inline bool tb_tunnel_is_pci(const struct tb_tunnel *tunnel)
{