Hello,
I have a custom i.MX8m plus board. Kernel version is 5.10.72. OS has been generated with Yocto Hardknott. U-Boot version is “2020.04-5.10.9-1.0.0+gad7b74b”.
We detected problems on startup of the device, resulting in a kernel crash, so device cannot startup and remains inactive (no serial port login is available). Seemed to be a sporadic error since it happened about ten times distributed in several devices, until we realized that we can reproduce it in one of our tests setup 1 of each 3 times (more or less).
Our setup conssists in the device connected to a monitor via HDMI. Lets focus on the one where we can reproduce the error, which has a "Lenovo Thinkvision T24i-2L" monitor, other ones has the same device version and several types of monitors. Tests are done removing power, waiting a few seconds, reconnecting power, then waiting for startup, and it fails 1 of each 3 times as I said. During this tests, the monitor it is permanently connected to the device.
Connecting to the serial port debug, we could see the following log.
[ 5.923032] imx-cdnhdmi sound-hdmi: snd_soc_register_card failed (-517)
[ 5.932152] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[ 5.936766] random: crng init done
[ 5.940132] imx-drm display-subsystem: bound imx-lcdifv3-crtc.1 (ops lcdifv3_crtc_ops)
[ 5.951546] imx_sec_dsim_drv 32e60000.mipi_dsi: version number is 0x1060200
[ 5.958552] imx_sec_dsim_drv 32e60000.mipi_dsi: Failed to attach bridge: 32e60000.mipi_dsi
[ 5.966834] imx_sec_dsim_drv 32e60000.mipi_dsi: failed to bind sec dsim bridge: -19
[ 5.974504] imx-drm display-subsystem: bound 32e60000.mipi_dsi (ops imx_sec_dsim_ops)
[ 5.982630] dwhdmi-imx 32fd8000.hdmi: Detected HDMI TX controller v2.13a with HDCP (samsung_dw_hdmi_phy2)
[ 5.993389] dwhdmi-imx 32fd8000.hdmi: registered DesignWare HDMI I2C bus driver
[ 6.003996] imx-drm display-subsystem: bound 32fd8000.hdmi (ops dw_hdmi_imx_ops)
[ 6.012217] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 1
[ 6.640608] ------------[ cut here ]------------
[ 6.640615] [CRTC:36:crtc-1] vblank wait timed out
[ 6.640687] WARNING: CPU: 1 PID: 214 at drivers/gpu/drm/drm_atomic_helper.c:1512 drm_atomic_helper_wait_for_vblanks.part.0+0x278/0x2a0
[ 6.640690] Modules linked in:
[ 6.640703] CPU: 1 PID: 214 Comm: kworker/1:3 Not tainted 5.10.72-gmv-1.0.8+g3f86782 #1
[ 6.640706] Hardware name: EP200 GMV board, DTS version 1.0.12 (DT)
[ 6.640717] Workqueue: events deferred_probe_work_func
[ 6.640729] pstate: 60000005 (nZCv daif -PAN -UAO -TCO BTYPE=--)
[ 6.640737] pc : drm_atomic_helper_wait_for_vblanks.part.0+0x278/0x2a0
[ 6.640746] lr : drm_atomic_helper_wait_for_vblanks.part.0+0x278/0x2a0
[ 6.640749] sp : ffff80001322b1c0
[ 6.640754] x29: ffff80001322b1c0 x28: 0000000000000001
[ 6.640766] x27: 0000000000000000 x26: 0000000000000001
[ 6.640775] x25: 0000000000000038 x24: ffff00000a405800
[ 6.640785] x23: 0000000000000002 x22: 0000000000000038
[ 6.640796] x21: ffff00000a4f8c80 x20: ffff00000a405088
[ 6.640807] x19: 0000000000000001 x18: ffff8000124c7f88
[ 6.640817] x17: 0000000000000000 x16: 0000000000000000
[ 6.640826] x15: 0000000000000030 x14: ffff8000126b37b8
[ 6.640835] x13: ffffffffffffffff x12: fffffffffffc76cf
[ 6.640845] x11: ffff8000124c7fa0 x10: fffffffffffe0000
[ 6.640855] x9 : ffff80001322b1c0 x8 : 206b6e616c627620
[ 6.640864] x7 : 5d312d637472633a x6 : 00000000fffff1f9
[ 6.640875] x5 : 0000000000000000 x4 : 0000000000000000
[ 6.640886] x3 : 00000000ffffffff x2 : 0000000000000000
[ 6.640897] x1 : 0000000000000000 x0 : ffff0000048ad580
[ 6.640906] Call trace:
[ 6.640917] drm_atomic_helper_wait_for_vblanks.part.0+0x278/0x2a0
[ 6.640927] drm_atomic_helper_wait_for_vblanks+0x1c/0x30
[ 6.640936] lcdifv3_drm_atomic_commit_tail+0x54/0x70
[ 6.640945] commit_tail+0xa0/0x180
[ 6.640953] drm_atomic_helper_commit+0x160/0x390
[ 6.640962] drm_atomic_commit+0x4c/0x5c
[ 6.640969] drm_client_modeset_commit_atomic+0x1c8/0x260
[ 6.640976] drm_client_modeset_commit_locked+0x5c/0x1a0
[ 6.640984] drm_client_modeset_commit+0x30/0x60
[ 6.640991] drm_fb_helper_set_par+0xc8/0x120
[ 6.640998] fbcon_init+0x250/0x4e0
[ 6.641004] visual_init+0xb0/0x110
[ 6.641010] do_bind_con_driver.isra.0+0x1c8/0x39c
[ 6.641018] do_take_over_console+0x140/0x200
[ 6.641025] do_fbcon_takeover+0x70/0xe0
[ 6.641032] fbcon_fb_registered+0x100/0x11c
[ 6.641040] register_framebuffer+0x1f4/0x350
[ 6.641047] __drm_fb_helper_initial_config_and_unlock+0x2fc/0x4f0
[ 6.641053] drm_fbdev_client_hotplug+0x110/0x220
[ 6.641061] drm_fbdev_generic_setup+0xb0/0x1a0
[ 6.641068] imx_drm_bind+0x108/0x14c
[ 6.641075] try_to_bring_up_master+0x164/0x1d0
[ 6.641082] __component_add+0xa0/0x170
[ 6.641090] component_add+0x14/0x20
[ 6.641097] lcdifv3_crtc_probe+0x4c/0x80
[ 6.641103] platform_drv_probe+0x54/0xb0
[ 6.641110] really_probe+0xec/0x4d0
[ 6.641117] driver_probe_device+0x58/0xc0
[ 6.641123] __device_attach_driver+0xa8/0x10c
[ 6.641130] bus_for_each_drv+0x78/0xd0
[ 6.641135] __device_attach+0xdc/0x180
[ 6.641142] device_initial_probe+0x14/0x20
[ 6.641149] bus_probe_device+0x9c/0xa4
[ 6.641155] device_add+0x488/0x790
[ 6.641161] platform_device_add+0x114/0x234
[ 6.641169] imx_lcdifv3_probe+0x2cc/0x460
[ 6.641176] platform_drv_probe+0x54/0xb0
[ 6.641183] really_probe+0xec/0x4d0
[ 6.641190] driver_probe_device+0x58/0xc0
[ 6.641197] __device_attach_driver+0xa8/0x10c
[ 6.641206] bus_for_each_drv+0x78/0xd0
[ 6.641212] __device_attach+0xdc/0x180
[ 6.641219] device_initial_probe+0x14/0x20
[ 6.641226] bus_probe_device+0x9c/0xa4
[ 6.641233] deferred_probe_work_func+0x80/0xc0
[ 6.641240] process_one_work+0x1cc/0x350
[ 6.641246] worker_thread+0x2c0/0x470
[ 6.641253] kthread+0x154/0x160
[ 6.641260] ret_from_fork+0x10/0x30
[ 6.641264] ---[ end trace 7bf178d93fa9c0ac ]---
[ 16.864599] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:36:crtc-1] flip_done timed out
[ 27.104883] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:38:HDMI-A-1] flip_done timed out
[ 37.344606] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:34:plane-1] flip_done timed out
[ 37.448599] ------------[ cut here ]------------
[ 37.448604] [CRTC:36:crtc-1] vblank wait timed out
[ 37.448668] WARNING: CPU: 1 PID: 214 at drivers/gpu/drm/drm_atomic_helper.c:1512 drm_atomic_helper_wait_for_vblanks.part.0+0x278/0x2a0
After a few seconds, it crashes and we cannot even connect to the device via serial port or ssh.
We tested with multiple devices and scenarios:
My conclusions are:
After a research, I tested sending "video=HDMI-A-1:D" as kernel argument and the error disappear, but I do not like this solution because it is a patch, not the solution to the root problem.
I took a look at this post https://community.nxp.com/t5/i-MX-Processors/i-MX-8M-Mini-DRM-crash/m-p/1526692, that seems to have the same issue, but as I mentioned, our setup is different because we have the HDMI cable and monitor permanently connected to the device and with the monitor always powered up, also, my error is critical since the device it is not starting as it should. I already have the patch that @AldoG commented.
Do you think that it can be related with the monitor parameters, like refresh rate or others? Or maybe it is bug on i.MX8?
We also tested with some HDMI cables from different sizes: 5 meters and 7.5 meters long (original one was 1 meter long) and the error still appears.