Orin JetPack5.1.3 output csi_stream_tpg_disable: failed to send IVC control message

Hi every,
I use Orin module the BSP is R35.5.0. When I colse /dev/video* device the kernel output error log

tegra194-vi5 13e40000.host1x:vi1@14c00000: csi_stream_tpg_disable: failed to send IVC control message

How to fix it? Thanks.

Do you use nvhost-vi-tpg-t19x.ko TPG?

No, I don’t use nvhost-vi-tpg-t19x.ko. The module installed as below:

ubuntu@ubuntu:~/Downloads$ lsmod 
Module                  Size  Used by
nvidia_modeset       1093632  3
fuse                  118784  3
lzo_rle                16384  64
lzo_compress           16384  1 lzo_rle
zram                   32768  8
ramoops                28672  0
reed_solomon           20480  1 ramoops
snd_soc_tegra186_asrc    36864  0
snd_soc_tegra210_ope    32768  0
snd_soc_tegra210_iqc    16384  0
snd_soc_tegra186_dspk    20480  0
snd_soc_tegra186_arad    24576  1 snd_soc_tegra186_asrc
snd_soc_tegra210_mvc    20480  0
snd_soc_tegra210_afc    20480  0
snd_soc_tegra210_dmic    20480  0
snd_soc_tegra210_adx    28672  0
snd_soc_tegra210_amx    32768  0
snd_soc_tegra210_i2s    24576  0
snd_soc_tegra210_mixer    45056  0
snd_soc_tegra210_admaif   118784  0
snd_soc_tegra210_sfc    57344  0
snd_soc_tegra_pcm      16384  1 snd_soc_tegra210_admaif
aes_ce_blk             36864  0
crypto_simd            24576  1 aes_ce_blk
cryptd                 24576  1 crypto_simd
aes_ce_cipher          20480  1 aes_ce_blk
ghash_ce               28672  0
sha2_ce                20480  0
sha256_arm64           28672  1 sha2_ce
sha1_ce                20480  0
snd_soc_tegra210_adsp   753664  0
loop                   36864  1
snd_soc_tegra_machine_driver    16384  0
i40e                  364544  0
snd_soc_tegra_utils    28672  3 snd_soc_tegra210_admaif,snd_soc_tegra_machine_driver,snd_soc_tegra210_adsp
nvadsp                110592  1 snd_soc_tegra210_adsp
snd_soc_simple_card_utils    24576  1 snd_soc_tegra_utils
leds_gpio              16384  0
snd_soc_spdif_tx       16384  0
snd_soc_tegra210_ahub  1257472  2 snd_soc_tegra210_ope,snd_soc_tegra210_sfc
nct1008                24576  0
i2c_nvvrs11            16384  0
tegra_bpmp_thermal     16384  0
snd_hda_codec_hdmi     57344  1
tegra210_adma          28672  2 snd_soc_tegra210_admaif,snd_soc_tegra210_adsp
userspace_alert        16384  0
snd_hda_tegra          16384  0
snd_hda_codec         118784  2 snd_hda_codec_hdmi,snd_hda_tegra
snd_soc_rt5640        114688  0
snd_hda_core           81920  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_tegra
snd_soc_rl6231         16384  1 snd_soc_rt5640
nvidia               1327104  7 nvidia_modeset
binfmt_misc            24576  1
ina3221                24576  0
pwm_fan                24576  0
nvgpu                2510848  16
nvmap                 192512  59 nvgpu
ip_tables              36864  0
x_tables               49152  1 ip_tables

What’s command to see this message?
Does v4l2-ctl able to reproduce the problem?

I use v4l2-ctl test it also output the error log.
I track the driver souce code, when close /dev/video* device the error log output by

static int csi_stream_tpg_disable()

fucntion which in kernel/nvidia/drivers/media/platform/tegra/camera/fusa-capture/capture-vi.c file.
I dump stack as below:

[   92.995127] Call trace:
[   92.995138]  dump_backtrace+0x0/0x1e0
[   92.995140]  show_stack+0x30/0x40
[   92.995146]  dump_stack+0xf0/0x130
[   92.995150]  csi_stream_tpg_disable+0x64/0xe0
[   92.995155]  csi_stream_release+0xa0/0xd0
[   92.995157]  vi_capture_shutdown+0x4c/0x100
[   92.995158]  vi_channel_close_ex+0x30/0x90
[   92.995160]  vi_channel_release+0x30/0x40
[   92.995163]  __fput+0x80/0x260
[   92.995165]  ____fput+0x24/0x30
[   92.995168]  task_work_run+0x88/0xe0
[   92.995170]  do_notify_resume+0x24c/0x990
[   92.995172]  work_pending+0xc/0x738

Suppose this function csi_stream_tpg_disable() should not be called for normal sensors.

HI ShaneCCC,
The fuction call as below:


void vi_capture_shutdown(
	struct tegra_vi_channel *chan)
{
	struct vi_capture *capture = chan->capture_data;

	dev_dbg(chan->dev, "%s--\n", __func__);
	if (capture == NULL)
		return;

	if (capture->channel_id != CAPTURE_CHANNEL_INVALID_ID)
		vi_capture_reset(chan,
			CAPTURE_CHANNEL_RESET_FLAG_IMMEDIATE);

	if (capture->stream_id != NVCSI_STREAM_INVALID_ID)
		csi_stream_release(chan);

      // some codes
}

int csi_stream_release(
	struct tegra_vi_channel *chan)
{
	struct vi_capture *capture = chan->capture_data;
	int err = 0;

	if (capture->stream_id == NVCSI_STREAM_INVALID_ID)
		return 0;

	if (capture->virtual_channel_id != NVCSI_STREAM_INVALID_TPG_VC_ID) {
		err = csi_stream_tpg_disable(chan);
		if (err < 0) {
			dev_err(chan->dev,
				"%s: failed to disable nvcsi tpg on stream %u virtual channel %u\n",
				__func__, capture->stream_id,
				capture->virtual_channel_id);
			return err;
		}
	}

In csi_stream_release() fuction capture->channel_id is [0-15], csi_stream_tpg_disable(chan) could be called.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

What’s command to see the problem?

I didn’t see the problem by below command.

nvidia@tegra-ubuntu:~$ v4l2-ctl --stream-mmap -c bypass_mode=0
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<^C
nvidia@tegra-ubuntu:~$ sudo dmesg | grep -i tpg
nvidia@tegra-ubuntu:~$