Skip to content

Commit 4a7927d

Browse files
bardliaovinodkoul
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 <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent cf44ae3 commit 4a7927d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/soundwire/generic_bandwidth_allocation.c

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

376-
if (curr_dr_freq <= bus->params.bandwidth)
376+
if (curr_dr_freq * (mstr_prop->default_col - 1) <
377+
bus->params.bandwidth * mstr_prop->default_col)
377378
continue;
378379

379380
break;

0 commit comments

Comments
 (0)