A06 5.18: kernel warning on panel_cwd686

@m4xm4n I’m merging your Manjaro kernel 5.18.9 PKGBUILD files into my ALARM one and it builds and run fine.
One thing that pops out on dmesg, though:

[    1.194611] ------------[ cut here ]------------
[    1.194618] WARNING: CPU: 5 PID: 80 at drivers/gpu/drm/drm_mode_object.c:45 drm_mode_object_add+0x88/0x90 [drm]
[    1.194780] Modules linked in: ocp8178_bl panel_cwd686 rockchipdrm drm_cma_helper analogix_dp drm_dp_helper dw_hdmi cec rc_core dw_mipi_dsi drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm rtc_rk808
[    1.194840] CPU: 5 PID: 80 Comm: kworker/u12:2 Not tainted 5.18.9-1-ARCH-ARM #1
[    1.194850] Hardware name: Clockworkpi A06 (DT)
[    1.194856] Workqueue: events_unbound deferred_probe_work_func
[    1.194877] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    1.194886] pc : drm_mode_object_add+0x88/0x90 [drm]
[    1.195025] lr : drm_property_create+0xc8/0x1b0 [drm]
[    1.195161] sp : ffff80000a02b6d0
[    1.195165] x29: ffff80000a02b6d0 x28: ffff000005a89000 x27: 0000000000000037
[    1.195180] x26: 0000000000000000 x25: ffff800000feb050 x24: 0000000000000000
[    1.195194] x23: ffff800000f4f6f8 x22: 0000000000000004 x21: 00000000b0b0b0b0
[    1.195207] x20: ffff000005a1d890 x19: ffff000005a89000 x18: ffffffffffffffff
[    1.195220] x17: 0000000000000000 x16: 0000000000000000 x15: ffffffffffffffff
[    1.195232] x14: ffff000005a1db70 x13: ffff000005a1db54 x12: 0000000000000001
[    1.195245] x11: ffff8000097e9a30 x10: 0000000000000078 x9 : 0000000000000000
[    1.195258] x8 : ffff000005a1d780 x7 : 0000000000000000 x6 : 000000000000003f
[    1.195270] x5 : 0000000000000040 x4 : ffff80000a02b6f0 x3 : 0000000000000001
[    1.195282] x2 : 00000000b0b0b0b0 x1 : ffff000005a1d890 x0 : 0000000000000001
[    1.195296] Call trace:
[    1.195299]  drm_mode_object_add+0x88/0x90 [drm]
[    1.195437]  drm_property_create+0xc8/0x1b0 [drm]
[    1.195572]  drm_property_create_enum+0x2c/0x8c [drm]
[    1.195707]  drm_connector_set_panel_orientation+0x8c/0xb0 [drm]
[    1.195842]  cwd686_get_modes+0x5c/0x9c [panel_cwd686]
[    1.195855]  drm_panel_get_modes+0x28/0x44 [drm]
[    1.195994]  panel_bridge_connector_get_modes+0x18/0x24 [drm_kms_helper]
[    1.196060]  drm_helper_probe_single_connector_modes+0x19c/0x780 [drm_kms_helper]
[    1.196120]  drm_client_modeset_probe+0x1d8/0x5b0 [drm]
[    1.196259]  __drm_fb_helper_initial_config_and_unlock+0x34/0x150 [drm_kms_helper]
[    1.196320]  drm_fbdev_client_hotplug+0x14c/0x204 [drm_kms_helper]
[    1.196380]  drm_fbdev_generic_setup+0xb0/0x18c [drm_kms_helper]
[    1.196438]  rockchip_drm_bind.part.0+0x178/0x1a0 [rockchipdrm]
[    1.196470]  rockchip_drm_bind+0x38/0x84 [rockchipdrm]
[    1.196497]  try_to_bring_up_aggregate_device+0x94/0x150
[    1.196510]  __component_add+0xb8/0x1b4
[    1.196517]  component_add+0x14/0x20
[    1.196522]  dw_mipi_dsi_rockchip_host_attach+0x54/0x120 [rockchipdrm]
[    1.196550]  dw_mipi_dsi_host_attach+0x74/0xd0 [dw_mipi_dsi]
[    1.196563]  mipi_dsi_attach+0x2c/0x40
[    1.196572]  cwd686_probe+0xc4/0x150 [panel_cwd686]
[    1.196583]  mipi_dsi_drv_probe+0x24/0x30
[    1.196592]  really_probe+0x17c/0x3d0
[    1.196602]  __driver_probe_device+0x114/0x190
[    1.196612]  driver_probe_device+0x3c/0xf0
[    1.196621]  __device_attach_driver+0x98/0x130
[    1.196631]  bus_for_each_drv+0x78/0xd0
[    1.196640]  __device_attach+0x9c/0x1c0
[    1.196649]  device_initial_probe+0x14/0x20
[    1.196659]  bus_probe_device+0x9c/0xa4
[    1.196669]  deferred_probe_work_func+0xb8/0x110
[    1.196678]  process_one_work+0x1a4/0x300
[    1.196691]  worker_thread+0x6c/0x40c
[    1.196701]  kthread+0xe4/0xf0
[    1.196709]  ret_from_fork+0x10/0x20
[    1.196718] ---[ end trace 0000000000000000 ]---

It boots fine, displays fine… Just an early Warning when the module probes. Wondering if it also happens on Manjaro. Thanks!

Related:

https://lore.kernel.org/lkml/20210409045314.3420733-1-hsinyi@chromium.org/

yeah, it happens in Manjaro as well. It seems to be a bug in the DRM panel rotation/orientation API. There’s someone pushing a patch set for 5.20, I think, that will fix this, but will require implementing a new hook in the driver. I haven’t had time to look and see if it’s landed yet, but it would be nice if it landed before the next version of the cwd686 panel driver I try to send upstream

1 Like

Thanks for taking care of it. And before the merge window, do you think we can do something about the missing 5 lines? (see: A04 screen display vertical offset - #27 by yatli)

I spent a few days fiddling w/ things a month or two ago and couldn’t come up with anything that improved the situation much, but I will give your numbers a shot next time I’m working on the driver (hopefully soon :crossed_fingers:, I’m running out of time!)