* [PATCH] OMAPDSS: HDMI: Add M2 divider while calculating pll
@ 2012-02-08 13:13 mythripk
2012-02-09 7:46 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: mythripk @ 2012-02-08 13:13 UTC (permalink / raw)
To: linux-omap; +Cc: tomi.valkeinen, Mythri P K
From: Mythri P K <mythripk@ti.com>
While calculating regm and regmf value add M2 divider in the equation.
Signed-off-by: Mythri P K <mythripk@ti.com>
---
drivers/video/omap2/dss/hdmi.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 92a6679..9185630 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -256,24 +256,24 @@ static void hdmi_compute_pll(struct omap_dss_device *dssdev, int phy,
refclk = clkin / pi->regn;
- /*
- * multiplier is pixel_clk/ref_clk
- * Multiplying by 100 to avoid fractional part removal
- */
- pi->regm = (phy * 100 / (refclk)) / 100;
-
if (dssdev->clocks.hdmi.regm2 == 0)
pi->regm2 = HDMI_DEFAULT_REGM2;
else
pi->regm2 = dssdev->clocks.hdmi.regm2;
/*
+ * multiplier is pixel_clk/ref_clk
+ * Multiplying by 100 to avoid fractional part removal
+ */
+ pi->regm = (phy * 100 * pi->regm2 / (refclk)) / 100;
+
+ /*
* fractional multiplier is remainder of the difference between
* multiplier and actual phy(required pixel clock thus should be
* multiplied by 2^18(262144) divided by the reference clock
*/
- mf = (phy - pi->regm * refclk) * 262144;
- pi->regmf = mf / (refclk);
+ mf = (phy - pi->regm / pi->regm2 * refclk) * 262144;
+ pi->regmf = pi->regm2 * mf / refclk;
/*
* Dcofreq should be set to 1 if required pixel clock
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] OMAPDSS: HDMI: Add M2 divider while calculating pll
2012-02-08 13:13 [PATCH] OMAPDSS: HDMI: Add M2 divider while calculating pll mythripk
@ 2012-02-09 7:46 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2012-02-09 7:46 UTC (permalink / raw)
To: mythripk; +Cc: linux-omap
[-- Attachment #1: Type: text/plain, Size: 400 bytes --]
Hi,
On Wed, 2012-02-08 at 18:43 +0530, mythripk@ti.com wrote:
> From: Mythri P K <mythripk@ti.com>
>
> While calculating regm and regmf value add M2 divider in the equation.
>
> Signed-off-by: Mythri P K <mythripk@ti.com>
Please spend a bit more time on commit descriptions. What's M2? Why
wasn't it used before? What does this change affect? Is it a fix or a
new feature?
Tomi
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-09 7:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-08 13:13 [PATCH] OMAPDSS: HDMI: Add M2 divider while calculating pll mythripk
2012-02-09 7:46 ` Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox