diff options
author | Ivan Raul Guadarrama <iguadarrama@nvidia.com> | 2014-11-25 13:44:34 +0200 |
---|---|---|
committer | Matthew Pedro <mapedro@nvidia.com> | 2015-03-18 08:56:41 -0700 |
commit | 3aa9d89c562dc8d56db85b656fd626b3bc082f0d (patch) | |
tree | 39793664e9512cd3a0476ad4533bbaef5c9fc462 /drivers/video | |
parent | 3e868550a1cdcd88b95704148aa679ebe6864e3f (diff) |
video: tegra: hdmi: fix parent clock search
Fix the parent clock search for the display
controller. It addresses the corner case when
the divider difference is just smaller than the
chosen precision and wrongly assumed zero.
An explicit ceiling function is applied for
corretness.
Bug 1580265
Bug 1552739
Change-Id: I47312116c19813260941abcae42e4067a57f3d2c
Signed-off-by: Ivan Raul Guadarrama <iguadarrama@nvidia.com>
Reviewed-on: http://git-master/r/714972
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pankaj Dabade <pdabade@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/dc/hdmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c index 79eb956f692d..cdacfd366471 100644 --- a/drivers/video/tegra/dc/hdmi.c +++ b/drivers/video/tegra/dc/hdmi.c @@ -2187,7 +2187,7 @@ static unsigned long tegra12x_hdmi_determine_parent( for (n = 4; (ref / 2 * n) <= pmax; n++) { if ((ref / 2 * n) < pmin) /* too low */ continue; - m = (ref / 2 * n) / (pclk / 1000); + m = DIV_ROUND_UP((ref / 2 * n), (pclk / 1000)); if (m <= 1700) /* for 2 <= m */ continue; f = m % 1000; /* fractional parts */ |