TDA4VEN-Q1: Kernel crashes when capturing custom camera

Part Number: TDA4VEN-Q1

Tool/software:

Hi TI,

        We got a custom camera (w/ built-in TI-953 Ser) from our vendor. Its parameters are Sony ISX021 sensor, 1920x1280, 30 FPS, FPD-Link III, MIPI 4 Lane YUV422 8bits. Now we want to apply it to our TDA4VEN platform. The settings before capturing the frame are:

(We detect TI960/954 Deser on the fourth I2C bus so we also update the /boot/dtb/ti/k3-j722s-evm-fpdlink-fusion.dtbo and apply it at booting)

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/dts-v1/;
/ {
fragment@0 {
target-path = "/";
__overlay__ {
fixed-clock-25M {
compatible = "fixed-clock";
#clock-cells = <0x00>;
clock-frequency = <0x17d7840>;
phandle = <0x01>;
};
};
};
fragment@1 {
target = <0xffffffff>;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
j722s-evm:/opt/edgeai-gst-apps# media-ctl -p
Media controller API version 6.6.32
Media device information
------------------------
driver j721e-csi2rx
model TI-CSI2RX
serial
bus info platform:30102000.ticsi2rx
hw revision 0x1
driver version 6.6.32
Device topology
- entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Fullscreen
1
2
3
4
j722s-evm:/opt/edgeai-gst-apps# media-ctl --set-v4l2 "'ds90ub960 4-003d':0 [fmt:UYVY8_1X16/1920x1280 field:none]"
j722s-evm:/opt/edgeai-gst-apps# media-ctl --set-v4l2 "'cdns_csi2rx.30101000.csi-bridge':0 [fmt:UYVY8_1X16/1920x1280 field:none]"
j722s-evm:/opt/edgeai-gst-apps# media-ctl --set-v4l2 "'30102000.ticsi2rx':0 [fmt:UYVY8_1X16/1920x1280 field:none]"
j722s-evm:/opt/edgeai-gst-apps# v4l2-ctl -d /dev/video3 --set-fmt-video width=1920,height=1280,pixelformat=UYVY
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

After executing the commands above:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
j722s-evm:/opt/edgeai-gst-apps# media-ctl -p
Media controller API version 6.6.32
Media device information
------------------------
driver j721e-csi2rx
model TI-CSI2RX
serial
bus info platform:30102000.ticsi2rx
hw revision 0x1
driver version 6.6.32
Device topology
- entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Thus, we use v4l2-ctl -d/dev/video3 --stream-mmap --stream-to=frame-raw --stream-count=1, but the kernel crashes:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
j722s-evm:/opt/edgeai-gst-apps# v4l2-ctl -d/dev/video3 --stream-mmap --stream-to=frame.raw --stream-count=1
[ 3281.219864] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
[ 3281.228692] Mem abort info:
[ 3281.231475] ESR = 0x0000000096000006
[ 3281.235230] EC = 0x25: DABT (current EL), IL = 32 bits
[ 3281.240546] SET = 0, FnV = 0
[ 3281.243591] EA = 0, S1PTW = 0
[ 3281.246731] FSC = 0x06: level 2 translation fault
[ 3281.251605] Data abort info:
[ 3281.254485] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
[ 3281.259965] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 3281.265013] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 3281.270337] user pgtable: 4k pages, 48-bit VAs, pgdp=00000008a6b72000
[ 3281.276854] [0000000000000010] pgd=08000008a3eda003, p4d=08000008a3eda003, pud=08000008b446b003, pmd=0000000000000000
[ 3281.287534] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
[ 3281.293788] Modules linked in: overlay onboard_usb_hub cfg80211 rpmsg_ctrl rpmsg_char snd_soc_hdmi_codec cdns_csi2rx cdns3 bluetooth cdns_6
[ 3281.367486] CPU: 0 PID: 1840 Comm: v4l2-ctl Tainted: G O 6.6.32-ti-gdb8871293143-dirty #1
[ 3281.377034] Hardware name: Texas Instruments J722S EVM (DT)
[ 3281.382590] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 3281.389537] pc : ub960_get_frame_desc+0xf4/0x334 [ds90ub960]
[ 3281.395201] lr : ub960_get_frame_desc+0xc8/0x334 [ds90ub960]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Is there any step went wrong?

Regards,

V.C.

  • Hi Brijesh,

            After I rebuild and install u-boot in SDK by make u-boot_install and re-run the commands above, the kernel still crashes.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@j722s-evm:/opt/edgeai-gst-apps# v4l2-ctl -d /dev/video3 --set-fmt-video width=1920,height=1280,pixelformat=UYVY --stream-mmap --stream-to=frame.raw --stream-count=1
    [ 270.899499] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010
    [ 270.908398] Mem abort info:
    [ 270.911183] ESR = 0x0000000096000006
    [ 270.914980] EC = 0x25: DABT (current EL), IL = 32 bits
    [ 270.920311] SET = 0, FnV = 0
    [ 270.923366] EA = 0, S1PTW = 0
    [ 270.926496] FSC = 0x06: level 2 translation fault
    [ 270.931371] Data abort info:
    [ 270.934240] ISV = 0, ISS = 0x00000006, ISS2 = 0x00000000
    [ 270.939722] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
    [ 270.944773] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    [ 270.950081] user pgtable: 4k pages, 48-bit VAs, pgdp=00000008a66ef000
    [ 270.956517] [0000000000000010] pgd=08000008b75e6003, p4d=08000008b75e6003, pud=08000008a50b4003, pmd=0000000000000000
    [ 270.967127] Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
    [ 270.973381] Modules linked in: onboard_usb_hub snd_soc_hdmi_codec overlay cdns3 cdns_usb_common rpmsg_ctrl cdns_csi2rx cfg80211 rpmsg_char crct10dif_ce snd_soc_si6
    [ 271.049599] CPU: 3 PID: 1597 Comm: v4l2-ctl Tainted: G O 6.6.44-ti-01478-g541c20281af7-dirty #1
    [ 271.059668] Hardware name: Texas Instruments J722S EVM (DT)
    [ 271.065224] pstate: 80000005 (Nzcv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [ 271.072170] pc : ub960_get_frame_desc+0xf4/0x334 [ds90ub960]
    [ 271.077835] lr : ub960_get_frame_desc+0xc8/0x334 [ds90ub960]
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I'm not sure the change is applied correctly or not.

    (BTW, I realize I pasted the wrong message of fourth block of code. The real resolution for it should all be set at UYVY/1920x1280.)

  • Hi Chen,

    which sdk version are you using ?

    Regards,
    Gokul

  • Hi Gokul, 

            We download the sdk from here: https://www.ti.com/tool/download/PROCESSOR-SDK-LINUX-AM67A/10.01.00.04

    Regards,

    V.C.

  • Hi Chen,

    Thank you for sharing, we are checking with our experts internally and will update soon.

    Regards,
    Gokul

  • Hi Chen,

    Sorry for the dealy, can you share the entire boot logs.

    Regards,

    Gokul

  • Sure, the attachment is the output from `dmesg`. (Note: It contains some commands to set up the deserializer, media-ctl, and v4l2-ctl.)

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    script "bin/setup-minicom.sh" line 33: unknown command "cwd=`dirname"
    j722s-evm login: root
    [ 98.914247] audit: type=1006 audit(1741155621.909:23): pid=1480 uid=0 subj=kernel old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=3 res=1
    [ 98.927908] audit: type=1300 audit(1741155621.909:23): arch=c00000b7 syscall=64 success=yes exit=1 a0=8 a1=fffff1e46708 a2=1 a3=1 items=0 ppid=1 pid=1480 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="(systemd)" exe="/usr/lib/systemd/systemd-executor" subj=kernel key=(null)
    [ 98.955716] audit: type=1327 audit(1741155621.909:23): proctitle="(systemd)"
    [ 98.962821] audit: type=1334 audit(1741155621.941:24): prog-id=21 op=LOAD
    [ 98.969690] audit: type=1300 audit(1741155621.941:24): arch=c00000b7 syscall=280 success=yes exit=8 a0=5 a1=ffffc4b77b08 a2=90 a3=0 items=0 ppid=1 pid=1480 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="systemd" exe="/usr/lib/systemd/systemd" subj=kernel key=(null)
    [ 98.996603] audit: type=1327 audit(1741155621.941:24): proctitle="(systemd)"
    [ 99.003706] audit: type=1334 audit(1741155621.953:25): prog-id=21 op=UNLOAD
    [ 99.010701] audit: type=1300 audit(1741155621.953:25): arch=c00000b7 syscall=57 success=yes exit=0 a0=8 a1=1 a2=0 a3=ffff9b22dc60 items=0 ppid=1 pid=1480 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=3 comm="systemd" exe="/usr/lib/systemd/systemd" subj=kernel key=(null)
    [ 99.037410] audit: type=1327 audit(1741155621.953:25): proctitle="(systemd)"
    [ 99.044533] audit: type=1334 audit(1741155621.953:26): prog-id=22 op=LOAD
    root@j722s-evm:/opt/edgeai-gst-apps# dmesg | grep ds90
    [ 8.148066] ds90ub960 5-0036: supply vddio not found, using dummy regulator
    [ 8.185227] ds90ub960 5-0036: ub960_write: cannot write register 0x01 (-121)!
    [ 8.196126] ds90ub960 5-0036: reset failed: -121
    [ 8.201409] ds90ub960 5-0036: ub960_read: cannot read register 0x03 (-121)!
    [ 8.208524] ds90ub960 5-0036: error -EREMOTEIO: Cannot read first register, abort
    [ 8.217933] ds90ub960: probe of 5-0036 failed with error -121
    [ 8.224015] ds90ub960 5-003d: supply vddio not found, using dummy regulator
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Chen,

    Thank you for sharing the logs,

    our experts are busy this week, we will get back to you next week. Sorry for the delay.

    Regards,
    Gokul

  • Hi Chen,

    It seems camera is not getting probed, Can you check with your camera vendor for the drivers, we don't support driver for isx021. 

    Regards,
    Gokul

  • I noticed that a few days ago and we tried another sensor with imx390, then, the problem was solved.

    However, it keeps hanging on the line 88 (dequeuing) in the test code:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    #include <stdio.h>
    #include <stdlib.h>
    #include <fcntl.h>
    #include <unistd.h>
    #include <sys/ioctl.h>
    #include <sys/mman.h>
    #include <linux/videodev2.h>
    #include <string.h>
    #include <errno.h>
    #define DEVICE "/dev/video4"
    #define WIDTH 1936
    #define HEIGHT 1100
    int main() {
    int fd = open(DEVICE, O_RDWR);
    if (fd == -1) {
    perror("Error opening video device");
    return 1;
    }
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I would mark this problem is solved and open another one for the above problem.