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.

TDA4VM: IMX390 camera preview on PSDK 9.0

Part Number: TDA4VM
Other Parts Discussed in Thread: PCM3168A

Hi TI Expert,

HW : TDA4VM EVM

SW : SDK 9.0

I'm trying to preview with IMX390 camera on SDK 9.0.

But I faced a data abort when starting preview as below.

I verified this feature on SDK 8.6 in previous. However this issue is happened on SDK 9.0.

Can you please help to fix this issue?

root@j721e-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video2 ! queue leaky=2 ! video/x-bayer, width=1936, height=1100, format=rggb12 ! tiovxisp sink_0::device=/dev/v4l-subdev4 sensor-name=SENSOR_SONY_IMX390_UB953_D3 dcc-isp-file=/opt/imaging/imx390/linear/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/imx390/linear/dcc_2a.bin format-msb=11 ! video/x-raw, format=NV12 ! tiovxldc dcc-file=/opt/imaging/imx390/linear/dcc_ldc.bin sensor-name=SENSOR_SONY_IMX390_UB953_D3 ! video/x-raw, format=NV12, width=1920, height=1080 ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=false
APP: Init ... !!!
MEM: Init ... !!!
MEM: Initialized DMA HEAP (fd=6) !!!
MEM: Init ... Done !!!
IPC: Init ... !!!
IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
    28.386118 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
    28.389591 s:  VX_ZONE_INIT:Enabled
    28.389645 s:  VX_ZONE_ERROR:Enabled
    28.389652 s:  VX_ZONE_WARNING:Enabled
    28.393582 s:  VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!!
    28.396094 s:  VX_ZONE_INIT:[tivxHostInitLocal:96] Initialization Done for HOST !!!
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeSink:fakesink0: sync = false
Pipeline is PREROLLED ...
Setting pipeline to P[   21.494099] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
LAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/Gs[   21.508258] Mem abort info:
tV4l2Src:v4l2src0.GstPad:src: caps = video/x-bayer, width=(int)1[   21.516597]   ESR = 0x0000000096000006
936, height=(int)1100, format=(string)rggb12, framerate=(fractio[   21.525869]   EC = 0x25: DABT (current EL), IL = 32 bits
n)120/1, interlace-mode=(string)progressive, colorimetry=(string[   21.536712]   SET = 0, FnV = 0
)2:4:7:1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: ca[   21.545301]   EA = 0, S1PTW = 0
ps = video/x-bayer, width=(int)1936, height=(int)1100, format=(s[   21.553979]   FSC = 0x06: level 2 translation fault
tring)rggb12, framerate=(fraction)120/1, interlace-mode=(string)[   21.564389] Data abort info:
progressive, colorimetry=(string)2:4:7:1
/GstPipeline:pipeline0[   21.572807]   ISV = 0, ISS = 0x00000006
/GstQueue:queue0.GstPad:src: caps = video/x-bayer, width=(int)19[   21.582180]   CM = 0, WnR = 0
36, height=(int)1100, format=(string)rggb12, framerate=(fraction[   21.590712] user pgtable: 4k pages, 48-bit VAs, pgdp=00000008abe65000
)120/1, interlace-mode=(string)progressive, colorimetry=(string)[   21.602715] [0000000000000010] pgd=08000008abe44003, p4d=08000008abe44003, pud=08000008abd57003, pmd=0000000000000000
2:4:7:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad[   21.618835] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
[   21.630596] Modules linked in: pci_endpoint_test xhci_plat_hcd imx390 cdns_csi2rx ds90ub953 ti_am335x_adc kfifo_buf pru_rproc irq_pruss_intc cdns_pltfrm rpmsg_ctrl rpmsg_char omap_rng cdns3 cdns_usb_common crct10dif_ce snd_soc_j721e_evm display_connector phy_can_transceiver overlay cfg80211 bluetooth ecdh_generic ecc rfkill ti_k3_r5_remoteproc cdns_mhdp8546 ti_am335x_tscadc pruss drm_display_helper tidss vxd_dec vxe_enc j721e_csi2rx drm_dma_helper drm_kms_helper videobuf2_dma_contig videobuf2_dma_sg ti_j721e_ufs sa2ul cfbfillrect syscopyarea ds90ub960 v4l2_mem2mem v4l2_fwnode videobuf2_memops cfbimgblt videobuf2_v4l2 i2c_atr v4l2_async videobuf2_common ti_k3_dsp_remoteproc sysfillrect cdns_dphy_rx snd_soc_davinci_mcasp snd_soc_pcm3168a_i2c videodev virtio_rpmsg_bus sysimgblt snd_soc_ti_udma snd_soc_pcm3168a fb_sys_fops rpmsg_ns cfbcopyarea ti_k3_common pci_j721e_host snd_soc_ti_edma pci_j721e snd_soc_ti_sdma pcie_cadence_host mc cdns3_ti pcie_cadence m_can_platform m_can can_dev
[   21.630714]  optee_rng rng_core fuse drm drm_panel_orientation_quirks ipv6
[   21.724078] CPU: 0 PID: 1184 Comm: v4l2src0:src Not tainted 6.1.33-ga991c7971995-dirty #1
[   21.732236] Hardware name: Texas Instruments J721e EVM (DT)
[   21.737790] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   21.744732] pc : ub960_get_frame_desc+0x104/0x350 [ds90ub960]
[   21.750473] lr : ub960_get_frame_desc+0xd4/0x350 [ds90ub960]
[   21.756118] sp : ffff80000bcc38e0
[   21.759417] x29: ffff80000bcc38e0 x28: ffff00082bfd2c80 x27: ffff000827cfc800
[   21.766536] x26: 0000000000000000 x25: ffff00082bfd2c00 x24: ffff80000bcc3a14
[   21.773653] x23: ffff800000f5e000 x22: ffff00082be9c880 x21: ffff00082bfd2c30
[   21.780771] x20: 0000000000000004 x19: ffff80000bcc3a60 x18: 000000000003c848
[   21.787888] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[   21.795006] x14: 0000000000000068 x13: 00000000000000c0 x12: 0000000000000000
[   21.802124] x11: fffffc0020af6b00 x10: 0000000000000001 x9 : 0000000000000000
[   21.809240] x8 : ffff80000bcc3b08 x7 : 00000000fffffffc x6 : 000000000000003f
[   21.816358] x5 : 0000000000000040 x4 : 0000000000000028 x3 : ffff00082bfd2c80
[   21.823475] x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffff00082be9c880
[   21.830592] Call trace:
[   21.833025]  ub960_get_frame_desc+0x104/0x350 [ds90ub960]
[   21.838412]  csi2rx_get_frame_desc+0x80/0xc0 [cdns_csi2rx]
[   21.843885]  ti_csi2rx_get_vc+0x100/0x120 [j721e_csi2rx]
[   21.849187]  ti_csi2rx_start_streaming+0x100/0x25c [j721e_csi2rx]
[   21.855265]  vb2_start_streaming+0x68/0x15c [videobuf2_common]
[   21.861089]  vb2_core_streamon+0x90/0x190 [videobuf2_common]
[   21.866736]  vb2_ioctl_streamon+0x5c/0xb0 [videobuf2_v4l2]
[   21.872211]  v4l_streamon+0x24/0x30 [videodev]
[   21.876666]  __video_do_ioctl+0x184/0x3d0 [videodev]
[   21.881636]  video_usercopy+0x214/0x6c4 [videodev]
[   21.886433]  video_ioctl2+0x18/0x2c [videodev]
[   21.890882]  v4l2_ioctl+0x40/0x60 [videodev]
[   21.895158]  __arm64_sys_ioctl+0xa8/0xf0
[   21.899071]  invoke_syscall+0x48/0x114
[   21.902811]  el0_svc_common.constprop.0+0xd4/0xfc
[   21.907501]  do_el0_svc+0x30/0xd0
[   21.910803]  el0_svc+0x2c/0x84
[   21.913851]  el0t_64_sync_handler+0xbc/0x140
[   21.918105]  el0t_64_sync+0x18c/0x190
[   21.921757] Code: 6b070007 1a8020fa 8b1a0ec0 f9405401 (f9400820)
[   21.927831] ---[ end trace 0000000000000000 ]---
:src: caps = video/x-bayer, width=(int)1936, height=(int)1100, format=(string)rggb12, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
/GstPipeline:pipeline0/GstTIOVXISP:tiovxisp0.GstTIOVXIspPad:sink_0: caps = video/x-bayer, width=(int)1936, height=(int)1100, format=(string)rggb12, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-bayer, width=(int)1936, height=(int)1100, format=(string)rggb12, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1

Thanks,

Jaewook

  • Hi Jaewook,

    I am not familiar with gstreamer details, but I was able to do the following previously on AM62A SDK 9.0 + IMX390 camera.
    Please see if you can do the same.

    1. 
    root@am62axx-evm:/opt/edgeai-gst-apps# echo 'name_overlays=ti/k3-am62a7-sk-fusion.dtbo ti/k3-fpdlink-imx390-rcm-0-0.dtbo' >> /run/media/BOOT-mmcblk1p1/uEnv.txt
    then, reboot 
    2.
    root@am62axx-evm:/opt/edgeai-gst-apps# v4l2-ctl -d /dev/v4l-subdev4 --set-ctrl red_balance=256
    root@am62axx-evm:/opt/edgeai-gst-apps# v4l2-ctl -d /dev/v4l-subdev4 --set-ctrl blue_balance=256
    3. 
    root@am62axx-evm:/opt/edgeai-gst-apps# v4l2-ctl -d /dev/v4l-subdev4 --set-ctrl wide_dynamic_range=1
    4.

    gst-launch-1.0 \
    v4l2src device=/dev/video3 io-mode=dmabuf-import ! \
    video/x-bayer, width=1936, height=1100, format=rggb12 ! \
    tiovxisp sink_0::device=/dev/v4l-subdev4 sensor-name=SENSOR_SONY_IMX390_UB953_D3 \
    dcc-isp-file=/opt/imaging/imx390/wdr/dcc_viss_wdr.bin \
    sink_0::dcc-2a-file=/opt/imaging/imx390/wdr/dcc_2a_wdr.bin format-msb=11 ! \
    video/x-raw, format=NV12, width=1936, height=1100 ! kmssink driver-name=tidss sync=false

  • Hi Jaewook,

    I have tested IMX390 + TDA4VM SDK 9.0 and do not see any issue. Please try the steps below and let me know if they work for you.

    1. Navigate to /run/media/BOOT-mmcblk1p1/uEnv.txt and ensure that the device tree overlay is set up properly 
      1. name_overlays=ti/k3-j721e-edgeai-apps.dtbo ti/k3-j721e-evm-fusion.dtbo ti/k3-fpdlink-imx390-rcm-0-0.dtbo
    2. Set up red/blue balance
      1. v4l2-ctl -d /dev/v4l-imx390-subdev0 --set-ctrl red_balance=256
        v4l2-ctl -d /dev/v4l-imx390-subdev0 --set-ctrl blue_balance=256
        v4l2-ctl -d /dev/v4l-imx390-subdev0 --set-ctrl wide_dynamic_range=1
    3. Stream 
      1. gst-launch-1.0    \
        v4l2src device=/dev/video-imx390-cam0 io-mode=dmabuf-import !      \
        video/x-bayer, width=1936, height=1100, format=rggb12 ! \
        tiovxisp sink_0::device=/dev/v4l-imx390-subdev0 sensor-name=SENSOR_SONY_IMX390_UB953_D3 \
        dcc-isp-file=/opt/imaging/imx390/wdr/dcc_viss_wdr.bin \
        sink_0::dcc-2a-file=/opt/imaging/imx390/wdr/dcc_2a_wdr.bin format-msb=11 ! \
        tiovxldc dcc-file=/opt/imaging/imx390/wdr/dcc_ldc_wdr.bin sensor-name=SENSOR_SONY_IMX390_UB953_D3 sink_0::pool-size=8 src::pool-size=8 ! \
        video/x-raw, format=NV12, width=1936, height=1100 ! kmssink driver-name=tidss sync=false
        

    Best,

    Chau