linux-stable/drivers/gpu/drm
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
..
amd drm/amdgpu: Fix connector atomic_check compilation fail 2019-06-14 09:33:56 +02:00
arc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
arm drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
armada drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
aspeed treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ast drm/ast: Pin framebuffer BO during dirty update 2019-06-13 13:37:19 +02:00
atmel-hlcdc drm/atmel-hlcdc: revert shift by 8 2019-06-04 23:52:09 +02:00
bochs drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
bridge drm/bridge: analogix_dp: Convert to GPIO descriptors 2019-06-13 15:46:37 +02:00
cirrus drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
etnaviv drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
exynos treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
fsl-dcu treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
gma500 drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
hisilicon drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
i2c treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
i810 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
i915 drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state 2019-06-13 14:30:07 -04:00
imx drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
lib
lima drm/lima: add timeout to drm scheduler init 2019-05-21 20:47:36 +08:00
mcde drm/mcde: Fix an uninitialized variable 2019-06-13 11:55:23 +02:00
mediatek drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
meson drm/meson: Add support for XBGR8888 & ABGR8888 formats 2019-06-07 10:33:15 +02:00
mga treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
mgag200 drm/mgag200: Rewrite cursor handling 2019-06-13 13:37:28 +02:00
msm drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
mxsfb treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
nouveau drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state 2019-06-13 14:30:07 -04:00
omapdrm drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
panel panel: rocktech: no need to check return value of debugfs_create functions 2019-06-13 15:10:02 +02:00
panfrost drm/panfrost: Align GEM objects GPU VA to 2MB 2019-06-14 09:15:14 -06:00
pl111 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
qxl treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
r128 drm/r128: drop use of drmP.h 2019-06-05 20:31:19 +02:00
radeon drm/radeon: drop use of drmP.h (2/2) 2019-06-10 22:30:24 +02:00
rcar-du drm: Convert connector_helper_funcs->atomic_check to accept drm_atomic_state 2019-06-13 14:30:07 -04:00
rockchip drm/rockchip: Properly adjust to a true clock in adjusted_mode 2019-06-16 15:35:21 +02:00
savage drm/savage: drop use of drmP.h 2019-06-05 20:31:04 +02:00
scheduler drm/sched: Fix make htmldocs warnings. 2019-05-29 11:49:51 -05:00
selftests treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
shmobile
sis drm/sis: drop drmP.h use 2019-06-05 20:29:57 +02:00
sti sti: no need to check return value of debugfs_create functions 2019-06-13 17:35:49 +02:00
stm drm/stm: dsi: add power on/off phy ops 2019-06-12 09:09:18 +02:00
sun4i drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
tdfx treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
tegra drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
tilcdc treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
tinydrm treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
ttm drm pull request for 5.2 2019-05-08 21:35:19 -07:00
tve200 treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
udl treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
v3d drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
vboxvideo Merge drm/drm-next into drm-misc-next 2019-05-22 16:08:21 -04:00
vc4 drm/vc4: no need to check return value of debugfs_create functions 2019-06-14 16:21:45 -07:00
vgem treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
via treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
virtio drm/virtio: drop framebuffer dirty tracking code 2019-06-13 08:47:15 +02:00
vkms drm/vkms: Forward timer right after drm_crtc_handle_vblank 2019-06-06 20:36:21 -03:00
vmwgfx drm/vmwgfx: integer underflow in vmw_cmd_dx_set_shader() leading to an invalid read 2019-05-21 10:23:10 +02:00
xen treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
zte drm-misc-next for v5.3, try #2: 2019-05-28 08:59:11 +10:00
ati_pcigart.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_agpsupport.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_atomic.c drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00
drm_atomic_helper.c drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00
drm_atomic_state_helper.c drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00
drm_atomic_uapi.c drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00
drm_auth.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_blend.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_bridge.c drm: Add atomic variants for bridge enable/disable 2019-06-13 13:00:29 -04:00
drm_bufs.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_cache.c
drm_client.c drm/fb-helper: Remove drm_fb_helper_crtc 2019-06-04 12:13:47 +02:00
drm_client_modeset.c drm/fb-helper: Move out modeset config code 2019-06-11 14:48:19 +02:00
drm_color_mgmt.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_connector.c drm/connector: Fix kerneldoc warning in HDR_OUTPUT_METADATA description 2019-06-13 14:31:10 -04:00
drm_context.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_crtc.c drm: no need to check return value of debugfs_create functions 2019-06-13 16:39:16 +02:00
drm_crtc_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_crtc_helper_internal.h
drm_crtc_internal.h drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() 2019-06-08 16:46:37 +02:00
drm_damage_helper.c drm/damage-helper: Use NULL instead of 0 2019-05-28 09:03:06 +02:00
drm_debugfs.c drm: debugfs: make drm_debugfs_create_files() never fail 2019-06-14 16:59:51 +02:00
drm_debugfs_crc.c drm: no need to check return value of debugfs_create functions 2019-06-13 16:39:16 +02:00
drm_dma.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_dp_aux_dev.c drm/dp: drmP.h include removal 2019-05-06 16:00:48 +03:00
drm_dp_cec.c
drm_dp_dual_mode_helper.c drm/dp: drmP.h include removal 2019-05-06 16:00:48 +03:00
drm_dp_helper.c drm/dp: Add DP_DPCD_QUIRK_NO_SINK_COUNT 2019-06-14 19:11:10 +03:00
drm_dp_mst_topology.c drm/mst: Fix MST sideband up-reply failure handling 2019-05-29 20:12:34 +03:00
drm_drv.c drm: no need to check return value of debugfs_create functions 2019-06-13 16:39:16 +02:00
drm_dsc.c
drm_dumb_buffers.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_edid.c drm/edid: Ignore "DFP 1.x" bit for EDID 1.2 and earlier 2019-06-06 16:18:15 +03:00
drm_edid_load.c Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
drm_encoder.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_encoder_slave.c
drm_fb_cma_helper.c
drm_fb_helper.c drm: Reverse lock order in pan_display_legacy() 2019-06-12 10:14:07 +02:00
drm_file.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_flip_work.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_format_helper.c drm: Remove users of drm_format_info_plane_cpp 2019-05-20 13:35:56 +02:00
drm_fourcc.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_framebuffer.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_gem.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_gem_cma_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_gem_framebuffer_helper.c drm/docs: More links for implicit/explicit fencing. 2019-06-03 17:11:33 +02:00
drm_gem_shmem_helper.c
drm_gem_vram_helper.c drm: Remove functions with kmap-object argument from GEM VRAM helpers 2019-06-13 13:37:36 +02:00
drm_hashtab.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_hdcp.c drm/hdcp: drm_hdcp_request_srm() as static 2019-05-13 22:05:54 +02:00
drm_internal.h drm: no need to check return value of debugfs_create functions 2019-06-13 16:39:16 +02:00
drm_ioc32.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_ioctl.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_irq.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_kms_helper_common.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_lease.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_legacy.h drm: make drm_legacy.h self-contained 2019-05-27 18:06:47 +02:00
drm_legacy_misc.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_lock.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_memory.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_mipi_dsi.c
drm_mm.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_mode_config.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_mode_object.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_modes.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_modeset_helper.c
drm_modeset_lock.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_of.c Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
drm_panel.c
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for GPD MicroPC 2019-06-06 12:49:08 +02:00
drm_pci.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_plane.c
drm_plane_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_prime.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_print.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_probe_helper.c drm: Flush output polling on shutdown 2019-06-04 17:11:33 +01:00
drm_property.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_rect.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_scatter.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_scdc_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_self_refresh_helper.c drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00
drm_simple_kms_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_syncobj.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_sysfs.c Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
drm_trace.h drm: make drm_trace.h self-contained 2019-05-27 18:06:54 +02:00
drm_trace_points.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vblank.c drm: add debug print to update_vblank_count 2019-06-14 19:10:04 +03:00
drm_vm.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vma_manager.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_vram_helper_common.c drm: Replace drm_gem_vram_push_to_system() with kunmap + unpin 2019-05-22 12:43:29 +02:00
drm_vram_mm_helper.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
drm_writeback.c drm: drop use of drmP.h in drm/* 2019-05-27 18:07:03 +02:00
Kconfig Merge remote-tracking branch 'drm/drm-next' into drm-misc-next 2019-05-28 09:39:08 +02:00
Makefile drm: Add helpers to kick off self refresh mode in drivers 2019-06-13 14:31:10 -04:00