Commit 52a4490e authored by Mika Westerberg's avatar Mika Westerberg

thunderbolt: Reserve released DisplayPort bandwidth for a group for 10 seconds

The USB4 spec says that the Connection Manager should reserve the
bandwidth that is released in the same group for 10 seconds before it
can be shared with other groups. Add support for this. We also delay the
symmetric transition by that same 10 seconds to avoid any unnecessary
transitions (i.e if the released bandwidth is used by another
DisplayPort tunnel in the same group the link can stay asymmetric the
whole time).
Signed-off-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
parent 769da970
......@@ -506,6 +506,10 @@ void tb_domain_remove(struct tb *tb)
mutex_unlock(&tb->lock);
flush_workqueue(tb->wq);
if (tb->cm_ops->deinit)
tb->cm_ops->deinit(tb);
device_unregister(&tb->dev);
}
......
This diff is collapsed.
......@@ -217,6 +217,11 @@ struct tb_switch {
* @tb: Pointer to the domain the group belongs to
* @index: Index of the group (aka Group_ID). Valid values %1-%7
* @ports: DP IN adapters belonging to this group are linked here
* @reserved: Bandwidth released by one tunnel in the group, available
* to others. This is reported as part of estimated_bw for
* the group.
* @release_work: Worker to release the @reserved if it is not used by
* any of the tunnels.
*
* Any tunnel that requires isochronous bandwidth (that's DP for now) is
* attached to a bandwidth group. All tunnels going through the same
......@@ -227,6 +232,8 @@ struct tb_bandwidth_group {
struct tb *tb;
int index;
struct list_head ports;
int reserved;
struct delayed_work release_work;
};
/**
......@@ -452,6 +459,8 @@ struct tb_path {
* ICM to send driver ready message to the firmware.
* @start: Starts the domain
* @stop: Stops the domain
* @deinit: Perform any cleanup after the domain is stopped but before
* it is unregistered. Called without @tb->lock taken. Optional.
* @suspend_noirq: Connection manager specific suspend_noirq
* @resume_noirq: Connection manager specific resume_noirq
* @suspend: Connection manager specific suspend
......@@ -485,6 +494,7 @@ struct tb_cm_ops {
int (*driver_ready)(struct tb *tb);
int (*start)(struct tb *tb, bool reset);
void (*stop)(struct tb *tb);
void (*deinit)(struct tb *tb);
int (*suspend_noirq)(struct tb *tb);
int (*resume_noirq)(struct tb *tb);
int (*suspend)(struct tb *tb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment