From: Imre Deak <imre.deak@solidboot.com>
To: Linux OMAP ML <linux-omap-open-source@linux.omap.com>
Subject: [PATCH 4/4] FB: sync with N800 tree (fix RFBI frequency lookup in tearing sync setup)
Date: Mon, 5 Mar 2007 14:17:47 +0200 [thread overview]
Message-ID: <20070305121745.GD4435@bitbox.mine.nu> (raw)
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 <imre.deak@solidboot.com>
---
drivers/video/omap/rfbi.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/video/omap/rfbi.c b/drivers/video/omap/rfbi.c
index 917f616..05164ca 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;
}
--
1.4.4.3.GIT
reply other threads:[~2007-03-05 12:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070305121745.GD4435@bitbox.mine.nu \
--to=imre.deak@solidboot.com \
--cc=linux-omap-open-source@linux.omap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox