Skip to content

Commit f1ce288

Browse files
bardliaoranj063
authored andcommitted
soundwire: generic_bandwidth_allocation: check required freq accurately
Currently, we check curr_dr_freq roughly by "if (curr_dr_freq <= bus->params.bandwidth)" in sdw_compute_bus_params() and check it accurately in sdw_select_row_col(). It works if we only support one freq. But, we need to check it accurately in sdw_select_row_col() to give it a chance to use a higher freq or use multi-lane. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent d7e5b97 commit f1ce288

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/soundwire/generic_bandwidth_allocation.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,8 @@ static int sdw_compute_bus_params(struct sdw_bus *bus)
375375
(bus->params.max_dr_freq >> clk_buf[i]) :
376376
clk_buf[i] * SDW_DOUBLE_RATE_FACTOR;
377377

378-
if (curr_dr_freq <= bus->params.bandwidth)
378+
if (curr_dr_freq * (mstr_prop->default_col - 1) <
379+
bus->params.bandwidth * mstr_prop->default_col)
379380
continue;
380381

381382
break;

0 commit comments

Comments
 (0)