LVDS dmesg CPU error

Hello Toradex team,

I hope you are all doing great! And thank you for your support.

Hardware:

uname:

  • Linux verdin-imx8mp-14777482 5.15.129-6.4.0+git.67c3153d20ff #1-TorizonCore SMP PREEMPT Wed Sep 27 12:30:36 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

Images tested:

  • torizon-core-docker-verdin-imx8mp-Tezi_6.4.0+build.5.tar (STABLE Release)

Guest OS:

  • macOS (M1 Pro ARM64)
  • Linux ubuntu (VM x86_64)

Issue:
I was reviewing my console and I saw this message on all my devices, and I believe that is related to a white flash on the display, first at boot time then when the user space come to live.

I have the following device tree for the lvds panel:

panel_lvds: panel-lvds {
		compatible   = "panel-lvds";

		backlight    = <&backlight>;
		power-supply = <&reg_5p0v>;

		data-mapping = "vesa-24";
		height-mm    = <528>;
		width-mm     = <297>;

		status       = "okay";

		panel-timing {
			clock-frequency = <148500000>;

			hactive      = <1920>;
			hback-porch  = <0>;
			hfront-porch = <130>;
			hsync-len    = <10>;
			hsync-active = <0>;

			vactive      = <1080>;
			vback-porch  = <0>;
			vfront-porch = <35>;
			vsync-len    = <10>;
			vsync-active = <0>;

			de-active       = <1>;
			pixelclk-active = <1>;
		};
};

Here is the output of the console:

[   12.145230] ------------[ cut here ]------------
[   12.145246] WARNING: CPU: 3 PID: 103 at lcdifv3_set_mode+0x90/0x2f0
[   12.145263] Modules linked in: xt_nat xt_tcpudp xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c xt_addrtype iptable_filter ip_ta
bles x_tables br_netfilter bridge stp llc qmi_wwan cdc_wdm usbnet option usb_wwan overlay mwifiex_sdio mwifiex cfg80211 crct10dif_ce lm75 hci_uart btqca imx_sdma pinctrl_mcp23s08_i2c btbcm pinctrl_mcp23s08 ti_ads1015 btinte
l industrialio_triggered_buffer kfifo_buf industrialio fsl_jr_uio secvio uio_pdrv_genirq uio joydev egalax_i2c(O) libcomposite galcore(O) fuse lontium_lt8912b ti_sn65dsi83 sec_mipi_dsim_imx display_connector sec_dsim
[   12.145392] CPU: 3 PID: 103 Comm: kworker/u8:2 Tainted: G           O      5.15.129-6.4.0+git.67c3153d20ff #1-TorizonCore
[   12.145399] Hardware name: iMX8M Plus on GSF Board (DT)
[   12.145403] Workqueue: events_unbound commit_work
[   12.145412] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   12.145418] pc : lcdifv3_set_mode+0x90/0x2f0
[   12.145423] lr : lcdifv3_set_mode+0x1bc/0x2f0
[   12.145428] sp : ffff80000a6cbc60
[   12.145430] x29: ffff80000a6cbc60 x28: 0000000000000000 x27: 0000000000000000
[   12.145439] x26: ffff80000a1d5280 x25: ffff0000c001c005 x24: ffff80000936b568
[   12.145448] x23: 0000000000000038 x22: ffff0000c4fd4580 x21: ffff80000a0654c0
[   12.145457] x20: ffff0000c4fd5f80 x19: ffff80000a6cbc98 x18: 0000000000016000
[   12.145466] x17: 0000000000000000 x16: 0000000000000000 x15: 0000003569ed534a
[   12.145474] x14: 0000000000000354 x13: 0000000000000001 x12: 0000000000000000
[   12.145483] x11: 000000003df582e0 x10: 0000000000000009 x9 : 000000003df582e0
[   12.145492] x8 : 0000000000000010 x7 : 0000000000000000 x6 : 00000000076181c9
[   12.145501] x5 : 00000000000000c0 x4 : 000000000100f100 x3 : 0000000000000000
[   12.145509] x2 : 0000000000000000 x1 : ffff80000ba30014 x0 : 0000000004380780
[   12.145519] Call trace:
[   12.145522]  lcdifv3_set_mode+0x90/0x2f0
[   12.145527]  lcdifv3_crtc_atomic_enable+0x88/0xdc
[   12.145538]  drm_atomic_helper_commit_modeset_enables+0x200/0x24c
[   12.145544]  lcdifv3_drm_atomic_commit_tail+0x30/0x70
[   12.145550]  commit_tail+0xa4/0x1b0
[   12.145555]  commit_work+0x14/0x20
[   12.145560]  process_one_work+0x1d4/0x4a0
[   12.145567]  worker_thread+0x13c/0x490
[   12.145572]  kthread+0x150/0x160
[   12.145579]  ret_from_fork+0x10/0x20
[   12.145587] ---[ end trace bc2a54e61e0360c6 ]---
[   12.145616] ------------[ cut here ]------------
[   12.145619] WARNING: CPU: 3 PID: 103 at lcdifv3_set_mode+0xb4/0x2f0
[   12.145627] Modules linked in: xt_nat xt_tcpudp xt_conntrack xt_MASQUERADE nf_conntrack_netlink nfnetlink xfrm_user iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c xt_addrtype iptable_filter ip_ta
bles x_tables br_netfilter bridge stp llc qmi_wwan cdc_wdm usbnet option usb_wwan overlay mwifiex_sdio mwifiex cfg80211 crct10dif_ce lm75 hci_uart btqca imx_sdma pinctrl_mcp23s08_i2c btbcm pinctrl_mcp23s08 ti_ads1015 btinte
l industrialio_triggered_buffer kfifo_buf industrialio fsl_jr_uio secvio uio_pdrv_genirq uio joydev egalax_i2c(O) libcomposite galcore(O) fuse lontium_lt8912b ti_sn65dsi83 sec_mipi_dsim_imx display_connector sec_dsim
[   12.145756] CPU: 3 PID: 103 Comm: kworker/u8:2 Tainted: G        W  O      5.15.129-6.4.0+git.67c3153d20ff #1-TorizonCore
[   12.145765] Hardware name: iMX8M Plus on GSF Board (DT)
[   12.145770] Workqueue: events_unbound commit_work
[   12.145779] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   12.145785] pc : lcdifv3_set_mode+0xb4/0x2f0
[   12.145790] lr : lcdifv3_set_mode+0x1bc/0x2f0
[   12.145795] sp : ffff80000a6cbc60
[   12.145797] x29: ffff80000a6cbc60 x28: 0000000000000000 x27: 0000000000000000
[   12.145806] x26: ffff80000a1d5280 x25: ffff0000c001c005 x24: ffff80000936b568
[   12.145815] x23: 0000000000000038 x22: ffff0000c4fd4580 x21: ffff80000a0654c0
[   12.145824] x20: ffff0000c4fd5f80 x19: ffff80000a6cbc98 x18: 0000000000016000
[   12.145833] x17: 0000000000000000 x16: 0000000000000000 x15: 0000003569ed534a
[   12.145841] x14: 0000000000000354 x13: 0000000000000001 x12: 0000000000000000
[   12.145850] x11: 000000003df582e0 x10: 0000000000000009 x9 : 000000003df582e0
[   12.145859] x8 : 0000000000000010 x7 : 0000000000000000 x6 : 00000000076181c9
[   12.145867] x5 : 00000000000000c0 x4 : 000000000100f100 x3 : 0000000000000000
[   12.145875] x2 : 0000000000000000 x1 : ffff80000ba30018 x0 : 0000000000000082
[   12.145887] Call trace:
[   12.145892]  lcdifv3_set_mode+0xb4/0x2f0
[   12.145903]  lcdifv3_crtc_atomic_enable+0x88/0xdc
[   12.145913]  drm_atomic_helper_commit_modeset_enables+0x200/0x24c
[   12.145919]  lcdifv3_drm_atomic_commit_tail+0x30/0x70
[   12.145926]  commit_tail+0xa4/0x1b0
[   12.145932]  commit_work+0x14/0x20
[   12.145936]  process_one_work+0x1d4/0x4a0
[   12.145943]  worker_thread+0x13c/0x490
[   12.145948]  kthread+0x150/0x160
[   12.145955]  ret_from_fork+0x10/0x20
[   12.145962] ---[ end trace bc2a54e61e0360c7 ]---

I hope we will be able to find a solution to my problem.

Best regards,
M

Greetings @unablesalt,

Looking at the stack trace from the logs, the trace is coming from the function lcdifv3_set_mode. This function can be found in this driver source code here: lcdifv3-common.c « lcdifv3 « imx « gpu « drivers - linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

This function is responsible for taking the timing values from the device tree and configuring them.

If you look through this function there are various calls to WARN_ON(). Basically when true WARN_ON() will produce a stack trace in the dmesg kernel logs. If you see what is being checked by WARN_ON(), you can see it triggers if any of the porch values or hsync-len/vysnc-len are 0. In the device tree snippet you shared of your panel_lvds node I can see you have various porch properties set to 0.

If I understand the driver code correctly then this would trigger the various WARN_ON() calls, which then would produce the stack traces you’re seeing here.

Best Regards,
Jeremias

2 Likes

Hello @jeremias.tx,

Sorry for the late reply, I checked the code that you linked and indeed that could be the problem.

I checked with the documentation of my display but I think that’s not possible to setup a value other than 0 for those variables.

Thank you for your help.

Best regards,
M

I checked with the documentation of my display but I think that’s not possible to setup a value other than 0 for those variables.

Well as I said they’re just being considered as warnings by the kernel. So if you can tolerate ignoring these warnings and there is no other issues then I guess it’s “okay”.

Glad I could help clarify.

Best Regards,
Jeremias

1 Like