Lines Matching refs:m_rt
34 void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt, in sdw_compute_slave_ports() argument
42 struct sdw_bus_params *b_params = &m_rt->bus->params; in sdw_compute_slave_ports()
46 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_compute_slave_ports()
47 rate = m_rt->stream->params.rate; in sdw_compute_slave_ports()
48 bps = m_rt->stream->params.bps; in sdw_compute_slave_ports()
49 sample_int = (m_rt->bus->params.curr_dr_freq / rate); in sdw_compute_slave_ports()
75 if (m_rt->direction == SDW_DATA_DIR_TX && in sdw_compute_slave_ports()
76 m_rt->ch_count == slave_total_ch) { in sdw_compute_slave_ports()
89 static void sdw_compute_dp0_slave_ports(struct sdw_master_runtime *m_rt) in sdw_compute_dp0_slave_ports() argument
91 struct sdw_bus *bus = m_rt->bus; in sdw_compute_dp0_slave_ports()
95 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_compute_dp0_slave_ports()
107 static void sdw_compute_dp0_master_ports(struct sdw_master_runtime *m_rt) in sdw_compute_dp0_master_ports() argument
110 struct sdw_bus *bus = m_rt->bus; in sdw_compute_dp0_master_ports()
112 list_for_each_entry(p_rt, &m_rt->port_list, port_node) { in sdw_compute_dp0_master_ports()
124 struct sdw_master_runtime *m_rt; in sdw_compute_dp0_port_params() local
126 list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) { in sdw_compute_dp0_port_params()
128 if (m_rt->stream->type != SDW_STREAM_BPT) in sdw_compute_dp0_port_params()
130 sdw_compute_dp0_master_ports(m_rt); in sdw_compute_dp0_port_params()
131 sdw_compute_dp0_slave_ports(m_rt); in sdw_compute_dp0_port_params()
135 static void sdw_compute_master_ports(struct sdw_master_runtime *m_rt, in sdw_compute_master_ports() argument
141 struct sdw_bus *bus = m_rt->bus; in sdw_compute_master_ports()
146 rate = m_rt->stream->params.rate; in sdw_compute_master_ports()
147 bps = m_rt->stream->params.bps; in sdw_compute_master_ports()
148 ch = m_rt->ch_count; in sdw_compute_master_ports()
158 list_for_each_entry(p_rt, &m_rt->port_list, port_node) { in sdw_compute_master_ports()
173 if (!(p_rt == list_first_entry(&m_rt->port_list, in sdw_compute_master_ports()
188 sdw_compute_slave_ports(m_rt, &t_data); in sdw_compute_master_ports()
194 struct sdw_master_runtime *m_rt; in _sdw_compute_port_params() local
209 list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) { in _sdw_compute_port_params()
214 if (m_rt->stream->state > SDW_STREAM_DISABLED || in _sdw_compute_port_params()
215 m_rt->stream->state < SDW_STREAM_CONFIGURED) in _sdw_compute_port_params()
217 sdw_compute_master_ports(m_rt, ¶ms[i], &port_bo, hstop); in _sdw_compute_port_params()
230 struct sdw_master_runtime *m_rt; in sdw_compute_group_params() local
243 list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) { in sdw_compute_group_params()
244 if (m_rt->stream == stream) { in sdw_compute_group_params()
253 if (m_rt->stream->state != SDW_STREAM_ENABLED && in sdw_compute_group_params()
254 m_rt->stream->state != SDW_STREAM_PREPARED && in sdw_compute_group_params()
255 m_rt->stream->state != SDW_STREAM_DISABLED) in sdw_compute_group_params()
258 list_for_each_entry(p_rt, &m_rt->port_list, port_node) { in sdw_compute_group_params()
259 rate = m_rt->stream->params.rate; in sdw_compute_group_params()
260 bps = m_rt->stream->params.bps; in sdw_compute_group_params()
341 struct sdw_master_runtime *m_rt; in sdw_get_group_count() local
359 list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) { in sdw_get_group_count()
360 if (m_rt->stream->state == SDW_STREAM_DEPREPARED) in sdw_get_group_count()
363 rate = m_rt->stream->params.rate; in sdw_get_group_count()
364 if (m_rt == list_first_entry(&bus->m_rt_list, in sdw_get_group_count()
373 list_for_each_entry(p_rt, &m_rt->port_list, port_node) { in sdw_get_group_count()
453 struct sdw_master_runtime *m_rt; in is_clock_scaling_supported() local
456 list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) in is_clock_scaling_supported()
457 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) in is_clock_scaling_supported()
471 static bool is_lane_connected_to_all_peripherals(struct sdw_master_runtime *m_rt, unsigned int lane) in is_lane_connected_to_all_peripherals() argument
477 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in is_lane_connected_to_all_peripherals()
495 static int get_manager_lane(struct sdw_bus *bus, struct sdw_master_runtime *m_rt, in get_manager_lane() argument
509 list_for_each_entry(m_p_rt, &m_rt->port_list, port_node) { in get_manager_lane()
510 required_bandwidth += m_rt->stream->params.rate * in get_manager_lane()
512 m_rt->stream->params.bps; in get_manager_lane()
517 if (!is_lane_connected_to_all_peripherals(m_rt, in get_manager_lane()
551 struct sdw_master_runtime *m_rt; in sdw_compute_bus_params() local
587 list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) { in sdw_compute_bus_params()
593 s_rt = list_first_entry(&m_rt->slave_rt_list, in sdw_compute_bus_params()
599 m_lane = get_manager_lane(bus, m_rt, s_rt, curr_dr_freq); in sdw_compute_bus_params()
620 list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { in sdw_compute_bus_params()
638 list_for_each_entry(m_p_rt, &m_rt->port_list, port_node) { in sdw_compute_bus_params()