In case of null error, round rate is equal to target rate, so it is
useless to continue to search the DPLL setup parameters to get the
desidered pixel clock rate.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
err = panel->pxl_clk;
err_r = err;
- for (d = 2; d < 255; d++) {
+ for (d = 2; err_r && d < 255; d++) {
for (m = 2; m < 2047; m++) {
if ((V_OSCK * m) < (panel->pxl_clk * d))
continue;
dpll_disp.m = m;
dpll_disp.n = n;
best_d = d;
+ if (err_r == 0)
+ break;
}
}
}