diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2023-12-11 14:45:37 +0300 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2024-02-16 13:29:22 +0300 |
commit | d44b9827e7f460c7555800065de81b75f4967145 (patch) | |
tree | c9677fe5ed94ee78f2c5f525008d182c3b84a81e /drivers/thunderbolt/tb.c | |
parent | 7b5e0bfc03cb904638200444264cfb20f7f6bea7 (diff) | |
download | linux-d44b9827e7f460c7555800065de81b75f4967145.tar.xz |
thunderbolt: Re-calculate estimated bandwidth when allocation mode is enabled
When we program the initial bandwidth estimation the DPTX (graphics
driver) has not yet read the capabilities of the monitor so the values
used are the highest possible of the involved DisplayPort IN and OUT
adapters, not the actual monitor capabilities. To allow the graphics
more accurate bandwidth estimation re-calculate it once we receive the
bandwidth allocation mode enabled notification.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/tb.c')
-rw-r--r-- | drivers/thunderbolt/tb.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c index 64dd22e1f5b2..5b0434c140f9 100644 --- a/drivers/thunderbolt/tb.c +++ b/drivers/thunderbolt/tb.c @@ -2413,10 +2413,19 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work) ret = usb4_dp_port_requested_bandwidth(in); if (ret < 0) { - if (ret == -ENODATA) - tb_port_dbg(in, "no bandwidth request active\n"); - else + if (ret == -ENODATA) { + /* + * There is no request active so this means the + * BW allocation mode was enabled from graphics + * side. At this point we know that the graphics + * driver has read the DRPX capabilities so we + * can offer an better bandwidth estimatation. + */ + tb_port_dbg(in, "DPTX enabled bandwidth allocation mode, updating estimated bandwidth\n"); + tb_recalc_estimated_bandwidth(tb); + } else { tb_port_warn(in, "failed to read requested bandwidth\n"); + } goto put_sw; } requested_bw = ret; |