Hello Community,
I would like to continue my previous discussion about disabling the CRC check in order to verify the FPGA simulating the IMX219.
Below are the steps :
Step 1 : Replace the TRCPU firmware with the one shared here then flash the board :
khang@NUC8i7HVK $ fd rtcpu /home/khang/Workspace/Ref/Platforms/Nvidia/Jetson/sdk_install/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/
/home/khang/Workspace/Ref/Platforms/Nvidia/Jetson/sdk_install/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/bootloader/camera-rtcpu-t194-rce.img.orig
/home/khang/Workspace/Ref/Platforms/Nvidia/Jetson/sdk_install/JetPack_5.1.2_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/bootloader/camera-rtcpu-t194-rce.img
Step 2 : Patch the relevant CSI driver and build the kernel :
diff --git a/kernel/nvidia/drivers/media/platform/tegra/camera/nvcsi/csi5_fops.c b/kernel/nvidia/drivers/media/platform/tegra/camera/nvcsi/csi5_fops.c
index b104ab3eb..f4977142b 100644
--- a/kernel/nvidia/drivers/media/platform/tegra/camera/nvcsi/csi5_fops.c
+++ b/kernel/nvidia/drivers/media/platform/tegra/camera/nvcsi/csi5_fops.c
@@ -219,8 +219,10 @@ static int csi5_stream_set_config(struct tegra_csi_channel *chan, u32 stream_id,
struct CAPTURE_CONTROL_MSG msg;
struct nvcsi_brick_config brick_config;
struct nvcsi_cil_config cil_config;
+ struct nvcsi_error_config error_config;
u32 phy_mode = read_phy_mode_from_dt(chan);
bool is_cphy = (phy_mode == CSI_PHY_MODE_CPHY);
+
dev_dbg(csi->dev, "%s: stream_id=%u, csi_port=%u\n",
__func__, stream_id, csi_port);
@@ -290,6 +292,12 @@ static int csi5_stream_set_config(struct tegra_csi_channel *chan, u32 stream_id,
else
cil_config.mipi_clock_rate = csi->clk_freq / 1000;
+ /* Error config */
+ memset(&error_config, 0, sizeof(error_config));
+ error_config.stream_intr_mask_lic = 0x3;
+ error_config.stream_intr_mask_hsm = 0x3;
+ error_config.status2vi_notify_mask = 0xFFFF;
+
/* Set NVCSI stream config */
memset(&msg, 0, sizeof(msg));
msg.header.msg_id = CAPTURE_CSI_STREAM_SET_CONFIG_REQ;
@@ -298,6 +306,8 @@ static int csi5_stream_set_config(struct tegra_csi_channel *chan, u32 stream_id,
msg.csi_stream_set_config_req.csi_port = csi_port;
msg.csi_stream_set_config_req.brick_config = brick_config;
msg.csi_stream_set_config_req.cil_config = cil_config;
+ msg.csi_stream_set_config_req.error_config = error_config;
+ msg.csi_stream_set_config_req.config_flags = NVCSI_CONFIG_FLAG_BRICK | NVCSI_CONFIG_FLAG_CIL | NVCSI_CONFIG_FLAG_ERROR;
if (tegra_chan->valid_ports > 1)
vi_port = (stream_id > 0) ? 1 : 0;
Step 3 : Replace the kernel, module and device-tree manually on the running board. However, there was still following error (similar to prior disabling the CRC check) :
v4l2-ctl-2929 [001] .... 1281.006004: tegra_channel_close: vi-output, imx219 8-0010
v4l2-ctl-2929 [001] .... 1281.006123: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-2929 [001] .... 1281.006125: tegra_channel_set_stream: imx219 8-0010 : 0x0
v4l2-ctl-2929 [001] .... 1281.006607: tegra_channel_set_stream: 13e10000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-2929 [001] .... 1281.006610: csi_s_stream: enable : 0x0
v4l2-ctl-2929 [001] .... 1281.010197: tegra_channel_set_power: imx219 8-0010 : 0x0
v4l2-ctl-2929 [001] .... 1281.010206: camera_common_s_power: status : 0x0
v4l2-ctl-2929 [001] .... 1281.015671: tegra_channel_set_power: 13e10000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-2929 [001] .... 1281.015674: csi_s_power: enable : 0x0
kworker/2:0-2752 [002] .... 1281.057644: rtcpu_nvcsi_intr: tstamp:40895916805 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057645: rtcpu_nvcsi_intr: tstamp:40895916805 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057646: rtcpu_nvcsi_intr: tstamp:40895918010 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057646: rtcpu_nvcsi_intr: tstamp:40895918010 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057647: rtcpu_nvcsi_intr: tstamp:40895919213 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057647: rtcpu_nvcsi_intr: tstamp:40895919213 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057648: rtcpu_nvcsi_intr: tstamp:40895920415 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057648: rtcpu_nvcsi_intr: tstamp:40895920415 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057649: rtcpu_nvcsi_intr: tstamp:40895921618 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057649: rtcpu_nvcsi_intr: tstamp:40895921618 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/2:0-2752 [002] .... 1281.057650: rtcpu_nvcsi_intr: tstamp:40895922823 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
It looks like that the CRC check was not disabled at all. I wonder if either the given RCTU firmware or my patch for csi5_fops.c did not work. Could someone help, please ?
Best Regards,
Khang