linux_dsm_epyc7002/drivers/gpu/drm
Jagan Teki 9a197c862f
drm/sun4i: dsi: Fix video start delay computation
The LCD timing definitions between Linux DRM vs Allwinner are different,
below diagram shows this clear differences.

           Active                 Front           Sync           Back
           Region                 Porch                          Porch
<-----------------------><----------------><--------------><-------------->
  //////////////////////|
 ////////////////////// |
//////////////////////  |..................                ................
                                           ________________
<----- [hv]display ----->
<------------- [hv]sync_start ------------>
<--------------------- [hv]sync_end ---------------------->
<-------------------------------- [hv]total ------------------------------>

<----- lcd_[xy] -------->		  <- lcd_[hv]spw ->
					  <---------- lcd_[hv]bp --------->
<-------------------------------- lcd_[hv]t ------------------------------>

The DSI driver misinterpreted the vbp term from the BSP code to refer
only to the backporch, when in fact it was backporch + sync. Thus the
driver incorrectly used the vertical front porch plus sync in its
calculation of the DRQ set bit value, when it should not have included
the sync timing.

Including additional sync timings leads to flip_done timed out as:

WARNING: CPU: 0 PID: 31 at drivers/gpu/drm/drm_atomic_helper.c:1429 drm_atomic_helper_wait_for_vblanks.part.1+0x298/0x2a0
[CRTC:46:crtc-0] vblank wait timed out
Modules linked in:
CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 5.1.0-next-20190514-00029-g09e5b0ed0a58 #18
Hardware name: Allwinner sun8i Family
Workqueue: events deferred_probe_work_func
[<c010ed54>] (unwind_backtrace) from [<c010b76c>] (show_stack+0x10/0x14)
[<c010b76c>] (show_stack) from [<c0688c70>] (dump_stack+0x84/0x98)
[<c0688c70>] (dump_stack) from [<c011d9e4>] (__warn+0xfc/0x114)
[<c011d9e4>] (__warn) from [<c011da40>] (warn_slowpath_fmt+0x44/0x68)
[<c011da40>] (warn_slowpath_fmt) from [<c040cd50>] (drm_atomic_helper_wait_for_vblanks.part.1+0x298/0x2a0)
[<c040cd50>] (drm_atomic_helper_wait_for_vblanks.part.1) from [<c040e694>] (drm_atomic_helper_commit_tail_rpm+0x5c/0x6c)
[<c040e694>] (drm_atomic_helper_commit_tail_rpm) from [<c040e4dc>] (commit_tail+0x40/0x6c)
[<c040e4dc>] (commit_tail) from [<c040e5cc>] (drm_atomic_helper_commit+0xbc/0x128)
[<c040e5cc>] (drm_atomic_helper_commit) from [<c0411b64>] (restore_fbdev_mode_atomic+0x1cc/0x1dc)
[<c0411b64>] (restore_fbdev_mode_atomic) from [<c04156f8>] (drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xa0)
[<c04156f8>] (drm_fb_helper_restore_fbdev_mode_unlocked) from [<c0415774>] (drm_fb_helper_set_par+0x30/0x54)
[<c0415774>] (drm_fb_helper_set_par) from [<c03ad450>] (fbcon_init+0x560/0x5ac)
[<c03ad450>] (fbcon_init) from [<c03eb8a0>] (visual_init+0xbc/0x104)
[<c03eb8a0>] (visual_init) from [<c03ed1b8>] (do_bind_con_driver+0x1b0/0x390)
[<c03ed1b8>] (do_bind_con_driver) from [<c03ed780>] (do_take_over_console+0x13c/0x1c4)
[<c03ed780>] (do_take_over_console) from [<c03ad800>] (do_fbcon_takeover+0x74/0xcc)
[<c03ad800>] (do_fbcon_takeover) from [<c013c9c8>] (notifier_call_chain+0x44/0x84)
[<c013c9c8>] (notifier_call_chain) from [<c013cd20>] (__blocking_notifier_call_chain+0x48/0x60)
[<c013cd20>] (__blocking_notifier_call_chain) from [<c013cd50>] (blocking_notifier_call_chain+0x18/0x20)
[<c013cd50>] (blocking_notifier_call_chain) from [<c03a6e44>] (register_framebuffer+0x1e0/0x2f8)
[<c03a6e44>] (register_framebuffer) from [<c04153c0>] (__drm_fb_helper_initial_config_and_unlock+0x2fc/0x50c)
[<c04153c0>] (__drm_fb_helper_initial_config_and_unlock) from [<c04158c8>] (drm_fbdev_client_hotplug+0xe8/0x1b8)
[<c04158c8>] (drm_fbdev_client_hotplug) from [<c0415a20>] (drm_fbdev_generic_setup+0x88/0x118)
[<c0415a20>] (drm_fbdev_generic_setup) from [<c043f060>] (sun4i_drv_bind+0x128/0x160)
[<c043f060>] (sun4i_drv_bind) from [<c044b598>] (try_to_bring_up_master+0x164/0x1a0)
[<c044b598>] (try_to_bring_up_master) from [<c044b668>] (__component_add+0x94/0x140)
[<c044b668>] (__component_add) from [<c0445e1c>] (sun6i_dsi_probe+0x144/0x234)
[<c0445e1c>] (sun6i_dsi_probe) from [<c0452ef4>] (platform_drv_probe+0x48/0x9c)
[<c0452ef4>] (platform_drv_probe) from [<c04512cc>] (really_probe+0x1dc/0x2c8)
[<c04512cc>] (really_probe) from [<c0451518>] (driver_probe_device+0x60/0x160)
[<c0451518>] (driver_probe_device) from [<c044f7a4>] (bus_for_each_drv+0x74/0xb8)
[<c044f7a4>] (bus_for_each_drv) from [<c045107c>] (__device_attach+0xd0/0x13c)
[<c045107c>] (__device_attach) from [<c0450474>] (bus_probe_device+0x84/0x8c)
[<c0450474>] (bus_probe_device) from [<c0450900>] (deferred_probe_work_func+0x64/0x90)
[<c0450900>] (deferred_probe_work_func) from [<c0135970>] (process_one_work+0x204/0x420)
[<c0135970>] (process_one_work) from [<c013690c>] (worker_thread+0x274/0x5a0)
[<c013690c>] (worker_thread) from [<c013b3d8>] (kthread+0x11c/0x14c)
[<c013b3d8>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
Exception stack(0xde539fb0 to 0xde539ff8)
9fa0:                                     00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end trace 495200a78b24980e ]---
random: fast init done
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:46:crtc-0] flip_done timed out
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:48:DSI-1] flip_done timed out
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:30:plane-0] flip_done timed out

With the terms(as described in above diagram) fixed, the panel
displays correctly without any timeouts.

Tested-by: Merlijn Wajer <merlijn@wizzup.org>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191006160303.24413-2-icenowy@aosc.io
2019-10-08 07:56:41 +02:00
..
amd Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
arc drm: Stop including drm_bridge.h from drm_crtc.h 2019-08-28 22:11:03 +02:00
arm Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
armada drm/armada: drop use of drmP.h 2019-08-14 18:31:10 +02:00
aspeed drm/aspeed: gfc_crtc: Make structure aspeed_gfx_funcs constant 2019-08-14 19:27:26 +02:00
ast drm/ast: Allocate cursor BOs at high end of video memory 2019-10-04 10:00:21 +02:00
atmel-hlcdc drm/bridge: panel: Infer connector type from panel by default 2019-09-08 19:04:23 +02:00
bochs drm/vram: Have VRAM MM call GEM VRAM functions directly 2019-09-12 19:54:42 +02:00
bridge drm/bridge: dw-hdmi: Refuse DDC/CI transfers on the internal I2C controller 2019-10-07 14:27:48 +02:00
cirrus drm: drop resource_id parameter from drm_fb_helper_remove_conflicting_pci_framebuffers 2019-08-23 10:48:31 +02:00
etnaviv Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
exynos Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
fsl-dcu drm: Stop including drm_bridge.h from drm_crtc.h 2019-08-28 22:11:03 +02:00
gma500
hisilicon Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
i2c cec: add cec_adapter to cec_notifier_cec_adap_unregister() 2019-10-07 12:47:43 +02:00
i810 drm/i810: Prevent underflow in ioctl 2019-10-04 17:04:05 +01:00
i915 drm/mm: Convert drm_mm_node booleans to bitops 2019-10-04 13:43:13 +01:00
imx Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
ingenic drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
lib
lima drm/lima: Add support for multiple reset lines 2019-10-05 17:51:16 +08:00
mcde Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
mediatek Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
meson drm/meson: vclk: use the correct G12A frac max value 2019-09-30 15:22:09 +02:00
mga
mgag200 drm/mgag200: Allocate cursor BOs at high end of video memory 2019-10-04 10:01:12 +02:00
msm Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
mxsfb dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
nouveau Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
omapdrm drm/omap: hdmi4: fix use of uninitialized var 2019-10-04 11:30:28 +03:00
panel drm: panel-lvds: Potential Oops in probe error handling 2019-09-21 20:48:09 +02:00
panfrost Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
pl111 drm/bridge: panel: Infer connector type from panel by default 2019-09-08 19:04:23 +02:00
qxl Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
r128 drm/r128: drop use of drmP.h 2019-07-17 12:52:55 +02:00
radeon Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
rcar-du Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
rockchip Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
savage
scheduler drm/scheduler: use job count instead of peek 2019-08-15 10:52:10 -05:00
selftests drm/mm: Use helpers for drm_mm_node booleans 2019-10-04 13:42:33 +01:00
shmobile drm/shmobile: drop use of drmP.h 2019-07-15 18:11:31 +02:00
sis
sti drm: sti: fix W=1 warnings 2019-09-16 15:14:43 +02:00
stm drm/stm: dsi: higher pll out only in video burst mode 2019-09-16 15:14:10 +02:00
sun4i drm/sun4i: dsi: Fix video start delay computation 2019-10-08 07:56:41 +02:00
tdfx drm/tdfx: drop use of drmP.h 2019-07-17 12:52:55 +02:00
tegra drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
tilcdc drm/tilcdc: plane: Make structure tilcdc_plane_funcs constant 2019-10-07 21:37:20 +03:00
tiny drm/tiny: Kconfig: Remove always-y THERMAL dep. from TINYDRM_REPAPER 2019-10-01 12:51:18 +02:00
ttm Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
tve200 drm/bridge: panel: Infer connector type from panel by default 2019-09-08 19:04:23 +02:00
udl drm/connector: Share with non-atomic drivers the function to get the single encoder 2019-09-16 15:13:02 -07:00
v3d drm/v3d: clean caches at the end of render jobs on request from user space 2019-09-19 12:57:44 -07:00
vboxvideo drm/vram: Have VRAM MM call GEM VRAM functions directly 2019-09-12 19:54:42 +02:00
vc4 drm/mm: Use helpers for drm_mm_node booleans 2019-10-04 13:42:33 +01:00
vgem dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
via drivers/gpu/drm/via: convert put_page() to put_user_page*() 2019-09-24 15:54:08 -07:00
virtio drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
vkms drm/vkms: Reduce critical section in vblank_simulate 2019-09-03 17:16:53 +02:00
vmwgfx Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
xen drm/xen-front: Make structure fb_funcs constant 2019-08-19 08:32:52 +03:00
zte Linus 5.3-rc1 2019-07-22 21:24:10 +02:00
ati_pcigart.c drm/ati_pcigart: drop dependency on drm_os_linux.h 2019-07-19 23:24:16 +02:00
drm_agpsupport.c gpu/drm: fix a few kernel-doc "/**" mark warnings 2019-07-16 11:25:02 +02:00
drm_atomic_helper.c Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
drm_atomic_state_helper.c drm/atomic: Rename crtc_state->pageflip_flags to async_flip 2019-09-18 18:43:36 +02:00
drm_atomic_uapi.c Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
drm_atomic.c
drm_auth.c
drm_blend.c drm/blend: Define the direction of Z position values 2019-09-06 20:23:21 +02:00
drm_bridge.c
drm_bufs.c drm main pull request for v5.3-rc1 (sans mm changes) 2019-07-15 19:04:27 -07:00
drm_cache.c
drm_client_modeset.c Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
drm_client.c drm/fb-helper: Map DRM client buffer only when required 2019-08-01 15:01:29 +02:00
drm_color_mgmt.c
drm_connector.c drm: Add DisplayPort colorspace property creation function 2019-09-20 18:46:18 +03:00
drm_context.c
drm_crtc_helper_internal.h drm/connector: Share with non-atomic drivers the function to get the single encoder 2019-09-16 15:13:02 -07:00
drm_crtc_helper.c Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
drm_crtc_internal.h
drm_crtc.c
drm_damage_helper.c
drm_debugfs_crc.c drm: Fix return type of crc .poll() 2019-09-30 20:17:31 +03:00
drm_debugfs.c
drm_dma.c gpu/drm: fix a few kernel-doc "/**" mark warnings 2019-07-16 11:25:02 +02:00
drm_dp_aux_dev.c drm/dp_mst: Enable registration of AUX devices for MST ports 2019-07-25 16:39:35 -04:00
drm_dp_cec.c drm_dp_cec: add connector info support. 2019-08-27 12:52:59 +02:00
drm_dp_dual_mode_helper.c
drm_dp_helper.c drm/doc: Improve docs around connector (un)registration 2019-09-18 12:41:08 +02:00
drm_dp_mst_topology_internal.h drm/dp_mst: Add sideband down request tracing + selftests 2019-09-03 19:30:06 -04:00
drm_dp_mst_topology.c drm/print: add drm_debug_enabled() 2019-10-02 16:28:55 +03:00
drm_drv.c Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
drm_dsc.c drm/dsc: Fix bogus cpu_to_be16() usage 2019-09-30 20:15:53 +03:00
drm_dumb_buffers.c Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()" 2019-08-07 11:56:48 -04:00
drm_edid_load.c drm/print: add drm_debug_enabled() 2019-10-02 16:28:55 +03:00
drm_edid.c drm/print: add drm_debug_enabled() 2019-10-02 16:28:55 +03:00
drm_encoder_slave.c
drm_encoder.c drm: Stop including drm_bridge.h from drm_crtc.h 2019-08-28 22:11:03 +02:00
drm_fb_cma_helper.c
drm_fb_helper.c drm/fb-helper: Include prototype for drm_fb_helper_modinit() 2019-09-30 20:15:07 +03:00
drm_file.c
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c
drm_framebuffer.c drm: silence variable 'conn' set but not used 2019-07-22 16:04:53 -04:00
drm_gem_cma_helper.c
drm_gem_framebuffer_helper.c dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
drm_gem_shmem_helper.c drm/shmem: Use mutex_trylock in drm_gem_shmem_purge 2019-08-28 10:02:39 -05:00
drm_gem_ttm_helper.c drm: tweak drm_print_bits() 2019-09-24 09:57:21 +02:00
drm_gem_vram_helper.c drm/vram: Support top-down placement flag 2019-09-27 09:48:53 +02:00
drm_gem.c dma-buf: rename reservation_object to dma_resv 2019-08-13 09:09:30 +02:00
drm_hashtab.c
drm_hdcp.c drm/hdcp: reference for srm file format 2019-08-06 13:18:42 +05:30
drm_internal.h
drm_ioc32.c Linus 5.3-rc1 2019-07-22 21:24:10 +02:00
drm_ioctl.c drm/atomic: Take the atomic toys away from X 2019-09-18 18:42:21 +02:00
drm_irq.c
drm_kms_helper_common.c drm: fix module name in edid_firmware log message 2019-08-22 10:41:06 +03:00
drm_lease.c
drm_legacy_misc.c gpu/drm: fix a few kernel-doc "/**" mark warnings 2019-07-16 11:25:02 +02:00
drm_legacy.h
drm_lock.c gpu/drm: fix a few kernel-doc "/**" mark warnings 2019-07-16 11:25:02 +02:00
drm_memory.c drm: Include prototype for drm_need_swiotlb() 2019-09-30 20:16:28 +03:00
drm_mipi_dbi.c drm/print: add drm_debug_enabled() 2019-10-02 16:28:55 +03:00
drm_mipi_dsi.c drivers: Introduce device lookup variants by of_node 2019-07-30 13:07:41 +02:00
drm_mm.c drm/mm: Use clear_bit_unlock() for releasing the drm_mm_node() 2019-10-04 13:43:43 +01:00
drm_mode_config.c
drm_mode_object.c drm/kms: Duct-tape for mode object lifetime checks 2019-09-18 11:27:18 +02:00
drm_modes.c drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
drm_modeset_helper.c
drm_modeset_lock.c docs conversion for v5.3-rc1 2019-07-16 12:21:41 -07:00
drm_of.c drm: Remove redundant of_device_is_available check 2019-09-20 15:03:42 -04:00
drm_panel_orientation_quirks.c
drm_panel.c drm/panel: Add and fill drm_panel type field 2019-09-08 19:04:01 +02:00
drm_pci.c
drm_plane_helper.c
drm_plane.c
drm_prime.c drm/prime: Ditch gem_prime_res_obj hook 2019-07-31 10:19:23 +02:00
drm_print.c drm/print: add drm_debug_enabled() 2019-10-02 16:28:55 +03:00
drm_probe_helper.c drm/connector: Allow max possible encoders to attach to a connector 2019-09-16 15:13:53 -07:00
drm_property.c
drm_rect.c
drm_scatter.c gpu/drm: fix a few kernel-doc "/**" mark warnings 2019-07-16 11:25:02 +02:00
drm_scdc_helper.c
drm_self_refresh_helper.c drm: Measure Self Refresh Entry/Exit times to avoid thrashing 2019-09-19 10:03:32 -04:00
drm_simple_kms_helper.c drm: Stop including drm_bridge.h from drm_crtc.h 2019-08-28 22:11:03 +02:00
drm_syncobj.c drm/syncobj: Include the prototype for drm_timeout_abs_to_jiffies() 2019-09-30 20:17:00 +03:00
drm_sysfs.c drm: uevent for connector status change 2019-08-06 13:16:54 +05:30
drm_trace_points.c
drm_trace.h drm: Add high-precision time to vblank trace event 2019-09-03 09:46:18 +02:00
drm_vblank.c drm/print: add drm_debug_enabled() 2019-10-02 16:28:55 +03:00
drm_vm.c gpu/drm: fix a few kernel-doc "/**" mark warnings 2019-07-16 11:25:02 +02:00
drm_vma_manager.c
drm_vram_helper_common.c drm/vram: Have VRAM MM call GEM VRAM functions directly 2019-09-12 19:54:42 +02:00
drm_writeback.c
Kconfig Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00
Makefile Merge drm/drm-next into drm-misc-next 2019-10-03 16:38:50 +02:00