MLK-17003: hdmi: More delay need for hdmi phy init
authorSandor Yu <Sandor.yu@nxp.com>
Tue, 28 Nov 2017 10:01:39 +0000 (18:01 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
DRM core waits for 50ms for a vblank interrupt to come
after changing the mode. But in video mode change from
4Kp60 to 480p60 case, the VBLANK interrupt is not coming
in 50ms, drm core driver will dump the followed warning
information.

[ 1034.956833] [CRTC:25] vblank wait timed out
[ 1034.961069] ------------[ cut here ]------------
[ 1034.965702] WARNING: CPU: 0 PID: 3485 at
/home/bamboo/build/4.9.51-8mq-beta/fsl-imx-internal-xwayland/temp_build_dir/build_fsl-imx-internal-xwayland/tmp/work-shared/imx8mqevk/kernel-source/drivers/gpu/drm/drm_atomic_helper.c:1140
drm_atomic_helper_wait_for_vblanks+0x230/0x238
[ 1034.990111] Modules linked in: 8021q garp stp mrp galcore(O) ipv6
[ 1034.996289]
[ 1034.997785] CPU: 0 PID: 3485 Comm: modetest Tainted: G        W  O
4.9.51-imx_4.9.51_imx8m_beta+gaf29127 #1
[ 1035.007783] Hardware name: Freescale i.MX8MQ EVK (DT)
[ 1035.012832] task: ffff8000b6c49900 task.stack: ffff8000b64cc000
[ 1035.018751] PC is at drm_atomic_helper_wait_for_vblanks+0x230/0x238
[ 1035.025016] LR is at drm_atomic_helper_wait_for_vblanks+0x230/0x238
[ 1035.031281] pc : [<ffff0000085a6b08>] lr : [<ffff0000085a6b08>]
pstate: 00000145
[ 1035.038673] sp : ffff8000b64cfa50
[ 1035.041985] x29: ffff8000b64cfa50 x28: 0000000000000000
[ 1035.047316] x27: 0000000000000000 x26: ffff8000b86c4820
[ 1035.052646] x25: 0000000000000090 x24: 0000000000006d57
[ 1035.057976] x23: 0000000000000018 x22: ffff8000b86c3800
[ 1035.063306] x21: ffff8000b955fc00 x20: ffff8000b64f1180
[ 1035.068637] x19: 0000000000000000 x18: 0000000000000010
[ 1035.073967] x17: 0000000000000000 x16: 0000000000000000
[ 1035.079297] x15: 0000000000000006 x14: ffff00008937abc7
[ 1035.084628] x13: ffff00000937abd5 x12: 0000000000000007
[ 1035.089959] x11: 000000000000022f x10: 0000000005f5e0ff
[ 1035.095289] x9 : 0000000000000230 x8 : 6974207469617720
[ 1035.100619] x7 : 6b6e616c6276205d x6 : ffff00000937abf6
[ 1035.105949] x5 : 0000000000000000 x4 : 0000000000000000
[ 1035.111279] x3 : 0000000000000000 x2 : ffff8000b64cc000
[ 1035.116609] x1 : ffff8000b64cc000 x0 : 000000000000001f
[ 1035.121938]
[ 1035.123428] ---[ end trace d3bf25e791b7a9c7 ]---
[ 1035.128043] Call trace:
[ 1035.130488] Exception stack(0xffff8000b64cf880 to 0xffff8000b64cf9b0)
[ 1035.136928] f880: 0000000000000000 0001000000000000 ffff8000b64cfa50
ffff0000085a6b08
[ 1035.144756] f8a0: 0000000000000002 0000000000000004 ffff00000937cfe8
000000000000001f
[ 1035.152584] f8c0: ffff00000937a000 ffff000008f67838 ffff8000b64cf970
ffff0000081009f0
[ 1035.160412] f8e0: 0000000000000000 ffff8000b64f1180 ffff8000b955fc00
ffff8000b86c3800
[ 1035.168240] f900: 0000000000000018 0000000000006d57 0000000000000090
ffff8000b86c4820
[ 1035.176067] f920: 000000000000001f ffff8000b64cc000 ffff8000b64cc000
0000000000000000
[ 1035.183895] f940: 0000000000000000 0000000000000000 ffff00000937abf6
6b6e616c6276205d
[ 1035.191723] f960: 6974207469617720 0000000000000230 0000000005f5e0ff
000000000000022f
[ 1035.199551] f980: 0000000000000007 ffff00000937abd5 ffff00008937abc7
0000000000000006
[ 1035.207377] f9a0: 0000000000000000 0000000000000000
[ 1035.212255] [<ffff0000085a6b08>]
drm_atomic_helper_wait_for_vblanks+0x230/0x238
[ 1035.219562] [<ffff0000085a96a0>]
drm_atomic_helper_commit_tail+0x50/0x68
[ 1035.226261] [<ffff0000085a971c>] commit_tail+0x64/0x80
[ 1035.231398] [<ffff0000085a97f8>] drm_atomic_helper_commit+0xa8/0x108
[ 1035.237752] [<ffff0000085ec468>] dcss_drm_atomic_commit+0x100/0x148
[ 1035.244018] [<ffff0000085c8308>] drm_atomic_commit+0x50/0x60
[ 1035.249676] [<ffff0000085a9d28>]
drm_atomic_helper_set_config+0x88/0xc8
[ 1035.256290] [<ffff0000085bb5f8>]
drm_mode_set_config_internal+0x68/0xf8
[ 1035.262903] [<ffff0000085bc9dc>] drm_mode_setcrtc+0x38c/0x450
[ 1035.268649] [<ffff0000085b3ba8>] drm_ioctl+0x198/0x448
[ 1035.273788] [<ffff0000081f067c>] do_vfs_ioctl+0xa4/0x748
[ 1035.279099] [<ffff0000081f0dac>] SyS_ioctl+0x8c/0xa0
[ 1035.284064] [<ffff000008082f4c>] __sys_trace_return+0x0/0x4

Added more delay for hdmi phy init will fixed the issue.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
drivers/gpu/drm/imx/hdp/imx-hdmi.c

index f212f4d..d3b73c0 100644 (file)
@@ -195,7 +195,7 @@ void hdmi_mode_set_t28hpc(state_struct *state, int vic, int format, int color_de
        ret = CDN_API_HDMITX_SetVic_blocking(state, vic, color_depth, format);
        pr_info("CDN_API_HDMITX_SetVic_blocking ret = %d\n", ret);
 
-       msleep(50);
+       msleep(200);
 }
 
 int hdmi_get_edid_block(void *data, u8 *buf, u32 block, size_t len)