linux/drivers/gpu/drm/rockchip
Douglas Anderson 99b9683f21 drm/rockchip: Properly adjust to a true clock in adjusted_mode
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
2019-06-16 15:35:21 +02:00
..
analogix_dp-rockchip.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
cdn-dp-core.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
cdn-dp-core.h drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
cdn-dp-reg.c drm/rockchip: cdn-dp: correct rate in the struct drm_dp_link assignment 2019-06-14 13:53:07 +02:00
cdn-dp-reg.h
dw_hdmi-rockchip.c drm/rockchip: dw_hdmi: add basic rk3228 support 2019-06-14 13:39:15 +02:00
dw-mipi-dsi-rockchip.c drm: bridge: Constify mode arguments to bridge .mode_set() operation 2019-01-14 03:51:14 +02:00
inno_hdmi.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
inno_hdmi.h
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rk3066_hdmi.c drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rk3066_hdmi.h drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rockchip_drm_drv.c drm/rockchip: shutdown drm subsystem on shutdown 2019-04-18 10:28:30 +02:00
rockchip_drm_drv.h drm: rockchip: introduce rk3066 hdmi 2019-03-31 14:24:30 +02:00
rockchip_drm_fb.c drm/rockchip: Use dirtyfb helper 2019-06-13 14:31:10 -04:00
rockchip_drm_fb.h drm/rockchip: rockchip_drm_fb -> drm_framebuffer 2018-05-18 16:02:05 +01:00
rockchip_drm_fbdev.c drm/rockchip: Use drm_fb_helper_fill_info 2019-03-27 10:05:37 +01:00
rockchip_drm_fbdev.h
rockchip_drm_gem.c drm/rockchip/rockchip_drm_gem.c: convert to use vm_map_pages() 2019-05-14 09:47:50 -07:00
rockchip_drm_gem.h drm/rockchip: support prime import sg table 2018-02-18 11:16:40 +01:00
rockchip_drm_psr.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
rockchip_drm_psr.h drm/rockchip: update cursors asynchronously through atomic. 2019-01-10 23:29:17 +01:00
rockchip_drm_vop.c drm/rockchip: Properly adjust to a true clock in adjusted_mode 2019-06-16 15:35:21 +02:00
rockchip_drm_vop.h drm/rockchip: vop: Support dithering to RGB666 2019-03-30 23:39:12 +01:00
rockchip_lvds.c drm: Split out drm_probe_helper.h 2019-01-24 13:20:42 +01:00
rockchip_lvds.h
rockchip_rgb.c Linux 5.0-rc7 2019-02-18 13:27:15 +10:00
rockchip_rgb.h drm/rockchip: rgb: update SPDX license identifier 2019-01-25 14:50:07 +01:00
rockchip_vop_reg.c drm/rockchip: vop: Support dithering to RGB666 2019-03-30 23:39:12 +01:00
rockchip_vop_reg.h drm: rockchip: vop: add rk3066 vop definitions 2019-01-12 19:42:58 +01:00