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: Issue with v4l2h264enc encoder

Part Number: AM62A7
Other Parts Discussed in Thread: TDA4VH-Q1

Tool/software:

Hi, 

Yocto SDK: 09.01.00

EVM: AM62A

We are using AM62A7 processor and camera sensor  attached to it. We are using below pipeline for streaming.

gst-launch-1.0 -e v4l2src device=/dev/video-rpi-cam0 io-mode=dmabuf-import !  video/x-bayer, width=1920, height=1200, format=grbg !  tiovxisp sink_0::device=/dev/v4l-rpi-subdev0 dcc-isp-file=/opt/imaging/ar0235/dcc_viss_1920x1200.bin  sink_0::dcc-2a-file=/opt/imaging/ar0235/dcc_2a_1920x1200.bin  format-msb=9 sink_0::ae-mode=2 !  video/x-raw, format=NV12, width=1920, height=1200 !  videorate ! video/x-raw,framerate=30/1 ! v4l2h264enc !  fakesink

With above pipeline, after 15 to 18 start/stop of pipeline, above pipeline stops working and need to restart the board. below is the error received when pipeline stops working.

[  148.184450] cma: cma_alloc: linux,cma: alloc failed, req-size: 512 pages, ret: -12
[  149.977269] sensor 2-0036: width - 1920, height - 1200
[  149.977283] sensor 2-0036: width - 1920, height - 5
[  150.221345] sensor 2-0036: CIT value = 1498
[  150.398954] cma: cma_alloc: linux,cma: alloc failed, req-size: 844 pages, ret: -12
[  150.418590] cma: cma_alloc: linux,cma: alloc failed, req-size: 512 pages, ret: -12
[  150.419149] cma: cma_alloc: linux,cma: alloc failed, req-size: 512 pages, ret: -12
[  150.419651] cma: cma_alloc: linux,cma: alloc failed, req-size: 512 pages, ret: -12
[  152.058800] sensor 2-0036: width - 1920, height - 1200
[  152.058814] sensor 2-0036: width - 1920, height - 5
[  152.302893] sensor 2-0036: CIT value = 1498
[  152.457040] cma: cma_alloc: linux,cma: alloc failed, req-size: 844 pages, ret: -12
[  152.457924] cma: cma_alloc: linux,cma: alloc failed, req-size: 844 pages, ret: -12
[  152.458776] cma: cma_alloc: linux,cma: alloc failed, req-size: 844 pages, ret: -12
[  152.484680] cma: cma_alloc: linux,cma: alloc failed, req-size: 512 pages, ret: -12
[  152.485239] cma: cma_alloc: linux,cma: alloc failed, req-size: 512 pages, ret: -12
[  154.103580] sensor 2-0036: width - 1920, height - 1200
[  154.103594] sensor 2-0036: width - 1920, height - 5
[  154.347703] sensor 2-0036: CIT value = 1498
[  154.482323] cma_alloc: 1 callbacks suppressed
[  154.482340] cma: cma_alloc: linux,cma: alloc failed, req-size: 2787 pages, ret: -12
[  154.482362] ------------[ cut here ]------------
[  154.482365] WARNING: CPU: 3 PID: 1102 at mm/page_alloc.c:5535 0xffff800008145a70
[  154.482373] Modules linked in: overlay cfg80211 rfkill xhci_plat_hcd cdns_csi2rx rpmsg_ctrl dwc3 rpmsg_char spidev crct10dif_ce phy_can_transceiver k3_j72xx_bandgap e5010_jpeg_enc rtc_ti_k3 dwc3_am62 ti_k3_r5_remoteproc ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns j721e_csi2rx ti_k3_common wave5 tidss videobuf2_dma_contig drm_dma_helper v4l2_mem2mem videobuf2_memops sa2ul drm_kms_helper syscopyarea sysfillrect videobuf2_v4l2 sysimgblt fb_sys_fops videobuf2_common cdns_dphy_rx sensor v4l2_fwnode v4l2_async m_can_platform tps6598x videodev m_can mc typec can_dev pwm_tiehrpwm spi_omap2_mcspi optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[  154.482492] CPU: 3 PID: 1102 Comm: tiovxisp0:src Tainted: G           O       6.1.46-rt13-gb871cdee8c #1
[  154.482499] Hardware name: Texas Instruments AM62A7 SK (DT)
[  154.482503] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  154.482510] pc : 0xffff800008145a70
[  154.482512] lr : 0xffff8000080a83c0
[  154.482514] sp : ffff00000361f410
[  154.482516] x29: ffff00000361f410 x28: ffff000005064000 x27: 0000000000130000
[  154.482525] x26: 000000000000000c x25: 00000000000004b0 x24: ffff8000080a7228
[  154.482533] x23: ffff0000001bbc10 x22: ffff00000361f648 x21: ffff0000001bbc10
[  154.482541] x20: 0000000000000cc0 x19: 0000000000000000 x18: ffffffffffffffff
[  154.482549] x17: 72202c7365676170 x16: 2037383732203a65 x15: 7a69732d71657220
[  154.482557] x14: 2c64656c69616620 x13: 32312d203a746572 x12: 202c736567617020
[  154.482564] x11: 37383732203a657a x10: 69732d716572202c x9 : ffff800008e8dbe0
[  154.482572] x8 : 0000000000000000 x7 : ffff800008ee8a10 x6 : 0000000000000000
[  154.482580] x5 : 0000000000000007 x4 : 0000000000000034 x3 : 0000000000000000
[  154.482588] x2 : 0000000000000000 x1 : 0000000000000001 x0 : ffff800008f8a000
[  154.482596] Call trace:
[  154.482599]  0xffff800008145a70
[  154.482602]  0xffff8000080a83c0
[  154.482604]  0xffff8000080a8574
[  154.482606]  0xffff8000080a7228
[  154.482608]  0xffff800000c2f49c
[  154.482610]  0xffff800000c2c128
[  154.482613]  0xffff800000c2eeb8
[  154.482615]  0xffff800000c34438
[  154.482617]  0xffff800000bbde98
[  154.482619]  0xffff800000bce258
[  154.482622]  0xffff800000c0b628
[  154.482624]  0xffff800000b716b0
[  154.482626]  0xffff800000b71880
[  154.482628]  0xffff800000b72774
[  154.482631]  0xffff800000b72ba4
[  154.482633]  0xffff800000b6b16c
[  154.482635]  0xffff80000818a290
[  154.482637]  0xffff80000801e29c
[  154.482640]  0xffff80000801e390
[  154.482642]  0xffff800008a34360
[  154.482644]  0xffff800008a35814
[  154.482646]  0xffff800008011488
[  154.482650] ---[ end trace 0000000000000000 ]---
[  154.751081] ------------[ cut here ]------------
[  154.751092] Trying to vfree() nonexistent vm area (00000000bdb56b0c)
[  154.751115] WARNING: CPU: 1 PID: 1096 at mm/vmalloc.c:2693 0xffff80000813e75c
[  154.751124] Modules linked in: overlay cfg80211 rfkill xhci_plat_hcd cdns_csi2rx rpmsg_ctrl dwc3 rpmsg_char spidev crct10dif_ce phy_can_transceiver k3_j72xx_bandgap e5010_jpeg_enc rtc_ti_k3 dwc3_am62 ti_k3_r5_remoteproc ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns j721e_csi2rx ti_k3_common wave5 tidss videobuf2_dma_contig drm_dma_helper v4l2_mem2mem videobuf2_memops sa2ul drm_kms_helper syscopyarea sysfillrect videobuf2_v4l2 sysimgblt fb_sys_fops videobuf2_common cdns_dphy_rx sensor v4l2_fwnode v4l2_async m_can_platform tps6598x videodev m_can mc typec can_dev pwm_tiehrpwm spi_omap2_mcspi optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[  154.751244] CPU: 1 PID: 1096 Comm: gst-launch-1.0 Tainted: G        W  O       6.1.46-rt13-gb871cdee8c #1
[  154.751251] Hardware name: Texas Instruments AM62A7 SK (DT)
[  154.751255] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  154.751263] pc : 0xffff80000813e75c
[  154.751265] lr : 0xffff80000813e75c
[  154.751267] sp : ffff0000051bbb00
[  154.751269] x29: ffff0000051bbb00 x28: ffff00000906c800 x27: 0000000000000000
[  154.751277] x26: 0000000045585401 x25: 0000000000000000 x24: 0000000000000000
[  154.751285] x23: 0000000090880000 x22: 0000000000000000 x21: ffff800008fcf018
[  154.751293] x20: 0000000000000000 x19: ffff800009581000 x18: ffffffffffffffff
[  154.751301] x17: 0000000000000000 x16: 0000000000000000 x15: ffff800008fb3ed4
[  154.751309] x14: 0000000000000001 x13: 2963306236356264 x12: 6230303030303030
[  154.751316] x11: 3028206165726120 x10: 6d7620746e657473 x9 : ffff800008e8dbe0
[  154.751324] x8 : ffff0000051bb930 x7 : ffff800008ee8e48 x6 : 0000000000000000
[  154.751332] x5 : ffff00003ff61a70 x4 : 0000000000000000 x3 : 0000000000000027
[  154.751339] x2 : 0000000100000000 x1 : 0000000000000000 x0 : 0000000000000204
[  154.751347] Call trace:
[  154.751350]  0xffff80000813e75c
[  154.751353]  0xffff80000813eb1c
[  154.751356]  0xffff8000080a8898
[  154.751358]  0xffff8000080a73c4
[  154.751360]  0xffff800000c2f640
[  154.751362]  0xffff800000c2ed4c
[  154.751364]  0xffff800000c35c80
[  154.751367]  0xffff800000c33f0c
[  154.751369]  0xffff800000b6b604
[  154.751371]  0xffff8000081748f0
[  154.751373]  0xffff800008174afc
[  154.751375]  0xffff800008057600
[  154.751377]  0xffff800008017e9c
[  154.751379]  0xffff800008a343bc
[  154.751382]  0xffff800008a35814
[  154.751384]  0xffff800008011488
[  154.751386] ---[ end trace 0000000000000000 ]---
[  154.751448] ------------[ cut here ]------------
[  154.751451] 72 pages are still in use!
[  154.751464] WARNING: CPU: 1 PID: 1096 at mm/page_alloc.c:9521 0xffff800008143ce8
[  154.751469] Modules linked in: overlay cfg80211 rfkill xhci_plat_hcd cdns_csi2rx rpmsg_ctrl dwc3 rpmsg_char spidev crct10dif_ce phy_can_transceiver k3_j72xx_bandgap e5010_jpeg_enc rtc_ti_k3 dwc3_am62 ti_k3_r5_remoteproc ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns j721e_csi2rx ti_k3_common wave5 tidss videobuf2_dma_contig drm_dma_helper v4l2_mem2mem videobuf2_memops sa2ul drm_kms_helper syscopyarea sysfillrect videobuf2_v4l2 sysimgblt fb_sys_fops videobuf2_common cdns_dphy_rx sensor v4l2_fwnode v4l2_async m_can_platform tps6598x videodev m_can mc typec can_dev pwm_tiehrpwm spi_omap2_mcspi optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[  154.751564] CPU: 1 PID: 1096 Comm: gst-launch-1.0 Tainted: G        W  O       6.1.46-rt13-gb871cdee8c #1
[  154.751570] Hardware name: Texas Instruments AM62A7 SK (DT)
[  154.751573] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  154.751579] pc : 0xffff800008143ce8
[  154.751581] lr : 0xffff800008143ce8
[  154.751583] sp : ffff0000051bbac0
[  154.751585] x29: ffff0000051bbac0 x28: ffff00000906c800 x27: 0000000000000000
[  154.751593] x26: 0000000045585401 x25: 0000000000000000 x24: 0000000000000000
[  154.751601] x23: ffff800008c38890 x22: fffffc0000000000 x21: 00000000000908c8
[  154.751610] x20: 0000000000000048 x19: 00000000000908c8 x18: ffffffffffffffff
[  154.751617] x17: 0000000000000000 x16: 0000000000000000 x15: ffff800008fb48ec
[  154.751625] x14: ffffffffffffffff x13: 0a21657375206e69 x12: 206c6c6974732065
[  154.751633] x11: 656820747563205b x10: fffffffffffe0000 x9 : ffff800008e8dbe0
[  154.751641] x8 : ffff0000051bb8f0 x7 : ffff800008ee91d8 x6 : 0000000000000000
[  154.751649] x5 : ffff00003ff61a70 x4 : 0000000000000000 x3 : 0000000000000027
[  154.751656] x2 : 0000000100000000 x1 : 0000000000000000 x0 : 0000000000000204
[  154.751664] Call trace:
[  154.751666]  0xffff800008143ce8
[  154.751669]  0xffff80000816cb38
[  154.751671]  0xffff8000080a9a68
[  154.751673]  0xffff8000080a8854
[  154.751675]  0xffff8000080a73c4
[  154.751678]  0xffff800000c2f640
[  154.751680]  0xffff800000c2ed4c
[  154.751682]  0xffff800000c35c80
[  154.751684]  0xffff800000c33f0c
[  154.751686]  0xffff800000b6b604
[  154.751688]  0xffff8000081748f0
[  154.751690]  0xffff800008174afc
[  154.751692]  0xffff800008057600
[  154.751694]  0xffff800008017e9c
[  154.751697]  0xffff800008a343bc
[  154.751699]  0xffff800008a35814
[  154.751701]  0xffff800008011488
[  154.751703] ---[ end trace 0000000000000000 ]---
[  154.751742] ------------[ cut here ]------------
[  154.751745] Trying to vfree() nonexistent vm area (00000000f78e4023)
[  154.751760] WARNING: CPU: 1 PID: 1096 at mm/vmalloc.c:2693 0xffff80000813e75c
[  154.751765] Modules linked in: overlay cfg80211 rfkill xhci_plat_hcd cdns_csi2rx rpmsg_ctrl dwc3 rpmsg_char spidev crct10dif_ce phy_can_transceiver k3_j72xx_bandgap e5010_jpeg_enc rtc_ti_k3 dwc3_am62 ti_k3_r5_remoteproc ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns j721e_csi2rx ti_k3_common wave5 tidss videobuf2_dma_contig drm_dma_helper v4l2_mem2mem videobuf2_memops sa2ul drm_kms_helper syscopyarea sysfillrect videobuf2_v4l2 sysimgblt fb_sys_fops videobuf2_common cdns_dphy_rx sensor v4l2_fwnode v4l2_async m_can_platform tps6598x videodev m_can mc typec can_dev pwm_tiehrpwm spi_omap2_mcspi optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[  154.751859] CPU: 1 PID: 1096 Comm: gst-launch-1.0 Tainted: G        W  O       6.1.46-rt13-gb871cdee8c #1
[  154.751865] Hardware name: Texas Instruments AM62A7 SK (DT)
[  154.751868] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  154.751874] pc : 0xffff80000813e75c
[  154.751876] lr : 0xffff80000813e75c
[  154.751878] sp : ffff0000051bbb00
[  154.751880] x29: ffff0000051bbb00 x28: ffff00000906c800 x27: 0000000000000000
[  154.751888] x26: 0000000045585401 x25: 0000000000000000 x24: 0000000000000000
[  154.751896] x23: 0000000090180000 x22: 0000000000000000 x21: ffff800008fcf018
[  154.751903] x20: 0000000000000000 x19: ffff800009423000 x18: ffffffffffffffff
[  154.751911] x17: 0000000000000000 x16: 0000000000000000 x15: ffff800008fb5344
[  154.751918] x14: 0000000000000001 x13: 2933323034653837 x12: 6630303030303030
[  154.751926] x11: 3028206165726120 x10: 6d7620746e657473 x9 : ffff800008e8dbe0
[  154.751934] x8 : ffff0000051bb930 x7 : ffff800008ee9580 x6 : 0000000000000000
[  154.751942] x5 : ffff00003ff61a70 x4 : 0000000000000000 x3 : 0000000000000027
[  154.751949] x2 : 0000000100000000 x1 : 0000000000000000 x0 : 0000000000000204
[  154.751957] Call trace:
[  154.751958]  0xffff80000813e75c
[  154.751961]  0xffff80000813eb1c
[  154.751963]  0xffff8000080a8898
[  154.751965]  0xffff8000080a73c4
[  154.751967]  0xffff800000c2f640
[  154.751970]  0xffff800000c2ed3c
[  154.751972]  0xffff800000c35c80
[  154.751974]  0xffff800000c33f0c
[  154.751976]  0xffff800000b6b604
[  154.751978]  0xffff8000081748f0
[  154.751980]  0xffff800008174afc
[  154.751982]  0xffff800008057600
[  154.751984]  0xffff800008017e9c
[  154.751987]  0xffff800008a343bc
[  154.751989]  0xffff800008a35814
[  154.751991]  0xffff800008011488
[  154.751994] ---[ end trace 0000000000000000 ]---
[  154.752000] ------------[ cut here ]------------
[  154.752002] 37 pages are still in use!
[  154.752035] WARNING: CPU: 1 PID: 1096 at mm/page_alloc.c:9521 0xffff800008143ce8
[  154.752041] Modules linked in: overlay cfg80211 rfkill xhci_plat_hcd cdns_csi2rx rpmsg_ctrl dwc3 rpmsg_char spidev crct10dif_ce phy_can_transceiver k3_j72xx_bandgap e5010_jpeg_enc rtc_ti_k3 dwc3_am62 ti_k3_r5_remoteproc ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns j721e_csi2rx ti_k3_common wave5 tidss videobuf2_dma_contig drm_dma_helper v4l2_mem2mem videobuf2_memops sa2ul drm_kms_helper syscopyarea sysfillrect videobuf2_v4l2 sysimgblt fb_sys_fops videobuf2_common cdns_dphy_rx sensor v4l2_fwnode v4l2_async m_can_platform tps6598x videodev m_can mc typec can_dev pwm_tiehrpwm spi_omap2_mcspi optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[  154.752135] CPU: 1 PID: 1096 Comm: gst-launch-1.0 Tainted: G        W  O       6.1.46-rt13-gb871cdee8c #1
[  154.752141] Hardware name: Texas Instruments AM62A7 SK (DT)
[  154.752143] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  154.752149] pc : 0xffff800008143ce8
[  154.752152] lr : 0xffff800008143ce8
[  154.752154] sp : ffff0000051bbac0
[  154.752156] x29: ffff0000051bbac0 x28: ffff00000906c800 x27: 0000000000000000
[  154.752164] x26: 0000000045585401 x25: 0000000000000000 x24: 0000000000000000
[  154.752171] x23: ffff800008c38890 x22: fffffc0000000000 x21: 00000000000901a5
[  154.752179] x20: 0000000000000025 x19: 00000000000901a5 x18: ffffffffffffffff
[  154.752187] x17: 0000000000000000 x16: 0000000000000000 x15: 000000000000001b
[  154.752195] x14: 000000000000000f x13: 0000000000000001 x12: 0000000000000001
[  154.752202] x11: 0000000000000000 x10: 0000000000000900 x9 : ffff0000051bb980
[  154.752210] x8 : ffff00000906d160 x7 : ffff00003ff6b0c0 x6 : 0000000000000000
[  154.752217] x5 : 0000000000000000 x4 : 0000000000000204 x3 : ffff00000511c060
[  154.752225] x2 : 0000000000000000 x1 : 0000000000000204 x0 : 0000000000000204
[  154.752233] Call trace:
[  154.752235]  0xffff800008143ce8
[  154.752237]  0xffff80000816cb38
[  154.752239]  0xffff8000080a9a68
[  154.752241]  0xffff8000080a8854
[  154.752243]  0xffff8000080a73c4
[  154.752245]  0xffff800000c2f640
[  154.752247]  0xffff800000c2ed3c
[  154.752250]  0xffff800000c35c80
[  154.752252]  0xffff800000c33f0c
[  154.752255]  0xffff800000b6b604
[  154.752257]  0xffff8000081748f0
[  154.752259]  0xffff800008174afc
[  154.752261]  0xffff800008057600
[  154.752263]  0xffff800008017e9c
[  154.752265]  0xffff800008a343bc
[  154.752267]  0xffff800008a35814
[  154.752269]  0xffff800008011488
[  154.752272] ---[ end trace 0000000000000000 ]---
[  154.752325] ------------[ cut here ]------------
[  154.752328] Trying to vfree() nonexistent vm area (00000000218d3bcf)
[  154.752341] WARNING: CPU: 1 PID: 1096 at mm/vmalloc.c:2693 0xffff80000813e75c
[  154.752347] Modules linked in: overlay cfg80211 rfkill xhci_plat_hcd cdns_csi2rx rpmsg_ctrl dwc3 rpmsg_char spidev crct10dif_ce phy_can_transceiver k3_j72xx_bandgap e5010_jpeg_enc rtc_ti_k3 dwc3_am62 ti_k3_r5_remoteproc ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns j721e_csi2rx ti_k3_common wave5 tidss videobuf2_dma_contig drm_dma_helper v4l2_mem2mem videobuf2_memops sa2ul drm_kms_helper syscopyarea sysfillrect videobuf2_v4l2 sysimgblt fb_sys_fops videobuf2_common cdns_dphy_rx sensor v4l2_fwnode v4l2_async m_can_platform tps6598x videodev m_can mc typec can_dev pwm_tiehrpwm spi_omap2_mcspi optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[  154.752439] CPU: 1 PID: 1096 Comm: gst-launch-1.0 Tainted: G        W  O       6.1.46-rt13-gb871cdee8c #1
[  154.752445] Hardware name: Texas Instruments AM62A7 SK (DT)
[  154.752447] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  154.752453] pc : 0xffff80000813e75c
[  154.752455] lr : 0xffff80000813e75c
[  154.752457] sp : ffff0000051bbb00
[  154.752459] x29: ffff0000051bbb00 x28: ffff00000906c800 x27: 0000000000000000
[  154.752467] x26: 0000000045585401 x25: 0000000000000000 x24: 0000000000000000
[  154.752475] x23: 00000000901c0000 x22: 0000000000000000 x21: ffff800008fcf018
[  154.752483] x20: 0000000000000000 x19: ffff8000094c4000 x18: ffffffffffffffff
[  154.752490] x17: 0000000000000000 x16: 0000000000000000 x15: ffff800008fb67b4
[  154.752498] x14: 0000000000000001 x13: 2966636233643831 x12: 3230303030303030
[  154.752506] x11: 3028206165726120 x10: 6d7620746e657473 x9 : ffff800008e8dbe0
[  154.752513] x8 : ffff0000051bb930 x7 : ffff800008ee9cb8 x6 : 0000000000000000
[  154.752521] x5 : ffff00003ff61a70 x4 : 0000000000000000 x3 : 0000000000000027
[  154.752528] x2 : 0000000100000000 x1 : 0000000000000000 x0 : 0000000000000204
[  154.752536] Call trace:
[  154.752538]  0xffff80000813e75c
[  154.752540]  0xffff80000813eb1c
[  154.752542]  0xffff8000080a8898
[  154.752545]  0xffff8000080a73c4
[  154.752547]  0xffff800000c2f640
[  154.752549]  0xffff800000c2ed2c
[  154.752551]  0xffff800000c35c80
[  154.752553]  0xffff800000c33f0c
[  154.752555]  0xffff800000b6b604
[  154.752557]  0xffff8000081748f0
[  154.752560]  0xffff800008174afc
[  154.752562]  0xffff800008057600
[  154.752564]  0xffff800008017e9c
[  154.752566]  0xffff800008a343bc
[  154.752568]  0xffff800008a35814
[  154.752570]  0xffff800008011488
[  154.752573] ---[ end trace 0000000000000000 ]---
[  154.752579] ------------[ cut here ]------------
[  154.752581] 39 pages are still in use!
[  154.752603] WARNING: CPU: 1 PID: 1096 at mm/page_alloc.c:9521 0xffff800008143ce8
[  154.752608] Modules linked in: overlay cfg80211 rfkill xhci_plat_hcd cdns_csi2rx rpmsg_ctrl dwc3 rpmsg_char spidev crct10dif_ce phy_can_transceiver k3_j72xx_bandgap e5010_jpeg_enc rtc_ti_k3 dwc3_am62 ti_k3_r5_remoteproc ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns j721e_csi2rx ti_k3_common wave5 tidss videobuf2_dma_contig drm_dma_helper v4l2_mem2mem videobuf2_memops sa2ul drm_kms_helper syscopyarea sysfillrect videobuf2_v4l2 sysimgblt fb_sys_fops videobuf2_common cdns_dphy_rx sensor v4l2_fwnode v4l2_async m_can_platform tps6598x videodev m_can mc typec can_dev pwm_tiehrpwm spi_omap2_mcspi optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[  154.752699] CPU: 1 PID: 1096 Comm: gst-launch-1.0 Tainted: G        W  O       6.1.46-rt13-gb871cdee8c #1
[  154.752705] Hardware name: Texas Instruments AM62A7 SK (DT)
[  154.752707] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  154.752713] pc : 0xffff800008143ce8
[  154.752715] lr : 0xffff800008143ce8
[  154.752717] sp : ffff0000051bbac0
[  154.752719] x29: ffff0000051bbac0 x28: ffff00000906c800 x27: 0000000000000000
[  154.752728] x26: 0000000045585401 x25: 0000000000000000 x24: 0000000000000000
[  154.752735] x23: ffff800008c38890 x22: fffffc0000000000 x21: 00000000000901e7
[  154.752743] x20: 0000000000000027 x19: 00000000000901e7 x18: ffffffffffffffff
[  154.752751] x17: 0000000000000000 x16: 0000000000000000 x15: 000000000000024c
[  154.752759] x14: 000000000000000a x13: 0000000000000001 x12: 0000000000000001
[  154.752766] x11: 0000000000000000 x10: 0000000000000900 x9 : ffff0000051bb980
[  154.752774] x8 : ffff00000906d160 x7 : ffff00003ff6b0c0 x6 : 0000000000000000
[  154.752781] x5 : 0000000000000000 x4 : 0000000000000204 x3 : ffff00000511c060
[  154.752789] x2 : 0000000000000000 x1 : 0000000000000204 x0 : 0000000000000204
[  154.752796] Call trace:
[  154.752798]  0xffff800008143ce8
[  154.752800]  0xffff80000816cb38
[  154.752803]  0xffff8000080a9a68
[  154.752805]  0xffff8000080a8854
[  154.752807]  0xffff8000080a73c4
[  154.752809]  0xffff800000c2f640
[  154.752811]  0xffff800000c2ed2c
[  154.752813]  0xffff800000c35c80
[  154.752815]  0xffff800000c33f0c
[  154.752817]  0xffff800000b6b604
[  154.752820]  0xffff8000081748f0
[  154.752822]  0xffff800008174afc
[  154.752824]  0xffff800008057600
[  154.752826]  0xffff800008017e9c
[  154.752828]  0xffff800008a343bc
[  154.752830]  0xffff800008a35814
[  154.752832]  0xffff800008011488
[  154.752834] ---[ end trace 0000000000000000 ]---
[  154.752890] ------------[ cut here ]------------
[  154.752892] Trying to vfree() nonexistent vm area (00000000d4b214b9)
[  154.752903] WARNING: CPU: 1 PID: 1096 at mm/vmalloc.c:2693 0xffff80000813e75c
[  154.752908] Modules linked in: overlay cfg80211 rfkill xhci_plat_hcd cdns_csi2rx rpmsg_ctrl dwc3 rpmsg_char spidev crct10dif_ce phy_can_transceiver k3_j72xx_bandgap e5010_jpeg_enc rtc_ti_k3 dwc3_am62 ti_k3_r5_remoteproc ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns j721e_csi2rx ti_k3_common wave5 tidss videobuf2_dma_contig drm_dma_helper v4l2_mem2mem videobuf2_memops sa2ul drm_kms_helper syscopyarea sysfillrect videobuf2_v4l2 sysimgblt fb_sys_fops videobuf2_common cdns_dphy_rx sensor v4l2_fwnode v4l2_async m_can_platform tps6598x videodev m_can mc typec can_dev pwm_tiehrpwm spi_omap2_mcspi optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[  154.752998] CPU: 1 PID: 1096 Comm: gst-launch-1.0 Tainted: G        W  O       6.1.46-rt13-gb871cdee8c #1
[  154.753004] Hardware name: Texas Instruments AM62A7 SK (DT)
[  154.753007] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  154.753013] pc : 0xffff80000813e75c
[  154.753015] lr : 0xffff80000813e75c
[  154.753017] sp : ffff0000051bbb00
[  154.753019] x29: ffff0000051bbb00 x28: ffff00000906c800 x27: 0000000000000000
[  154.753027] x26: 0000000045585401 x25: 0000000000000000 x24: 0000000000000000
[  154.753035] x23: 0000000090860000 x22: 0000000000000000 x21: ffff800008fcf018
[  154.753042] x20: 0000000000000000 x19: ffff8000093b9000 x18: ffffffffffffffff
[  154.753050] x17: 0000000000000000 x16: 0000000000000000 x15: ffff800008fb7c24
[  154.753058] x14: 0000000000000001 x13: 2939623431326234 x12: 6430303030303030
[  154.753066] x11: 3028206165726120 x10: 6d7620746e657473 x9 : ffff800008e8dbe0
[  154.753074] x8 : ffff0000051bb930 x7 : ffff800008eea3f0 x6 : 0000000000000000
[  154.753081] x5 : ffff00003ff61a70 x4 : 0000000000000000 x3 : 0000000000000027
[  154.753089] x2 : 0000000100000000 x1 : 0000000000000000 x0 : 0000000000000204
[  154.753096] Call trace:
[  154.753098]  0xffff80000813e75c
[  154.753100]  0xffff80000813eb1c
[  154.753102]  0xffff8000080a8898
[  154.753105]  0xffff8000080a73c4
[  154.753107]  0xffff800000c2f640
[  154.753109]  0xffff800000c2ed1c
[  154.753111]  0xffff800000c35c80
[  154.753113]  0xffff800000c33f0c
[  154.753116]  0xffff800000b6b604
[  154.753118]  0xffff8000081748f0
[  154.753120]  0xffff800008174afc
[  154.753122]  0xffff800008057600
[  154.753124]  0xffff800008017e9c
[  154.753126]  0xffff800008a343bc
[  154.753128]  0xffff800008a35814
[  154.753131]  0xffff800008011488
[  154.753133] ---[ end trace 0000000000000000 ]---
[  154.753138] ------------[ cut here ]------------
[  154.753140] 20 pages are still in use!
[  154.753167] WARNING: CPU: 1 PID: 1096 at mm/page_alloc.c:9521 0xffff800008143ce8
[  154.753173] Modules linked in: overlay cfg80211 rfkill xhci_plat_hcd cdns_csi2rx rpmsg_ctrl dwc3 rpmsg_char spidev crct10dif_ce phy_can_transceiver k3_j72xx_bandgap e5010_jpeg_enc rtc_ti_k3 dwc3_am62 ti_k3_r5_remoteproc ti_k3_dsp_remoteproc virtio_rpmsg_bus rpmsg_ns j721e_csi2rx ti_k3_common wave5 tidss videobuf2_dma_contig drm_dma_helper v4l2_mem2mem videobuf2_memops sa2ul drm_kms_helper syscopyarea sysfillrect videobuf2_v4l2 sysimgblt fb_sys_fops videobuf2_common cdns_dphy_rx sensor v4l2_fwnode v4l2_async m_can_platform tps6598x videodev m_can mc typec can_dev pwm_tiehrpwm spi_omap2_mcspi optee_rng rng_core cryptodev(O) fuse drm drm_panel_orientation_quirks ipv6
[  154.753264] CPU: 1 PID: 1096 Comm: gst-launch-1.0 Tainted: G        W  O       6.1.46-rt13-gb871cdee8c #1
[  154.753270] Hardware name: Texas Instruments AM62A7 SK (DT)
[  154.753272] pstate: 40000005 (nZcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  154.753278] pc : 0xffff800008143ce8
[  154.753280] lr : 0xffff800008143ce8
[  154.753282] sp : ffff0000051bbac0
[  154.753284] x29: ffff0000051bbac0 x28: ffff00000906c800 x27: 0000000000000000
[  154.753293] x26: 0000000045585401 x25: 0000000000000000 x24: 0000000000000000
[  154.753300] x23: ffff800008c38890 x22: fffffc0000000000 x21: 0000000000090874
[  154.753314] x20: 0000000000000014 x19: 0000000000090874 x18: ffffffffffffffff
[  154.753322] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000072
[  154.753330] x14: 000000000000000f x13: 0000000000000001 x12: 0000000000000001
[  154.753337] x11: 0000000000000000 x10: 0000000000000900 x9 : ffff0000051bb980
[  154.753345] x8 : ffff00000906d160 x7 : ffff00003ff6b0c0 x6 : 0000000000000000
[  154.753353] x5 : 0000000000000000 x4 : 0000000000000204 x3 : ffff00000511c060
[  154.753360] x2 : 0000000000000000 x1 : 0000000000000204 x0 : 0000000000000204
[  154.753368] Call trace:
[  154.753369]  0xffff800008143ce8
[  154.753372]  0xffff80000816cb38
[  154.753374]  0xffff8000080a9a68
[  154.753376]  0xffff8000080a8854
[  154.753378]  0xffff8000080a73c4
[  154.753381]  0xffff800000c2f640
[  154.753383]  0xffff800000c2ed1c
[  154.753385]  0xffff800000c35c80
[  154.753387]  0xffff800000c33f0c
[  154.753389]  0xffff800000b6b604
[  154.753391]  0xffff8000081748f0
[  154.753394]  0xffff800008174afc
[  154.753396]  0xffff800008057600
[  154.753398]  0xffff800008017e9c
[  154.753400]  0xffff800008a343bc
[  154.753402]  0xffff800008a35814
[  154.753404]  0xffff800008011488
[  154.753407] ---[ end trace 0000000000000000 ]---

Looks like, processor don't have enough CMA memory after few start/stop of pipeline when using v4l2h264enc encoder. 

We are using v4l2jpegenc encoder but didn't face this issue.

Please let us know how can we solve this issue.

Regards,

Jay

  • Hi Jay,

    How are you stopping and restarting the pipeline? Abruptly stopping or by sending EoS and restarting the pipeline?

    Best Regards,

    Suren

  • Hi Suren,

    We are using the "-e" option. So, it sends EOS signal to all elements. So, resources can be freed properly. But we are seeing the same issue with EOS signal as well.

    Regards,

    Jay

  • Hi Suren,

    When we run the pipeline with H264 encoder, we see that CMA memory is leaking every time we run pipeline. Below is the CAM memory logs.

    root@am62axx-evm:~# watch -n 2 cat /proc/meminfo | grep Cma
    CmaTotal:         153600 kB
    CmaFree:          149412 kB
    CmaTotal:         153600 kB
    CmaFree:          149412 kB
    CmaTotal:         153600 kB
    CmaFree:          149412 kB
    CmaTotal:         153600 kB
    CmaFree:          149412 kB
    CmaTotal:         153600 kB
    CmaFree:          149412 kB
    CmaTotal:         153600 kB
    CmaFree:          149412 kB
    CmaTotal:         153600 kB
    CmaFree:          149412 kB
    CmaTotal:         153600 kB
    CmaFree:          149412 kB
    CmaTotal:         153600 kB
    CmaFree:          108800 kB
    CmaTotal:         153600 kB
    CmaFree:          108800 kB
    CmaTotal:         153600 kB
    CmaFree:          108800 kB
    CmaTotal:         153600 kB
    CmaFree:          108800 kB
    CmaTotal:         153600 kB
    CmaFree:          108800 kB
    CmaTotal:         153600 kB
    CmaFree:          101960 kB
    CmaTotal:         153600 kB
    CmaFree:          101960 kB
    CmaTotal:         153600 kB
    CmaFree:          101960 kB
    CmaTotal:         153600 kB
    CmaFree:          101960 kB
    CmaTotal:         153600 kB
    CmaFree:          101960 kB
    CmaTotal:         153600 kB
    CmaFree:           95040 kB
    CmaTotal:         153600 kB
    CmaFree:           95040 kB
    CmaTotal:         153600 kB
    CmaFree:           95092 kB
    CmaTotal:         153600 kB
    CmaFree:           95092 kB
    CmaTotal:         153600 kB
    CmaFree:           95092 kB
    CmaTotal:         153600 kB
    CmaFree:           87920 kB
    CmaTotal:         153600 kB
    CmaFree:           87920 kB
    CmaTotal:         153600 kB
    CmaFree:           87948 kB
    CmaTotal:         153600 kB
    CmaFree:           87948 kB
    CmaTotal:         153600 kB
    CmaFree:           87948 kB
    CmaTotal:         153600 kB
    CmaFree:          121296 kB
    CmaTotal:         153600 kB
    CmaFree:           80812 kB
    CmaTotal:         153600 kB
    CmaFree:           80812 kB
    CmaTotal:         153600 kB
    CmaFree:           80812 kB
    CmaTotal:         153600 kB
    CmaFree:           80812 kB
    CmaTotal:         153600 kB
    CmaFree:          114484 kB
    CmaTotal:         153600 kB
    CmaFree:           74248 kB
    CmaTotal:         153600 kB
    CmaFree:           74360 kB
    CmaTotal:         153600 kB
    CmaFree:           74360 kB
    CmaTotal:         153600 kB
    CmaFree:           74360 kB
    CmaTotal:         153600 kB
    CmaFree:           95860 kB
    CmaTotal:         153600 kB
    CmaFree:           67564 kB
    CmaTotal:         153600 kB
    CmaFree:           67564 kB
    CmaTotal:         153600 kB
    CmaFree:           67748 kB
    CmaTotal:         153600 kB
    CmaFree:           67748 kB
    CmaTotal:         153600 kB
    CmaFree:           67748 kB
    CmaTotal:         153600 kB
    CmaFree:           60908 kB
    CmaTotal:         153600 kB
    CmaFree:           60908 kB
    CmaTotal:         153600 kB
    CmaFree:           60920 kB
    CmaTotal:         153600 kB
    CmaFree:           60920 kB
    CmaTotal:         153600 kB
    CmaFree:           60920 kB
    CmaTotal:         153600 kB
    CmaFree:           54080 kB
    CmaTotal:         153600 kB
    CmaFree:           54080 kB
    CmaTotal:         153600 kB
    CmaFree:           54080 kB
    CmaTotal:         153600 kB
    CmaFree:           54080 kB
    CmaTotal:         153600 kB
    CmaFree:           54080 kB
    CmaTotal:         153600 kB
    CmaFree:           47236 kB
    CmaTotal:         153600 kB
    CmaFree:           47236 kB
    CmaTotal:         153600 kB
    CmaFree:           47240 kB
    CmaTotal:         153600 kB
    CmaFree:           47240 kB
    CmaTotal:         153600 kB
    CmaFree:           47240 kB
    CmaTotal:         153600 kB
    CmaFree:           40236 kB
    CmaTotal:         153600 kB
    CmaFree:           40236 kB
    CmaTotal:         153600 kB
    CmaFree:           40400 kB
    CmaTotal:         153600 kB
    CmaFree:           40400 kB
    CmaTotal:         153600 kB
    CmaFree:           40400 kB
    CmaTotal:         153600 kB
    CmaFree:           73996 kB
    CmaTotal:         153600 kB
    CmaFree:           33560 kB
    CmaTotal:         153600 kB
    CmaFree:           33560 kB
    CmaTotal:         153600 kB
    CmaFree:           33560 kB
    CmaTotal:         153600 kB
    CmaFree:           33560 kB
    CmaTotal:         153600 kB
    CmaFree:           67156 kB
    CmaTotal:         153600 kB
    CmaFree:           26720 kB
    CmaTotal:         153600 kB
    CmaFree:           26720 kB
    CmaTotal:         153600 kB
    CmaFree:           26720 kB
    CmaTotal:         153600 kB
    CmaFree:           26720 kB
    CmaTotal:         153600 kB
    CmaFree:           48304 kB
    CmaTotal:         153600 kB
    CmaFree:           21928 kB
    CmaTotal:         153600 kB
    CmaFree:           21928 kB
    CmaTotal:         153600 kB
    CmaFree:           21928 kB
    CmaTotal:         153600 kB
    CmaFree:           21928 kB
    CmaTotal:         153600 kB
    CmaFree:           21928 kB
    CmaTotal:         153600 kB
    CmaFree:           22560 kB
    CmaTotal:         153600 kB
    CmaFree:           22560 kB
    CmaTotal:         153600 kB
    CmaFree:           22560 kB
    CmaTotal:         153600 kB
    CmaFree:           22560 kB
    CmaTotal:         153600 kB
    CmaFree:           22560 kB
    CmaTotal:         153600 kB
    CmaFree:           22472 kB
    CmaTotal:         153600 kB
    CmaFree:           22472 kB
    CmaTotal:         153600 kB
    CmaFree:           22472 kB
    CmaTotal:         153600 kB
    CmaFree:           22472 kB
    CmaTotal:         153600 kB
    CmaFree:           22472 kB
    CmaTotal:         153600 kB
    CmaFree:           38704 kB
    CmaTotal:         153600 kB
    CmaFree:           38704 kB
    CmaTotal:         153600 kB
    CmaFree:           39704 kB
    CmaTotal:         153600 kB
    CmaFree:           39704 kB
    CmaTotal:         153600 kB
    CmaFree:           39704 kB
    CmaTotal:         153600 kB
    CmaFree:           39704 kB
    CmaTotal:         153600 kB
    CmaFree:           39704 kB
    CmaTotal:         153600 kB
    CmaFree:           39704 kB

    At one point, CMA memory is not enough which is requested by kernel. There similar of CMA memory leak for TDA4VH-Q1.

     TDA4VH-Q1: Leak in the use of CMA memory by the encode driver 

    Do you think, we have the same issue? Will the solution mentioned in the thread work properly for us as well?

    Regards,

    Jay

  • Hi Jay,

    Since you are still on 9.1 SDK, I would suggest to take that patch and apply. 

    Is there a reason, you can't migrate to latest SDK 11.1 or have it validated on 11.1 SDK?

    Best Regards,

    Suren

  • Hi Suren, 

    Thank you for your reply. We have migrated to SDK-10.1. We are going to do this year release on SDK-9.1 and then move to SDK-10.1. I have checked in the SDK-10.1, this changes are already present.

    So, We don't need anything else apart from this patch to fix CMA memory leak? correct. 

    We will do this change and verify.

    Regards,

    Jay

  • Hi Jay,

    Please let us know if you still need support on this. 

    Best Regards,

    Suren