From: Imre Deak Date: Mon, 5 Mar 2007 12:17:47 +0000 (+0200) Subject: FB: sync with N800 tree (fix RFBI frequency lookup in tearing sync setup) X-Git-Tag: v2.6.21-omap1~83^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d65337d614ae2be44542287eddb8c7991908e805;p=linux-2.6-omap-h63xx.git FB: sync with N800 tree (fix RFBI frequency lookup in tearing sync setup) Different DPLL multiplier / divider pairs can result in frequencies that are not exact matches of the values given by TI. When looking up the table of known L4 / DSS1 values allow for a small difference. Signed-off-by: Imre Deak --- diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c index 917f6161366..05164ca9957 100644 --- a/drivers/video/omap/rfbi.c +++ b/drivers/video/omap/rfbi.c @@ -213,8 +213,11 @@ static unsigned long rfbi_get_max_tx_rate(void) dss1_rate = clk_get_rate(rfbi.dss1_fck) / 1000000; for (i = 0; i < ARRAY_SIZE(ftab); i++) { - if (ftab[i].l4_clk == l4_rate && - ftab[i].dss1_clk == dss1_rate) { + /* Use a window instead of an exact match, to account + * for different DPLL multiplier / divider pairs. + */ + if (abs(ftab[i].l4_clk - l4_rate) < 3 && + abs(ftab[i].dss1_clk - dss1_rate) < 3) { min_l4_ticks = ftab[i].min_l4_ticks; break; }