Files
linux/drivers/gpu/drm
Douglas Anderson 1d133532ee drm/rockchip: Properly adjust to a true clock in adjusted_mode
[ Upstream commit 99b9683f21 ]

When fixing up the clock in vop_crtc_mode_fixup() we're not doing it
quite correctly.  Specifically if we've got the true clock 266666667 Hz,
we'll perform this calculation:
   266666667 / 1000 => 266666

Later when we try to set the clock we'll do clk_set_rate(266666 *
1000).  The common clock framework won't actually pick the proper clock
in this case since it always wants clocks <= the specified one.

Let's solve this by using DIV_ROUND_UP.

Fixes: b59b8de314 ("drm/rockchip: return a true clock rate to adjusted_mode")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Yakir Yang <ykk@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20190614224730.98622-1-dianders@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-08-04 09:33:38 +02:00
..
2016-09-19 15:04:15 +02:00
2016-09-22 00:04:02 -07:00
2016-08-07 23:38:48 -04:00
2016-09-21 13:33:50 +02:00
2016-09-22 00:01:56 -07:00
2016-09-06 13:56:41 -04:00
2016-09-19 13:57:38 +02:00
2016-09-19 13:57:38 +02:00
2016-05-06 16:04:48 +02:00
2016-09-19 13:57:38 +02:00
2016-09-22 00:04:02 -07:00