DRM warning TorizonOS 6.6.1

Hello Toradex team,

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

Hardware:

uname:

  • Linux 0146230000 5.15.148-6.6.1+git.23a8e831749d #1-TorizonCore SMP PREEMPT Thu Feb 29 20:25:21 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Images tested:

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

Guest OS:

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

Issue:
I was testing the new version of TorizonOS (6.6.1) on my devices and I realize that there is an new error message related to DRM:

On 6.5.0:

[    1.259092] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[    1.259389] imx-drm display-subsystem: bound 32c00000.bus:ldb@32ec005c (ops imx8mp_ldb_ops)
[    1.260278] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 0
[    1.265892] imx-drm display-subsystem: [drm] fb0: imx-drmdrmfb frame buffer device

On 6.6.1:

[    1.271259] imx-drm display-subsystem: bound imx-lcdifv3-crtc.0 (ops lcdifv3_crtc_ops)
[    1.271744] imx-drm display-subsystem: bound 32c00000.bus:ldb@32ec005c (ops imx8mp_ldb_ops)
[    1.272652] [drm] Initialized imx-drm 1.0.0 20120507 for display-subsystem on minor 0
[    1.272736] ------------[ cut here ]------------
[    1.272740] WARNING: CPU: 0 PID: 103 at drm_mode_object_add+0x88/0x90
[    1.272755] Modules linked in:
[    1.272763] CPU: 0 PID: 103 Comm: kworker/u8:2 Not tainted 5.15.148-6.6.1+git.23a8e831749d #1-TorizonCore
[    1.272771] Hardware name: iMX8M Plus on GSF Board (DT)
[    1.272776] Workqueue: events_unbound deferred_probe_work_func
[    1.272789] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    1.272799] pc : drm_mode_object_add+0x88/0x90
[    1.272807] lr : drm_property_create+0xe0/0x1b0
[    1.272817] sp : ffff80000a6e3620
[    1.272820] x29: ffff80000a6e3620 x28: 0000000000000023 x27: ffff0000c4131968
[    1.272839] x26: 0000000000001000 x25: 0000000000000000 x24: ffff80000a075c70
[    1.272850] x23: ffff8000098223f0 x22: 0000000000000004 x21: 00000000b0b0b0b0
[    1.272866] x20: ffff0000c43b5a10 x19: ffff0000c4131800 x18: ffffffffffffffff
[    1.272882] x17: 6f206d6574737973 x16: 6275732d79616c70 x15: ffff0000c43b5970
[    1.272897] x14: ffffffffffffffff x13: ffff0000c43b5955 x12: 0000000000000000
[    1.272914] x11: 0000000000000000 x10: 0000000000000078 x9 : 0000000000000000
[    1.272927] x8 : ffff0000c43b5b00 x7 : 0000000000000000 x6 : 000000000000003f
[    1.272942] x5 : 0000000000000040 x4 : ffff80000a6e35e0 x3 : 0000000000000001
[    1.272957] x2 : 00000000b0b0b0b0 x1 : ffff0000c43b5a10 x0 : 0000000000000001
[    1.272974] Call trace:
[    1.272977]  drm_mode_object_add+0x88/0x90
[    1.272987]  drm_property_create+0xe0/0x1b0
[    1.272995]  drm_property_create_enum+0x2c/0x94
[    1.273008]  drm_connector_set_panel_orientation+0x98/0xc0
[    1.273017]  panel_lvds_get_modes+0x98/0xc4
[    1.273025]  drm_panel_get_modes+0x24/0x40
[    1.273035]  panel_bridge_connector_get_modes+0x18/0x24
[    1.273045]  drm_helper_probe_single_connector_modes+0x1b4/0x790
[    1.273054]  drm_client_modeset_probe+0x23c/0x10a0
[    1.273066]  __drm_fb_helper_initial_config_and_unlock+0x48/0x540
[    1.273078]  drm_fbdev_client_hotplug+0x148/0x230
[    1.273088]  drm_fbdev_generic_setup+0xb4/0x190
[    1.273097]  imx_drm_bind+0x1ac/0x210
[    1.273108]  try_to_bring_up_master+0x228/0x314
[    1.273116]  __component_add+0xa4/0x190
[    1.273123]  component_add+0x14/0x20
[    1.273133]  imx8mp_ldb_probe+0xd4/0xe4
[    1.273145]  platform_probe+0x68/0xe0
[    1.273153]  really_probe+0xbc/0x46c
[    1.273161]  __driver_probe_device+0x100/0x160
[    1.273172]  driver_probe_device+0x40/0x120
[    1.273181]  __device_attach_driver+0xbc/0x160
[    1.273192]  bus_for_each_drv+0x7c/0xdc
[    1.273203]  __device_attach+0xac/0x1f0
[    1.273213]  device_initial_probe+0x14/0x20
[    1.273220]  bus_probe_device+0x9c/0xa4
[    1.273229]  deferred_probe_work_func+0x94/0xe4
[    1.273240]  process_one_work+0x1d4/0x4a0
[    1.273249]  worker_thread+0x2c0/0x490
[    1.273260]  kthread+0x150/0x160
[    1.273271]  ret_from_fork+0x10/0x20
[    1.273282] ---[ end trace 0905504c7b6f2776 ]---
[    1.273314] ------------[ cut here ]------------
[    1.273317] WARNING: CPU: 0 PID: 103 at drm_object_attach_property+0x78/0xb0
[    1.273330] Modules linked in:
[    1.273335] CPU: 0 PID: 103 Comm: kworker/u8:2 Tainted: G        W         5.15.148-6.6.1+git.23a8e831749d #1-TorizonCore
[    1.273343] Hardware name: iMX8M Plus on GSF Board (DT)
[    1.273349] Workqueue: events_unbound deferred_probe_work_func
[    1.273359] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    1.273368] pc : drm_object_attach_property+0x78/0xb0
[    1.273378] lr : drm_connector_set_panel_orientation+0x5c/0xc0
[    1.273389] sp : ffff80000a6e36c0
[    1.273394] x29: ffff80000a6e36c0 x28: 0000000000000023 x27: ffff0000c4131968
[    1.273413] x26: 0000000000001000 x25: 0000000000000000 x24: ffff80000a075c70
[    1.273425] x23: 0000000000000000 x22: 0000000000000000 x21: ffff0000c4131800
[    1.273440] x20: ffff0000c0321c80 x19: ffff0000c4133170 x18: ffffffffffffffff
[    1.273454] x17: 6f206d6574737973 x16: 6275732d79616c70 x15: ffff0000c43b5970
[    1.273470] x14: ffffffffffffffff x13: ffff0000c43b5955 x12: 0000000000000000
[    1.273486] x11: 0000000000000000 x10: 0000000000000078 x9 : 0000000000000000
[    1.273501] x8 : ffff0000c43b5d00 x7 : 00000000c0c0c0c0 x6 : 00000000c0c0c0c0
[    1.273514] x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000006
[    1.273532] x2 : 0000000000000002 x1 : ffff0000c43b5a00 x0 : ffff0000c4133198
[    1.273545] Call trace:
[    1.273550]  drm_object_attach_property+0x78/0xb0
[    1.273560]  panel_lvds_get_modes+0x98/0xc4
[    1.273570]  drm_panel_get_modes+0x24/0x40
[    1.273581]  panel_bridge_connector_get_modes+0x18/0x24
[    1.273588]  drm_helper_probe_single_connector_modes+0x1b4/0x790
[    1.273595]  drm_client_modeset_probe+0x23c/0x10a0
[    1.273605]  __drm_fb_helper_initial_config_and_unlock+0x48/0x540
[    1.273617]  drm_fbdev_client_hotplug+0x148/0x230
[    1.273628]  drm_fbdev_generic_setup+0xb4/0x190
[    1.273639]  imx_drm_bind+0x1ac/0x210
[    1.273648]  try_to_bring_up_master+0x228/0x314
[    1.273658]  __component_add+0xa4/0x190
[    1.273669]  component_add+0x14/0x20
[    1.273678]  imx8mp_ldb_probe+0xd4/0xe4
[    1.273689]  platform_probe+0x68/0xe0
[    1.273696]  really_probe+0xbc/0x46c
[    1.273704]  __driver_probe_device+0x100/0x160
[    1.273713]  driver_probe_device+0x40/0x120
[    1.273724]  __device_attach_driver+0xbc/0x160
[    1.273733]  bus_for_each_drv+0x7c/0xdc
[    1.273742]  __device_attach+0xac/0x1f0
[    1.273752]  device_initial_probe+0x14/0x20
[    1.273763]  bus_probe_device+0x9c/0xa4
[    1.273772]  deferred_probe_work_func+0x94/0xe4
[    1.273782]  process_one_work+0x1d4/0x4a0
[    1.273789]  worker_thread+0x2c0/0x490
[    1.273796]  kthread+0x150/0x160
[    1.273804]  ret_from_fork+0x10/0x20
[    1.273814] ---[ end trace 0905504c7b6f2777 ]---
[    1.279000] imx-drm display-subsystem: [drm] fb0: imx-drmdrmfb frame buffer device

So I checked the code and it seems that one value is missing on the device tree. I check the git log for this specific commit and I can see any changes related to DRM.

I understand that’s not a big deal, just a warning, but I wonder what I can do in my dts to avoid those kind of message ?

Thanks in advance for your help.

Best regards,
M

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

The warning messages you’re encountering in the DRM (Direct Rendering Manager) subsystem on TorizonOS 6.6.1 with your Verdin iMX8M Plus module are related to the DRM core’s mode setting infrastructure. These warnings typically occur due to issues in the device tree configuration or the DRM driver’s handling of certain properties or objects.

Given the specific warnings about drm_mode_object_add and drm_object_attach_property, it seems there might be a discrepancy or an incomplete configuration related to the display setup in the device tree. The warnings suggest an issue with attaching properties to a DRM mode object, which could be due to missing or incorrectly specified properties for the display or its interfaces.

To address these warnings, you should:

  1. Review the Device Tree: Ensure that the device tree entries for your display subsystem (LCDIF, LDB, or any other display interface you’re using) are correctly defined. Pay special attention to the properties related to panel orientation, mode settings, and any custom properties that your display setup might require.

  2. Check for Missing Properties: The warning about drm_object_attach_property suggests that there might be an attempt to attach a property to a DRM object that hasn’t been properly initialized or defined. Make sure that all required properties for your display components are included in the device tree.

  3. Update and Compare Device Trees: If you have a working setup with a previous version of TorizonOS (like 6.5.0, where you didn’t see these warnings), compare the device tree files between the two versions. Look for any changes or missing entries related to the display subsystem.

  4. DRM Driver Review: Although you mentioned not seeing relevant changes in the git log, it might be helpful to review the DRM driver’s code for handling of properties and mode setting for your specific display setup. There could be changes in the DRM core or the i.MX-specific DRM driver that affect how properties are handled.

  5. Kernel Configuration: Ensure that your kernel configuration includes all necessary options for DRM and the specific display interfaces you’re using. Missing kernel configuration options could lead to incomplete initialization of the DRM subsystem.

  6. Debugging: Enable dynamic debug for DRM to get more detailed logs that might help pinpoint the issue. You can do this by adding drm.debug=0x1e log_buf_len=1M to the kernel command line. This will provide verbose DRM logs that could offer more insights into what’s causing the warnings.

Since these warnings

Please, also check if these links can help you solve your problem:

Embedded Linux Release Matrix | Toradex Developer Center.

Hello @unablesalt,

I don’t see the same warning using our LVDS display or an HDMI port.

Which display are you using in your product?
From your logs it seems you are using a custom device tree. Are there any display-related changes in it?
Also, are you using device tree overlays?

Best Regards,
Bruno

Hello @bruno.tx,

Thank you for your reply!

Yes I’m using a custom dts, based on the Verdin-WiFi. I added the LVDS display and other stuff related to the product. And I don’t have any overlays.

As the Bot suggested, I checked if the device tree from the Verdin changed with the new branch but nothing display related.

Here is my dts:
imx8mp-david.dts.txt (33.4 KB)

I haven’t change anything during the update from 6.5.0 to 6.6.1, that’s why I’m a bit confused…

Thank you for your help.

Best,
M

Hello @unablesalt,

Thanks for the clarification.

I think this warning may be caused by this commit: linux-toradex.git - Linux kernel for Apalis, Colibri and Verdin modules

It was intended to fix some issues related to hot-plug on HDMI, but maybe it is causing the warning on your setup.

Can you try to revert the changes of this commit and see if the warning is still present?
It only changes a device tree file, so TorizonCore Builder will be enough to do this.

Best Regards,
Bruno

1 Like

Hello again,

I checked the commit and it’s related to lcdif3, and it’s disabled on my dts, we are not using the HDMI.

I’ll try tomorrow, but not sure it’s related.

Thank you :sunny:

Best,
M

Hello @bruno.tx,

I just build a new image with your fix, but the issue remain. As I was expected we are not using the lcdif3.

$ git diff
diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
index ba73a1c47..82e57a9ef 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mp.dtsi
@@ -1968,7 +1968,6 @@ lcdif3: lcd-controller@32fc6000 {
                                interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
                                interrupt-parent = <&irqsteer_hdmi>;
                                resets = <&hdmi_blk_ctrl IMX8MP_HDMI_BLK_CTRL_LCDIF_RESET>;
-                               fsl,gpr = <&hdmi_blk_ctrl>;
                                power-domains = <&hdmimix_pd>;
                                status = "disabled";

What could cause the issue on my board ?

Best regards,
M

Hello @unablesalt,

Thanks for testing this.

I will look further into this issue to try to find a cause for the problem.

Once I have updates, I will send them on this thread.

Best Regards,
Bruno

1 Like

Hello @unablesalt,

I did some more investigation into this and I was able to get similar error messages when I set back-porch values at 0 in the device tree.
It is worth noting that the errors also occurred with Torizon Os 6.5.0, so this may not be the same problem as you have here.

From the device tree you sent, I see that both back-porch values are set to 0, do you know if this is really required for your display?

A possible solution would be to move some of the front-porch cycles to the back-porch, maintaining the overall frequency.
For example:

panel-timing {
	clock-frequency = <148500000>;
	hactive      = <1920>;
	hback-porch  = <65>;
	hfront-porch = <65>;
	hsync-len    = <10>;
	hsync-active = <0>;
	vactive      = <1080>;
	vback-porch  = <17>;
	vfront-porch = <18>;
	vsync-len    = <10>;
	vsync-active = <0>;
	de-active       = <1>;
	pixelclk-active = <1>;
};

Best Regards,
Bruno

1 Like

Hello @bruno.tx,

Thank you for your reply !

There are 2 errors messages:

  • lcdif3_mode: I open an issue a short time ago
  • drm_mode_object_add: the one we are trying to understand here.

I did manage to suppress the error for the lcdif3_mode with this change for panel-timing:

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

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

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

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

Those change doesn’t break the display timing and suppress the error for lcdif3_mode but for drm_mode_object_add is still present…

Did you see the error for drm_mode_object_add ? Or it’s just me ?

Thanks in advance for your help !

Best,
M

Hello @unablesalt,

That is good to know.
I don’t see the same drm_mode_object_add error.
The error I get is on lcdifv3_set_mode.

I will do some more investigation about this problem.
Once there are updates, I will send them on this thread.

Best Regards,
Bruno

Hello @unablesalt,

I was able to reproduce the drm_mode_object_add error message.
What causes it is the screen rotation (rotation = <270>;) under the panel_lvds node.

I also see this error on Torizon OS 6.5.0, so it is unclear why it only manifests in Torizon OS 6.6.1 for you.

This configuration is most likely needed, so removing it is not really an option.
Considering the screen is working as expected, it should be safe to ignore it for now.

I will report this error message to the R&D team, as it indicates there is an actual issue that may create problems with other use cases.

Best Regards,
Bruno

1 Like

Hello @bruno.tx,

Thank you for your investigation!

It’s not completely mandatory, but I would rather keep it for now… I’ll follow the bugs tracker on Toradex until a fix is propose.

Have a good day :sun_with_face:

Best Regards,
M

Hello @unablesalt,

We were able to reproduce the issue on the Linux BSP, therefore it is not unique to Torizon OS.
For this reason, the issue should be published on the Linux BSP Issue Tracker.

When it is published I will send an update here.

Best Regards,
Bruno

1 Like

Hello Bruno,

Thank you for your time and effort! It’s always a pleasure to work with Toradex :sunflower:

Best regards,
M

1 Like

Hello @unablesalt,

The issue relative to this problem has been published in the Issue Tracker: Toradex System/Computer on Modules - Linux BSP Release

Best Regards,
Bruno

1 Like