Lines Matching refs:max_bw
468 static int tb_dp_reduce_bandwidth(int max_bw, u32 in_rate, u32 in_lanes, in tb_dp_reduce_bandwidth() argument
501 if (tb_dp_bandwidth(dp_bw[i][0], dp_bw[i][1]) <= max_bw) { in tb_dp_reduce_bandwidth()
516 int ret, max_bw; in tb_dp_xchg_caps() local
566 max_bw = tunnel->max_down; in tb_dp_xchg_caps()
568 max_bw = tunnel->max_up; in tb_dp_xchg_caps()
570 if (max_bw && bw > max_bw) { in tb_dp_xchg_caps()
573 ret = tb_dp_reduce_bandwidth(max_bw, in_rate, in_lanes, in tb_dp_xchg_caps()
772 static int tb_dp_nrd_bandwidth(struct tb_tunnel *tunnel, int *max_bw) in tb_dp_nrd_bandwidth() argument
783 if (max_bw) { in tb_dp_nrd_bandwidth()
787 *max_bw = roundup(nrd_bw, ret); in tb_dp_nrd_bandwidth()
798 int ret, allocated_bw, max_bw; in tb_dp_bw_mode_consumed_bandwidth() local
812 ret = tb_dp_nrd_bandwidth(tunnel, &max_bw); in tb_dp_bw_mode_consumed_bandwidth()
815 if (allocated_bw == max_bw) in tb_dp_bw_mode_consumed_bandwidth()
843 int ret, allocated_bw, max_bw; in tb_dp_allocated_bandwidth() local
850 ret = tb_dp_nrd_bandwidth(tunnel, &max_bw); in tb_dp_allocated_bandwidth()
853 if (allocated_bw == max_bw) in tb_dp_allocated_bandwidth()
875 int max_bw, ret, tmp; in tb_dp_alloc_bandwidth() local
880 ret = tb_dp_nrd_bandwidth(tunnel, &max_bw); in tb_dp_alloc_bandwidth()
885 tmp = min(*alloc_down, max_bw); in tb_dp_alloc_bandwidth()
892 tmp = min(*alloc_up, max_bw); in tb_dp_alloc_bandwidth()