linux_dsm_epyc7002/drivers/video/omap2
Tomi Valkeinen 648a55e125 OMAPDSS: fix dss_fck clock rate rounding
DSS func clock is calculated with prate / div * m. However, the current
omapdss code calculates it with prate * m / div, which yields a slightly
different result when there's a remainder. For example, 432000000 / 14 *
2 = 61714284, but 432000000 * 2 / 14 = 61714285.

In addition to that, the clock framework wants the clock rate given with
clk_set_rate to be higher than the actual (truncated) end result. So, if
prate is 432000000, and div is 14, the real result is 30857142.8571...
We need to call clk_set_rate with 30857143, which gives us a clock of
30857142. That's why we need to use DIV_ROUND_UP() when calling
clk_set_rate.

This patch fixes the clock calculation.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2013-04-11 13:07:54 +03:00
..
displays OMAPDSS: DSI: use new clock calculation code 2013-04-03 15:19:18 +03:00
dss OMAPDSS: fix dss_fck clock rate rounding 2013-04-11 13:07:54 +03:00
omapfb OMAPDSS: add output->dispc_channel 2013-04-03 15:19:01 +03:00
Kconfig ARM: OMAP: Fix drivers to depend on omap for internal devices 2012-12-16 15:23:37 -08:00
Makefile OMAP: remove vram allocator 2012-11-13 09:52:41 +02:00
vrfb.c video: Convert to devm_ioremap_resource() 2013-01-22 11:41:58 -08:00