This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: Kernel warning dump from the wave5 driver during boot

Part Number: AM62A7

Hello,

I am currently working on upgrading a custom AM62A-based board to the SDK 11.1 release. During boot testing, I experienced a rare warning error that I believe is related to the wave5 driver. A snippet of the issue can be seen below:

[  OK  ] Found device /dev/mmcblk0p1.
         Starting File System Check on /dev/mmcblk0p1...
[  OK  ] Started Simple Network Management Protocol (SNMP) Daemon..
[  OK  ] Found device /dev/fb0.
         Starting Start psplash boot splash screen...
[  OK  ] Stopped Virtual Console Setup.
[  OK  ] Started Start psplash boot splash screen.
[  OK  ] Started Start psplash-systemd progress communication helper.
         Starting Virtual Console Setup...
[    9.710311] ------------[ cut here ]------------
[    9.717473] WARNING: CPU: 2 PID: 748 at /kernel/kthread.c:1430 kthread_destroy_worker+0x84/0x98
[    9.726214] Modules linked in: rpmsg_ctrl rpmsg_char snd_soc_tlv320aic26 onboard_usb_dev crct10dif_ce snd_soc_simple_card snd_soc_simple_card_utils e5010_jpeg_enc v4l2_jpeg pwm_omap_dmtimer display_connector wave5(-) videobuf2_dma_contig v4l2_mem2mem videobuf2_v4l2 rtc_ti_k3 k3_j72xx_bandgap rti_wdt videobuf2_memops videobuf2_common ti_k3_dsp_remoteproc tidss overlay videodev ti_k3_common ti_k3_r5_remoteproc snd_soc_davinci_mcasp drm_dma_helper snd_soc_ti_udma mcrc64 snd_soc_ti_edma sa2ul mc snd_soc_ti_sdma drm_display_helper ti_tfp410 drm_kms_helper omap_hwspinlock ltc2945 spi_omap2_mcspi omap_mailbox pwm_tiehrpwm at24 cfg80211 bluetooth ecdh_generic ecc rfkill cryptodev(O) fuse drm drm_panel_orientation_quirks backlight ipv6
[    9.790760] CPU: 2 UID: 0 PID: 748 Comm: rmmod Tainted: G           O       6.12.43-g-g897da7ab5fc0 #1
[    9.790792] Tainted: [O]=OOT_MODULE
[    9.790795] Hardware name: Critical Link MitySOM-AM62A (DT)
[    9.790800] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    9.790808] pc : kthread_destroy_worker+0x84/0x98
[    9.790831] lr : kthread_destroy_worker+0x30/0x98
[    9.790838] sp : ffff8000833abc20
[    9.790842] x29: ffff8000833abc20 x28: ffff00000538a180 x27: 0000000000000000
[    9.790857] x26: 0000000000000000 x25: 0000000000000000 x24: 0000000000000000
[    9.790868] x23: ffff000000662490 x22: ffff000001b40c90 x21: ffff80007a1bc5e0
[    9.790879] x20: ffff000008538000 x19: ffff00000b275500 x18: 0000000000000000
[    9.790890] x17: ffff7ffffc606000 x16: ffff800081cd8000 x15: 0000000000000000
[    9.790901] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[    9.790912] x11: 00000000000000c0 x10: 0000000000000a10 x9 : ffff800080ed85a8
[    9.790923] x8 : ffff00000538abf0 x7 : 00000001f650a7e2 x6 : 0000000000000000
[    9.790934] x5 : 0000000000000003 x4 : ffff000008538028 x3 : 0000000000000000
[    9.790944] x2 : 0000000000000001 x1 : ffff000001fdc250 x0 : ffff00000b275508
[    9.790956] Call trace:
[    9.790960]  kthread_destroy_worker+0x84/0x98
[    9.790970]  wave5_vpu_remove+0xd0/0xe8 [wave5]
[    9.791003]  platform_remove+0x30/0x58
[    9.791016]  device_remove+0x54/0x90
[    9.791024]  device_release_driver_internal+0x1d4/0x238
[    9.791032]  driver_detach+0x54/0xa8
[    9.791040]  bus_remove_driver+0x74/0xd0
[    9.791047]  driver_unregister+0x38/0x70
[    9.791055]  platform_driver_unregister+0x1c/0x30
[    9.791064]  wave5_vpu_driver_exit+0x18/0x1358 [wave5]
[    9.791084]  __arm64_sys_delete_module+0x1c8/0x2b8
[    9.791094]  invoke_syscall+0x50/0x120
[    9.791105]  el0_svc_common.constprop.0+0xc8/0xf0
[    9.791115]  do_el0_svc+0x24/0x38
[    9.791123]  el0_svc+0x28/0x98
[    9.791134]  el0t_64_sync_handler+0x120/0x130
[    9.791143]  el0t_64_sync+0x190/0x198
[    9.791153] ---[ end trace 0000000000000000 ]---
[    9.820194] vdec 30210000.video-codec: Runtime PM usage count underflow!
[    9.908506] vdec 30210000.video-codec: error -ENXIO: IRQ index 0 not found
[   10.024628] vdec 30210000.video-codec: failed to get irq resource, falling back to polling
[  OK  ] Finished File System Check on /dev/[   10.034012] vdec 30210000.video-codec: OPP table not found in device tree
mmcblk0p1.
[   10.055246] vdec 30210000.video-codec: Added wave5 driver with caps: 'ENCODE' 'DECODE'
[   10.063438] vdec 30210000.video-codec: Product Code:      0x521c
[   10.069674] vdec 30210000.video-codec: Firmware Revision: 363254
         Mounting /run/media/mmcblk0p1...
         Starting Save/Restore Sound Card State...
         Starting File System Check on /dev/mmcblk1p1...

I believe this is an issue with the wave5 driver because of the given context of this dump occuring near where we modprobe the wave5 driver and because the wave5_vpu_remove() function in drivers/media/platform/chips-media/wave5/wave5-vpu.c calls kthread_destroy_worker(). The issue could be related to a race condition and this happening too soon; which it then tries to destroy something that was never fully created/initialized causing the warning dump to occur. I am also aware that the two messages outputted directly after the trace are not an error but a warning that hr timer polling is being used as AM62A has no interrupt routed (via this E2E).

Is there any insight into why this issue occurs and a possible solution?

  • Hi Jacob,

    And this occurs on every boot and are you unable to probe wave5 driver? Was this issue not seen in prior SDK versions on your custom board?

    Best Regards,

    Suren

  • Hello Suren,

    This was experienced on a single boot by my colleague. This wasn't experienced during previous SDK version tests. I can not confirm that they were unable to probe the wave5 driver, but looking at the output it seems rmmod wave5 and modprobe wave5 vpu_overlays=1 are called after the trace dump as the output of these commands match what is printed. The purpose of this post was to at least confirm as to why this happens and to make it known that it does.

    Thank you

  • Hi Jacob,

    Thanks for the update.  A request from TI is: If you ever encounter the issue again, please share us the exact steps you did to encounter the issue so we can replicate it on our end for further debugging. 

    Feel free to open a newer thread with details upon reproduction of the issue.

    I am going to close this thread for now. 

    Best Regards,

    Suren