OV490 YUV422+UB964 MIPS CSI dump image

Hi All,

I am developing MIPI CSI drvier for TX2+OV490+TI 964 EVM.
our signal flow is shown below:
OV490 (DVP)–>TI 913 (serializer)–>TI 964 EVM(deserializer CSI)–>TX2.
We can burn OV490 with RAW12 ISP or YUV 422 8bit ISP.
For now after configure TI 964 correctly, we can dump image picture with TX2. We us following command to dump image.

./yavta /dev/video0 -c10 -n4 -s1280x720 -fSGRBG12 -Fov.raw

But for OV490 YUV 422 8bit mode, we still cannot get correct image.
After long time search with TX2 Forum, we get default TX2 bsp don’t support YUV 422. Have to do modification by yourself to support YUV 422.
To support YUV 422, we do modification below.

diff --git a/drivers/media/platform/tegra/camera/camera_common.c b/drivers/media/platform/tegra/camera/camera_common.c
index 41f39ea..918cdbd 100644
--- a/drivers/media/platform/tegra/camera/camera_common.c
+++ b/drivers/media/platform/tegra/camera/camera_common.c
@@ -71,6 +71,23 @@ static const struct camera_common_colorfmt camera_common_color_fmts[] = {
                V4L2_COLORSPACE_SRGB,
                V4L2_PIX_FMT_XRGGB10P,
        },
+       {       MEDIA_BUS_FMT_UYVY8_1X16,
+               V4L2_COLORSPACE_SRGB,
+               V4L2_PIX_FMT_UYVY,
+       },
+       {       MEDIA_BUS_FMT_UYVY8_2X8,
+               V4L2_COLORSPACE_SRGB,
+               V4L2_PIX_FMT_UYVY,
+       },
+       {       MEDIA_BUS_FMT_YUYV10_2X10,
+               V4L2_COLORSPACE_SRGB,
+               V4L2_PIX_FMT_YUYV,
+       },
+       {
+                MEDIA_BUS_FMT_YUYV8_2X8,
+                V4L2_COLORSPACE_SRGB,
+                V4L2_PIX_FMT_YUYV,
+       }, 
 };

diff --git a/drivers/media/platform/tegra/camera/sensor_common.c b/drivers/media/platform/tegra/camera/sensor_common.c
index fd5ace1..276a29b 100644
--- a/drivers/media/platform/tegra/camera/sensor_common.c
+++ b/drivers/media/platform/tegra/camera/sensor_common.c
@@ -135,11 +135,17 @@ static int extract_pixel_format(
                *format = V4L2_PIX_FMT_XBGGR10P;
        else if (strncmp(pixel_t, "bayer_xrggb10p", size) == 0)
                *format = V4L2_PIX_FMT_XRGGB10P;
+       else if (strncmp(pixel_t, "uyvy", size) == 0)
+               *format = V4L2_PIX_FMT_UYVY;
+       else if (strncmp(pixel_t, "yuyv", size) == 0)
+               *format = V4L2_PIX_FMT_YUYV; 
+       else if (strncmp(pixel_t, "rgb3", size) == 0)
+               *format = V4L2_PIX_FMT_RGB24;
        else {
                pr_err("%s: Need to extend format%s\n", __func__, pixel_t);
                return -EINVAL;
        }
-
+       pr_info("%s format 0x%x\n", __func__, *format);
        return 0;
 }

OV490 sensor driver is developed based on ov5693 but remove all real register operation. Only sucessfully generate /dev/video0. Since we can dump RAW12 OV490 image picture, we beleive our fake sensor driver shoule be fine.
About DTS file, we beleive csi channel configuration shoule be ok. For RAW12 and YUV 422, we only change pixel_t as below part.

pixel_t = "yuyv";
//pixel_t = "bayer_rggb";

The blelow is our 964 reg dump for YUV 422 8 bit.

No size specified (using byte-data access)
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
00: 7a 00 1e 30 c2 01 00 fe 1c 10 79 79 01 09 00 00    z.?0??.???yy??..
10: 81 85 00 89 8d 00 00 00 00 01 4d 0b c3 00 04 02    ??.??....?M??.??
20: e0 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ??..............
30: 00 00 01 21 00 01 00 00 00 00 00 00 00 00 00 00    ..?!.?..........
40: 00 a3 01 01 00 00 00 00 00 00 00 00 01 03 c4 30    .???........???0
50: 00 00 00 00 00 00 00 00 58 00 00 b0 b2 48 00 00    ........X..??H..
60: 00 00 00 00 00 4a 00 00 00 00 00 00 00 7f 9a 88    .....J.......???
70: 1e 1e e4 02 d0 0d 50 c5 00 01 00 00 81 00 00 00    ??????P?.?..?...
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
b0: 10 14 1f 08 25 00 18 00 ff 03 03 74 80 00 00 00    ????%.?..??t?...
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
d0: 00 43 84 0f 60 f8 07 00 00 00 00 40 00 00 00 00    .C??`??....@....
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
f0: 5f 55 42 39 36 34 00 00 00 00 00 00 00 00 00 00    _UB964..........

We use this command try to dump YUV image picture, but doesn’t work.

./yavta /dev/video0 -c2 -n4 -s1280x720 -fYUYV -Fov.raw

We get below error message.

[   17.853608] ip_tables: (C) 2000-2006 Netfilter Core Team
[   18.023206] CPU1: shutdown
[   18.025937] psci: CPU1 killed.
[   18.055192] CPU2: shutdown
[   18.057908] psci: CPU2 killed.
[   18.325437] IPv6: ADDRCONF(NETDEV_UP): docker0: link is not ready
[   18.860389] fuse init (API version 7.23)
[   19.494931] eqos 2490000.ether_qos eth0: Link is Up - 1Gbps/Full - flow control off
[   19.503649] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   21.422060] IPVS: Creating netns size=1424 id=2
[   22.827687] IPVS: Creating netns size=1424 id=3
[ 1239.308360] ov490 2-005c: camera_common_mclk_enable: enable MCLK with 24000000 Hz
[ 1239.316344] ov490 2-005c: camera_common_dpd_disable: csi 0
[ 1239.321932] ov490 2-005c: ov490_power_on: power on
[ 1239.326983] ov490 2-005c: ov490_power_on: line 269
[ 1239.341594] tegra_mipi_cal 3990000.mipical: tegra_mipi_bias_pad_enable
[ 1239.349477] nvcsi 150c0000.nvcsi: csi port:0
[ 1239.353891] tegra_mipi_cal 3990000.mipical: tegra_mipi_calibration
[ 1239.360326] tegra_mipi_cal 3990000.mipical: fun tegra_mipi_wait line 231
[ 1239.367549] fun ov490_set_fmt which 0 code 0x2008
[ 1239.372559] ov490 2-005c: camera_common_try_fmt: size 1280 x 720
[ 1239.378626] ov490 2-005c: camera_common_try_fmt: line 553 mode 0 size 1920 x 1080
[ 1239.386178] ov490 2-005c: camera_common_try_fmt: line 553 mode 0 size 1280 x 720
[ 1239.393634] ov490 2-005c: camera_common_try_fmt: line 561 mode 1 size 1280 x 720
[ 1239.401081] ov490 2-005c: camera_common_try_fmt: line 576 mode_type 0 
[ 1239.407667] ov490 2-005c: camera_common_try_fmt: line 588 err 0 
[ 1239.413718] fun ov490_set_fmt which 1 code 0x2008
[ 1239.418445] ov490 2-005c: camera_common_s_fmt(8200) size 1280 x 720
[ 1239.424750] fun camera_common_find_datafmt code 0x2008 == 0x3012
[ 1239.430795] fun camera_common_find_datafmt code 0x2008 == 0x300f
[ 1239.436825] fun camera_common_find_datafmt code 0x2008 == 0x3007
[ 1239.442855] fun camera_common_find_datafmt code 0x2008 == 0x3014
[ 1239.448891] fun camera_common_find_datafmt code 0x2008 == 0x3022
[ 1239.454919] fun camera_common_find_datafmt code 0x2008 == 0x3019
[ 1239.460965] fun camera_common_find_datafmt code 0x2008 == 0x200f
[ 1239.466989] fun camera_common_find_datafmt code 0x2008 == 0x2006
[ 1239.473011] fun camera_common_find_datafmt code 0x2008 == 0x200b
[ 1239.479030] fun camera_common_find_datafmt code 0x2008 == 0x2008
[ 1239.485037] fun camera_common_find_datafmt code 0x2008 match_index 9
[ 1239.491390] ov490 2-005c: camera_common_try_fmt: size 1280 x 720
[ 1239.497397] ov490 2-005c: camera_common_try_fmt: line 553 mode 0 size 1920 x 1080
[ 1239.504879] ov490 2-005c: camera_common_try_fmt: line 553 mode 0 size 1280 x 720
[ 1239.512278] ov490 2-005c: camera_common_try_fmt: line 561 mode 1 size 1280 x 720
[ 1239.519670] ov490 2-005c: camera_common_try_fmt: line 576 mode_type 0 
[ 1239.526199] ov490 2-005c: camera_common_try_fmt: line 588 err 0 
[ 1239.532207] fun camera_common_find_datafmt code 0x2008 == 0x3012
[ 1239.538213] fun camera_common_find_datafmt code 0x2008 == 0x300f
[ 1239.544219] fun camera_common_find_datafmt code 0x2008 == 0x3007
[ 1239.550226] fun camera_common_find_datafmt code 0x2008 == 0x3014
[ 1239.556230] fun camera_common_find_datafmt code 0x2008 == 0x3022
[ 1239.562235] fun camera_common_find_datafmt code 0x2008 == 0x3019
[ 1239.568240] fun camera_common_find_datafmt code 0x2008 == 0x200f
[ 1239.574251] fun camera_common_find_datafmt code 0x2008 == 0x2006
[ 1239.580257] fun camera_common_find_datafmt code 0x2008 == 0x200b
[ 1239.586263] fun camera_common_find_datafmt code 0x2008 == 0x2008
[ 1239.592266] fun camera_common_find_datafmt code 0x2008 match_index 9
[ 1239.598630] ov490 2-005c: camera_common_s_fmt colorspace 0x8
[ 1239.604291] ov490 2-005c: camera_common_s_fmt code 8200
[ 1239.614924] video4linux video0: fun vi4_channel_start_streaming line 895
[ 1239.621650] ov490 2-005c: camera_common_g_fmt++
[ 1239.626187] ov490 2-005c: camera_common_g_fmt colorspace 0x8
[ 1239.631848] ov490 2-005c: camera_common_g_fmt code 8200
[ 1239.637080] video4linux video0: fun vi4_channel_start_streaming line 900
[ 1239.643790] video4linux video0: fun vi4_channel_start_streaming line 912
[ 1239.650499] video4linux video0: fun vi4_channel_start_streaming line 982
[ 1239.662623] BUG: recent printk recursion!
[ 1239.657450] fun tegra_channel_notify_enable line fun tegra_channel_notify_enable line 
[ 1239.669940] video4linux video0: fun tegra_channel_capture_setup line 458
[ 1239.676835] video4linux video0: fun vi4_channel_write addr 0x20 value 32543
[ 1239.683799] video4linux video0: fun vi4_channel_write addr 0x24 value 1983
[ 1239.690749] video4linux video0: fun vi4_channel_write addr 0x2c value 0
[ 1239.697414] video4linux video0: fun vi4_channel_write addr 0x28 value 0
[ 1239.704069] video4linux video0: fun tegra_channel_capture_setup line 477
[ 1239.710959] video4linux video0: fun vi4_channel_write addr 0x30 value 1280
[ 1239.717833] video4linux video0: fun vi4_channel_write addr 0x34 value 720
[ 1239.724625] video4linux video0: fun vi4_channel_write addr 0x48 value 0
[ 1239.731239] video4linux video0: fun vi4_channel_write addr 0x4c value 1280
[ 1239.738114] video4linux video0: fun vi4_channel_write addr 0x58 value 1280
[ 1239.744990] video4linux video0: fun vi4_channel_write addr 0x50 value 0
[ 1239.751604] video4linux video0: fun vi4_channel_write addr 0x54 value 720
[ 1239.758390] video4linux video0: fun vi4_channel_write addr 0x5c value 720
[ 1239.765186] video4linux video0: fun vi4_channel_write addr 0x80 value 1
[ 1239.771801] video4linux video0: fun vi4_channel_write addr 0x88 value 0
[ 1239.778433] video4linux video0: fun vi4_channel_write addr 0x84 value 200
[ 1239.785223] video4linux video0: fun vi4_channel_write addr 0xb8 value 0
[ 1239.791837] video4linux video0: fun vi4_channel_write addr 0xec value 0
[ 1239.798448] video4linux video0: fun vi4_channel_write addr 0x134 value 0
[ 1239.805149] video4linux video0: fun vi4_channel_write addr 0x44 value 16777216
[ 1239.812369] video4linux video0: fun vi4_channel_write addr 0x38 value 0
[ 1239.818989] video4linux video0: fun vi4_channel_write addr 0x3c value 0
[ 1239.825602] video4linux video0: fun vi4_channel_write addr 0x120 value 0
[ 1239.832306] tegra-vi4 15700000.vi: Create Surface with imgW=1280, imgH=720, memFmt=200
[ 1239.840223] video4linux video0: fun vi4_channel_start_streaming line 1004
[ 1239.847288] misc tegra_camera_ctrl: vi_v4l2_update_isobw:Set iso bw 63590 kbyteps at 7949 KHz
[ 1239.855825] misc tegra_camera_ctrl: tegra_camera_isomgr_request++ bw=63590, lt=4
[ 1239.863542] misc tegra_camera_ctrl: tegra_camera_isomgr_request: tegra_camera isomgr latency is 20 usec
[ 1239.873062] video4linux video0: fun tegra_channel_kthread_capture_start line 711
[ 1239.880460] video4linux video0: fun tegra_channel_kthread_capture_start line 726
[ 1239.887857] video4linux video0: fun tegra_channel_kthread_capture_start line 731
[ 1239.895252] video4linux video0: fun vi4_channel_write addr 0x108 value 0
[ 1239.901955] video4linux video0: fun vi4_channel_write addr 0x10c value 0
[ 1239.908654] video4linux video0: fun vi4_channel_write addr 0x110 value 2560
[ 1239.915618] video4linux video0: fun vi4_channel_write addr 0xe0 value 1592786944
[ 1239.923011] video4linux video0: fun vi4_channel_write addr 0xe8 value 2560
[ 1239.929887] video4linux video0: fun vi4_channel_write addr 0xe4 value 0
[ 1239.936499] video4linux video0: fun vi4_channel_write addr 0xf0 value 0
[ 1239.943113] video4linux video0: fun vi4_channel_write addr 0xf4 value 0
[ 1239.949725] video4linux video0: fun vi4_channel_write addr 0xf8 value 0
[ 1239.956339] video4linux video0: fun vi4_channel_write addr 0xfc value 0
[ 1239.962949] video4linux video0: fun vi4_channel_write addr 0x100 value 0
[ 1239.969651] video4linux video0: fun vi4_channel_write addr 0x104 value 0
[ 1239.976353] nvcsi 150c0000.nvcsi: csi4_start_streaming ports index=0, lanes=2
[ 1239.983488] nvcsi 150c0000.nvcsi: csi4_stream_init
[ 1239.988289] nvcsi 150c0000.nvcsi: csi4_stream_config
[ 1239.993262] nvcsi 150c0000.nvcsi: csi4_stream_config (0) read VC0_DPCM_CTRL = 00000000
[ 1240.001179] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 1240.005887] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000000
[ 1240.011637] nvcsi 150c0000.nvcsi: cil_settingtime is pulled from device
[ 1240.018251] nvcsi 150c0000.nvcsi: cil core clock: 204, csi clock: 102
[ 1240.024691] nvcsi 150c0000.nvcsi: csi settle time: 33, cil settle time: 40
[ 1240.031569] video4linux video0: fun vi4_channel_write addr 0x4 value 1
[ 1240.038093] video4linux video0: fun vi4_channel_write addr 0x1c value 3
[ 1240.045391] video4linux video0: tegra_channel_capture_frame: vi4 got SOF syncpt buf[ffffffc07a2aa000]
[ 1240.054642] fun tegra_channel_notify_status_callback line 
[ 1240.059971] video4linux video0: fun tegra_channel_kthread_capture_start line 711
[ 1240.059974] video4linux video0: tegra_channel_release_frame: vi4 got EOF syncpt buf[ffffffc07a2aa000]
[ 1240.059976] video4linux video0: release_buffer: capture init latency is 446 ms
[ 1240.059980] video4linux video0: release_buffer: release buf[ffffffc07a2aa000] frame[1] to user-space
[ 1240.093094] video4linux video0: fun tegra_channel_kthread_capture_start line 726
[ 1240.100491] video4linux video0: fun tegra_channel_kthread_capture_start line 731
[ 1240.107905] video4linux video0: fun vi4_channel_write addr 0x108 value 0
[ 1240.114606] video4linux video0: fun vi4_channel_write addr 0x10c value 0
[ 1240.121310] video4linux video0: fun vi4_channel_write addr 0x110 value 2560
[ 1240.128271] video4linux video0: fun vi4_channel_write addr 0xe0 value 1594884096
[ 1240.135666] video4linux video0: fun vi4_channel_write addr 0xe8 value 2560
[ 1240.142542] video4linux video0: fun vi4_channel_write addr 0xe4 value 0
[ 1240.149156] video4linux video0: fun vi4_channel_write addr 0xf0 value 0
[ 1240.155769] video4linux video0: fun vi4_channel_write addr 0xf4 value 0
[ 1240.162382] video4linux video0: fun vi4_channel_write addr 0xf8 value 0
[ 1240.168995] video4linux video0: fun vi4_channel_write addr 0xfc value 0
[ 1240.175610] video4linux video0: fun vi4_channel_write addr 0x100 value 0
[ 1240.182310] video4linux video0: fun vi4_channel_write addr 0x104 value 0
[ 1240.189010] video4linux video0: fun vi4_channel_write addr 0x4 value 1
[ 1240.195537] video4linux video0: fun vi4_channel_write addr 0x1c value 3
[ 1241.201065] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 1241.207523] video4linux video0: tegra_channel_capture_frame: vi4 got SOF syncpt buf[ffffffc07a2ab800]
[ 1241.216934] video4linux video0: fun tegra_channel_kthread_capture_start line 711
[ 1241.217002] video4linux video0: tegra_channel_release_frame: vi4 got EOF syncpt buf[ffffffc07a2ab800]
[ 1241.217014] video4linux video0: release_buffer: release buf[ffffffc07a2ab800] frame[2] to user-space
[ 1241.242847] video4linux video0: fun tegra_channel_kthread_capture_start line 726
[ 1241.250359] video4linux video0: fun tegra_channel_kthread_capture_start line 731
[ 1241.257868] video4linux video0: fun vi4_channel_write addr 0x108 value 0
[ 1241.264663] video4linux video0: fun vi4_channel_write addr 0x10c value 0
[ 1241.271419] video4linux video0: fun vi4_channel_write addr 0x110 value 2560
[ 1241.278435] video4linux video0: fun vi4_channel_write addr 0xe0 value 1596981248
[ 1241.285881] video4linux video0: fun vi4_channel_write addr 0xe8 value 2560
[ 1241.292806] video4linux video0: fun vi4_channel_write addr 0xe4 value 0
[ 1241.299488] video4linux video0: fun vi4_channel_write addr 0xf0 value 0
[ 1241.306123] video4linux video0: fun vi4_channel_write addr 0xf4 value 0
[ 1241.312774] video4linux video0: fun vi4_channel_write addr 0xf8 value 0
[ 1241.319413] video4linux video0: fun vi4_channel_write addr 0xfc value 0
[ 1241.326049] video4linux video0: fun vi4_channel_write addr 0x100 value 0
[ 1241.332779] video4linux video0: fun vi4_channel_write addr 0x104 value 0
[ 1241.339496] video4linux video0: fun vi4_channel_write addr 0x4 value 1
[ 1241.346052] video4linux video0: fun vi4_channel_write addr 0x1c value 3
[ 1242.349048] tegra-vi4 15700000.vi: PXL_SOF syncpt timeout! err = -11
[ 1242.355484] video4linux video0: tegra_channel_capture_frame: vi4 got SOF syncpt buf[ffffffc07a2a9800]
[ 1242.364906] video4linux video0: fun tegra_channel_kthread_capture_start line 711
[ 1242.364926] video4linux video0: tegra_channel_release_frame: vi4 got EOF syncpt buf[ffffffc07a2a9800]
[ 1242.364938] video4linux video0: release_buffer: release buf[ffffffc07a2a9800] frame[3] to user-space
[ 1242.390909] video4linux video0: fun vi4_channel_write addr 0x108 value 0
[ 1242.397748] video4linux video0: fun vi4_channel_write addr 0x10c value 0
[ 1242.404807] video4linux video0: fun vi4_channel_write addr 0x110 value 2560
[ 1242.411828] video4linux video0: fun vi4_channel_write addr 0xe0 value 1599078400
[ 1242.419271] video4linux video0: fun vi4_channel_write addr 0xe8 value 2560
[ 1242.426187] video4linux video0: fun vi4_channel_write addr 0xe4 value 0
[ 1242.432906] video4linux video0: fun vi4_channel_write addr 0xf0 value 0
[ 1242.439588] video4linux video0: fun vi4_channel_write addr 0xf4 value 0
[ 1242.446270] video4linux video0: fun vi4_channel_write addr 0xf8 value 0
[ 1242.452941] video4linux video0: fun vi4_channel_write addr 0xfc value 0
[ 1242.459599] video4linux video0: fun vi4_channel_write addr 0x100 value 0
[ 1242.466353] video4linux video0: fun vi4_channel_write addr 0x104 value 0
[ 1242.473099] video4linux video0: fun vi4_channel_write addr 0x4 value 1
[ 1242.479643] video4linux video0: fun vi4_channel_write addr 0x1c value 3
[ 1243.485083] tegra-vi4 15700000.vi: ATOMP_FE syncpt timeout!
[ 1243.490754] video4linux video0: release_buffer: release buf[ffffffc07a2ab000] frame[4] to user-space
[ 1243.500573] nvcsi 150c0000.nvcsi: csi4_stop_streaming ports index=0, lanes=2
[ 1243.507863] nvcsi 150c0000.nvcsi: csi4_phy_config
[ 1243.512682] nvcsi 150c0000.nvcsi: NVCSI_CIL_CONFIG = 00000002
[ 1243.518540] nvcsi 150c0000.nvcsi: csi4_stream_check_status
[ 1243.524130] nvcsi 150c0000.nvcsi: csi4_stream_check_status (0) ERROR_STATUS2VI_VC0 = 0x00000004
[ 1243.532934] nvcsi 150c0000.nvcsi: csi4_cil_check_status 350
[ 1243.538969] misc tegra_camera_ctrl: vi_v4l2_update_isobw:Set iso bw 0 kbyteps at 0 KHz
[ 1243.546966] misc tegra_camera_ctrl: tegra_camera_isomgr_request++ bw=0, lt=4
[ 1243.554798] misc tegra_camera_ctrl: tegra_camera_isomgr_request: tegra_camera isomgr latency is 20 usec
[ 1243.567825] ov490 2-005c: ov490_power_off: power off
[ 1243.573162] ov490 2-005c: camera_common_dpd_enable: csi 0
[ 1243.578610] ov490 2-005c: camera_common_mclk_disable: disable MCLK
[ 1244.081231] tegra_mipi_cal 3990000.mipical: tegra_mipi_bias_pad_disable
nvidia@tegra-ubuntu:~$ sudo cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 33/33   #P:4
#
#                              _-----=> irqs-off
#                             / _----=> need-resched
#                            | / _---=> hardirq/softirq
#                            || / _--=> preempt-depth
#                            ||| /     delay
#           TASK-PID   CPU#  ||||    TIMESTAMP  FUNCTION
#              | |       |   ||||       |         |
     kworker/5:2-2736  [005] ...1  1239.710949: rtos_queue_peek_from_isr_failed: tstamp:39072467727 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1239.710953: rtcpu_start: tstamp:39072468758
     kworker/5:2-2736  [005] ...1  1239.872951: rtos_queue_peek_from_isr_failed: tstamp:39077468601 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1240.028950: rtos_queue_peek_from_isr_failed: tstamp:39082469101 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1240.080959: rtcpu_vinotify_handle_msg: tstamp:39084002246 tag:CSIMUX_STREAM channel:0xff frame:0 vi_tstamp:429296165 data:0x00000001
     kworker/5:2-2736  [005] ...1  1240.080962: rtcpu_vinotify_handle_msg: tstamp:39084431157 tag:CHANSEL_PXL_SOF channel:0x00 frame:2 vi_tstamp:429724733 data:0x00000001
     kworker/5:2-2736  [005] ...1  1240.080962: rtcpu_vinotify_handle_msg: tstamp:39084431306 tag:ATOMP_FS channel:0x00 frame:2 vi_tstamp:429724743 data:0x00000000
     kworker/5:2-2736  [005] ...1  1240.080963: rtcpu_vinotify_handle_msg: tstamp:39084431407 tag:CHANSEL_FAULT channel:0x00 frame:2 vi_tstamp:429725130 data:0x00000100
     kworker/5:2-2736  [005] ...1  1240.080963: rtcpu_vinotify_handle_msg: tstamp:39084432273 tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:2 vi_tstamp:429725873 data:0x08000000
     kworker/5:2-2736  [005] ...1  1240.080964: rtcpu_vinotify_handle_msg: tstamp:39084432372 tag:CHANSEL_FAULT_FE channel:0x01 frame:2 vi_tstamp:429726061 data:0x00000001
     kworker/5:2-2736  [005] ...1  1240.080964: rtcpu_vinotify_handle_msg: tstamp:39084432512 tag:ATOMP_FE channel:0x00 frame:2 vi_tstamp:429726064 data:0x00000000
     kworker/5:2-2736  [005] ...1  1240.184994: rtos_queue_peek_from_isr_failed: tstamp:39087469599 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1240.341045: rtos_queue_peek_from_isr_failed: tstamp:39092470116 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1240.497054: rtos_queue_peek_from_isr_failed: tstamp:39097470636 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1240.653016: rtos_queue_peek_from_isr_failed: tstamp:39102471154 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1240.809010: rtos_queue_peek_from_isr_failed: tstamp:39107471649 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1240.965042: rtos_queue_peek_from_isr_failed: tstamp:39112472167 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1241.121043: rtos_queue_peek_from_isr_failed: tstamp:39117472667 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1241.299473: rtos_queue_peek_from_isr_failed: tstamp:39122473159 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1241.453010: rtos_queue_peek_from_isr_failed: tstamp:39127473688 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1241.609066: rtos_queue_peek_from_isr_failed: tstamp:39132474185 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1241.765040: rtos_queue_peek_from_isr_failed: tstamp:39137474701 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1241.921008: rtos_queue_peek_from_isr_failed: tstamp:39142475198 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1242.077066: rtos_queue_peek_from_isr_failed: tstamp:39147475707 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1242.233028: rtos_queue_peek_from_isr_failed: tstamp:39152476220 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1242.390808: rtos_queue_peek_from_isr_failed: tstamp:39157476720 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1242.544978: rtos_queue_peek_from_isr_failed: tstamp:39162477224 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1242.753024: rtos_queue_peek_from_isr_failed: tstamp:39167477733 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1242.909032: rtos_queue_peek_from_isr_failed: tstamp:39172478240 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1243.065014: rtos_queue_peek_from_isr_failed: tstamp:39177478755 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1243.221014: rtos_queue_peek_from_isr_failed: tstamp:39182479254 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1243.377019: rtos_queue_peek_from_isr_failed: tstamp:39187479768 queue:0x0b4a3c58
     kworker/5:2-2736  [005] ...1  1243.541012: rtos_queue_peek_from_isr_failed: tstamp:39192402256 queue:0x0b4a3c58

We has some concerns below.

  1. 964 EVM configuration doesn’t match with OV490 YUV 422 8bit mode?
  2. Our TX2 BSP modification doens’t match with YUV 422? May be miss some other parts’s modification?
  3. yavta command line YUYV item may not mathc with TX2 requirement?
  4. DTS need more modification to match with OV490 YUV 422 8bit?

Except those error message, is there any other method to help us to narrow down the problem. Or guide us to identify issue?

Peter

Have a try to disable the crc.

https://elinux.org/Jetson_TX2_Camera_BringUp

@ShaneCCC We already try this before and current code already include below change. Doesn’t change anything.

BTW, we are confused by error message. And have no idea where we should focus and narrow down.
We have done deep search within TX2 forum, still cannot get useful guideline and instruction to locate the issue step by step.

diff --git a/drivers/media/platform/tegra/camera/csi/csi4_fops.c b/drivers/media/platform/tegra/camera/csi/csi4_fops.c
index d64294b..9b1eec6 100644
--- a/drivers/media/platform/tegra/camera/csi/csi4_fops.c
+++ b/drivers/media/platform/tegra/camera/csi/csi4_fops.c
@@ -77,8 +77,17 @@ static void csi4_stream_init(struct tegra_csi_channel *chan, int port_num)
        csi4_stream_write(chan, port_num, INTR_STATUS, 0x3ffff);
        csi4_stream_write(chan, port_num, ERR_INTR_STATUS, 0x7ffff);
        csi4_stream_write(chan, port_num, ERROR_STATUS2VI_MASK, 0x0);
-       csi4_stream_write(chan, port_num, INTR_MASK, 0x0);
-       csi4_stream_write(chan, port_num, ERR_INTR_MASK, 0x0);
+       //csi4_stream_write(chan, port_num, INTR_MASK, 0x0);
+       //csi4_stream_write(chan, port_num, ERR_INTR_MASK, 0x0);
+       csi4_stream_write(chan, port_num, INTR_MASK, PH_ECC_MULTI_BIT_ERR |
+                       PD_CRC_ERR_VC0 | PH_ECC_SINGLE_BIT_ERR_VC0);
+       csi4_stream_write(chan, port_num, ERR_INTR_MASK, PH_ECC_MULTI_BIT_ERR |
+                       PD_CRC_ERR_VC0 | PH_ECC_SINGLE_BIT_ERR_VC0);
+       csi4_stream_write(chan, port_num, ERROR_STATUS2VI_MASK,
+                       CFG_ERR_STATUS2VI_MASK_VC0 |
+                       CFG_ERR_STATUS2VI_MASK_VC1 |
+                       CFG_ERR_STATUS2VI_MASK_VC2 |
+                       CFG_ERR_STATUS2VI_MASK_VC3);
 }

What’s the v4l2-ctl --list-formats-ext?
Did you use 28.2.1?

@ShaneCCC yes,we use tegra-l4t-r28.2.1 and JetPack 3.2

BTW, our OV490 driver is fake one without any real register operation. Because OV490 can auto generate stream without any operation.

You mean this command output?

v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'RG10'
	Name        : 10-bit Bayer RGRG/GBGB

Your driver not implement well. The pixel format still RG10 not YUV type

@ShaneCCC Thanks for your point out.

As mentioned before, we refer ov5693 driver can comment all reg operation. Maybe ov5693 can only support RG10.

In my opinion, since our driver don’t operate sensor any more, YUV type still has connection with this fake driver?

Anyway for YUV type, can you point out us some ref driver? We can ref it and check our driver again.

For the YUV sensor you can reference to tc358840.c

@ShaneCCC Thanks. We will learn more tc358840.c.

I also found @101534645 ask “its a rg10,maybe my driver did not push the func, what the func need i implement in driver?”

I also want to wonder which function in tc358840.c let “v4l2-ctl --list-formats-ext” support YUV part?
Then we can focus on that part.

Thanks for your kindly help!

v4l2-ctl --list-formats-ext

This command check all system support sensor type?
Because this command don’t need any special point like “/dev/video0”. I am a little confused why this is related with ov490 special sensor driver?

Should be the tc358840_g_mbus_config() or camera_common_g_mbus_config if reference to ov5693

@ShaneCCC our ov490 already implement camera_common_g_mbus_config like below.

static struct v4l2_subdev_video_ops ov490_subdev_video_ops = {
	.s_stream	= ov490_s_stream,
	.g_mbus_config	= camera_common_g_mbus_config,
	.g_input_status	= ov490_g_input_status,
};

I found camera_common_g_mbus_config only do CSI lane configuration, don’t see any relationship with YUV part.

To summary up, our ov490 is only used to generate /dev/video0, and don’t operate any real registers.
So I am still concern out TX2 BSP part miss something about YUV configuration. But I have no idea where to start to fix, can give more detail instruction.