Error when streaming camera

I am getting the following error when streaming data from a camera:

vi 54080000.vi: tegra_channel_error_status(): index=0: TEGRA_VI_CSI_ERROR_STATUS=0x00000004 - bits 3-0: h>,<, w>,<

What does this error mean and what might be causing it?

Could you enable the debug print in csi2_fops.c to check the REG dump.

Hi, Thanks for responding.
I believe I enabled dev_dbg for csi2_fops,c with this command:

echo 'file csi2_fops.c +p' > /sys/kernel/debug/dynamic_debug/control

but it only added three extra messages, non of which were register dumps:

[ 363.878279] vi 54080000.vi: Calibrate csi port 5

[ 363.947901] vi 54080000.vi: cil_settingtime was autocalculated
[ 363.947908] vi 54080000.vi: csi clock settle time: 13, cil settle time: 10

I couldn’t see any obvious register dump in that file. Is there something else I should have done?

Thanks

Have confirm by below command.

root@ubuntu:/sys/kernel/debug/dynamic_debug# cat control | grep -i tegra_csi
/dvs/git/dirty/git-master_linux/kernel/nvidia/drivers/media/platform/tegra/camera/csi/csi2_fops.c:111 [csi2_fops]tegra_csi_status =_ "TEGRA_CSI_PIXEL_PARSER_STATUS 0x%08x\012"
/dvs/git/dirty/git-master_linux/kernel/nvidia/drivers/media/platform/tegra/camera/csi/csi2_fops.c:115 [csi2_fops]tegra_csi_status =_ "TEGRA_CSI_CIL_STATUS 0x%08x\012"
/dvs/git/dirty/git-master_linux/kernel/nvidia/drivers/media/platform/tegra/camera/csi/csi2_fops.c:119 [csi2_fops]tegra_csi_status =_ "TEGRA_CSI_CILX_STATUS 0x%08x\012"

root@ubuntu:/sys/kernel/debug/dynamic_debug# echo file csi2_fops.c +p > control

root@ubuntu:/sys/kernel/debug/dynamic_debug# cat control | grep -i tegra_csi
/dvs/git/dirty/git-master_linux/kernel/nvidia/drivers/media/platform/tegra/camera/csi/csi2_fops.c:111 [csi2_fops]tegra_csi_status =p "TEGRA_CSI_PIXEL_PARSER_STATUS 0x%08x\012"
/dvs/git/dirty/git-master_linux/kernel/nvidia/drivers/media/platform/tegra/camera/csi/csi2_fops.c:115 [csi2_fops]tegra_csi_status =p "TEGRA_CSI_CIL_STATUS 0x%08x\012"
/dvs/git/dirty/git-master_linux/kernel/nvidia/drivers/media/platform/tegra/camera/csi/csi2_fops.c:119 [csi2_fops]tegra_csi_status =p "TEGRA_CSI_CILX_STATUS 0x%08x\012"

``

I spent a bit of time investigating why no debug info was being output.

The CSI registers are output by the function “tegra_csi_status” in nvidia/drivers/media/platform/tegra/camera/csi/csi2_fops.c. The error I am getting is printed by the function “tegra_channel_error_status” in nvidia/drivers/media/platform/tegra/camera/vi/vi2_fops.c, which does not call “tegra_csi_status”, which explains why the register data is not printed.

I added a call to “tegra_csi_status” and rebuilt the kernel. The output is as follows:

[ 374.294073] vi 54080000.vi: cil_settingtime was autocalculated
[ 374.294079] vi 54080000.vi: csi clock settle time: 13, cil settle time: 10
[ 374.294101] vc_mipi 8-001a: imx_set_mode: fmt_width,fmt_height=1440,1080 pix_fmt=0x59455247 ‘GREY’, err=0
[ 374.294109] vc_mipi 8-001a: imx_set_gain: Set gain = 0
[ 374.304001] vc_mipi 8-001a: vmax (HW) = 1130
[ 374.304005] vc_mipi 8-001a: vMax = 1130
[ 374.306435] vc_mipi 8-001a: hmax (HW) = 0
[ 374.306439] vc_mipi 8-001a: h1 = 0
[ 374.306443] vc_mipi 8-001a: 1H units= 196 vMax= 1130 exp_time= 800 us
[ 374.306446] vc_mipi 8-001a: SHS = 934 vMax= 1130 exp_time= 800 us
[ 374.328657] vc_mipi 8-001a: SHS 24bit
[ 374.328662] vc_mipi 8-001a: imx_set_exposure: Set exposure=800
[ 374.328666] vc_mipi 8-001a: imx_set_frame_rate: frame_rate=200
[ 374.328670] vc_mipi 8-001a: imx_set_frame_length : FIXED frame length = 1080 TO 1130
[ 374.437720] vc_mipi 8-001a: imx_start_streaming: sensor_ext_trig=0 flash_output=1, ret=0
[ 374.440738] vi 54080000.vi: tegra_csi_status(): chan->numports=1
[ 374.440743] vi 54080000.vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000000
[ 374.440748] vi 54080000.vi: TEGRA_CSI_CIL_STATUS 0x00000000
[ 374.440752] vi 54080000.vi: TEGRA_CSI_CILX_STATUS 0x00000000
[ 374.440758] vi 54080000.vi: tegra_csi_status(): chan->numports=1
[ 374.440761] vi 54080000.vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000000
[ 374.440765] vi 54080000.vi: TEGRA_CSI_CIL_STATUS 0x00000000
[ 374.440769] vi 54080000.vi: TEGRA_CSI_CILX_STATUS 0x00000000
[ 374.445836] vi 54080000.vi: tegra_channel_error_status(): index=0: TEGRA_VI_CSI_ERROR_STATUS=0x00000004 - bits 3-0: h>,<, w>,<
[ 374.445840] vi 54080000.vi: tegra_csi_status(): chan->numports=1
[ 374.445844] vi 54080000.vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000080
[ 374.445848] vi 54080000.vi: TEGRA_CSI_CIL_STATUS 0x00000000
[ 374.445851] vi 54080000.vi: TEGRA_CSI_CILX_STATUS 0x00000000
[ 374.445857] vi 54080000.vi: tegra_csi_status(): chan->numports=1
[ 374.445860] vi 54080000.vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000000
[ 374.445864] vi 54080000.vi: TEGRA_CSI_CIL_STATUS 0x00000000
[ 374.445867] vi 54080000.vi: TEGRA_CSI_CILX_STATUS 0x00000000
[ 374.450950] vi 54080000.vi: tegra_channel_error_status(): index=0: TEGRA_VI_CSI_ERROR_STATUS=0x00000004 - bits 3-0: h>,<, w>,<
[ 374.450954] vi 54080000.vi: tegra_csi_status(): chan->numports=1
[ 374.450958] vi 54080000.vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000080
[ 374.450961] vi 54080000.vi: TEGRA_CSI_CIL_STATUS 0x00000000
[ 374.450964] vi 54080000.vi: TEGRA_CSI_CILX_STATUS 0x00000000
[ 374.450970] vi 54080000.vi: tegra_csi_status(): chan->numports=1
[ 374.450973] vi 54080000.vi: TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000000
[ 374.450976] vi 54080000.vi: TEGRA_CSI_CIL_STATUS 0x00000000
[ 374.450979] vi 54080000.vi: TEGRA_CSI_CILX_STATUS 0x00000000

Does this give any hints?

I appreciate the help.

The TEGRA_CSI_PIXEL_PARSER_STATUS 0x00000080 tell short frame. That tell the sensor output size doesn’t as expect(report by driver)

PPA_SHORT_FRAME: Set when CSI-PPA receives a short frame. This bit gets set even if
CSI_PPA_PAD_FRAME specifies that short frames are to be padded to the correct line length.

Hi Shane, Thanks for responding.

Does this mean that I can ignore the error id CSI_PPA_PAD_FRAME is enabled? (I think the driver would need to be modified to do this.)

I would suggest to modify the sensor driver to report less line(height) for it.

This was fixed by reducing the line width.

Thanks for your help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.