NX csi-2 video issue,frame rate is lower than mipi input signal

Hi,
I’m using nx csi2-ab port to capture 1080p30fps yuv422 signal,we can got video from /dev/video0,but the video frame rate is always 20.55, it should be 30fps.

how to debug this issue.

Thanks.

Did you try boost the system and NVCSI/VI clocks.

sudo nvpmodel -m 2
sudo jetson-clocks.

sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate

Hi,
I’ve done these setting before test, JP version is 4.4.1

nvidia@nvidia:~$ sudo tegrastats
RAM 2181/7764MB (lfb 895x4MB) CPU [9%@1420,6%@1420,1%@1420,1%@1420,4%@1420,1%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34C thermal@33C VDD_IN 3064/3064 VDD_CPU_GPU_CV 910/910 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [7%@1420,4%@1420,1%@1420,2%@1420,3%@1420,2%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34C thermal@33C VDD_IN 3022/3043 VDD_CPU_GPU_CV 869/889 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [9%@1420,8%@1420,3%@1420,2%@1420,1%@1420,0%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 1% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34C thermal@33C VDD_IN 3064/3050 VDD_CPU_GPU_CV 910/896 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [8%@1420,6%@1420,2%@1420,1%@1420,1%@1420,1%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34.5C thermal@33C VDD_IN 3022/3043 VDD_CPU_GPU_CV 869/889 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [8%@1420,8%@1420,2%@1420,1%@1420,0%@1420,1%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34C thermal@33C VDD_IN 3064/3047 VDD_CPU_GPU_CV 910/893 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [9%@1420,7%@1420,1%@1420,1%@1420,0%@1420,0%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34.5C thermal@33C VDD_IN 3022/3043 VDD_CPU_GPU_CV 869/889 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [8%@1420,10%@1420,3%@1420,3%@1420,0%@1420,0%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34.5C PMIC@100C AUX@31.5C CPU@34C thermal@33C VDD_IN 3022/3040 VDD_CPU_GPU_CV 869/886 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [9%@1420,6%@1420,3%@1420,1%@1420,0%@1420,0%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34.5C thermal@32.95C VDD_IN 3064/3043 VDD_CPU_GPU_CV 869/884 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [9%@1420,4%@1420,0%@1420,3%@1420,2%@1420,1%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34C thermal@33C VDD_IN 3064/3045 VDD_CPU_GPU_CV 910/887 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [9%@1420,7%@1420,0%@1420,1%@1420,4%@1420,0%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 10%@1109 APE 150 MTS fg 0% bg 1% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34.5C thermal@33C VDD_IN 3064/3047 VDD_CPU_GPU_CV 910/889 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [6%@1420,7%@1420,3%@1420,1%@1420,2%@1420,1%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34C thermal@33C VDD_IN 3064/3048 VDD_CPU_GPU_CV 910/891 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [9%@1420,7%@1420,2%@1420,1%@1420,1%@1420,1%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34.5C thermal@33C VDD_IN 3064/3050 VDD_CPU_GPU_CV 910/892 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [8%@1420,5%@1420,2%@1420,1%@1420,2%@1420,2%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34.5C thermal@33C VDD_IN 3105/3054 VDD_CPU_GPU_CV 910/894 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [10%@1420,7%@1420,2%@1420,0%@1420,0%@1420,0%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 1% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34C thermal@33C VDD_IN 3064/3054 VDD_CPU_GPU_CV 910/895 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [10%@1420,7%@1420,0%@1420,0%@1420,2%@1420,2%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 1% AO@32C GPU@34.5C PMIC@100C AUX@31.5C CPU@34.5C thermal@33C VDD_IN 3064/3055 VDD_CPU_GPU_CV 910/896 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [9%@1420,7%@1420,2%@1420,2%@1420,4%@1420,3%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 3% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34.5C thermal@33.15C VDD_IN 3188/3063 VDD_CPU_GPU_CV 993/902 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [7%@1420,6%@1420,0%@1420,1%@1420,2%@1420,0%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 0% AO@32C GPU@34C PMIC@100C AUX@31.5C CPU@34.5C thermal@33.15C VDD_IN 3064/3063 VDD_CPU_GPU_CV 910/902 VDD_SOC 992/992
RAM 2181/7764MB (lfb 895x4MB) CPU [7%@1420,5%@1420,2%@1420,0%@1420,2%@1420,3%@1420] EMC_FREQ 0%@1600 GR3D_FREQ 0%@1109 APE 150 MTS fg 0% bg 1% AO@31.5C GPU@34C PMIC@100C AUX@31.5C CPU@34C thermal@33.15C VDD_IN 3064/3063 VDD_CPU_GPU_CV 910/903 VDD_SOC 992/992

How do you confirm the output frame rate?

our camera apps will print the frame rate every 1s.
is there any standard tool or cmd to confirm frame rate?

I think have scope to make sure the output should be greate.

the same mipi signal,the same app, different frame rate between TX2 and NX. TX2 average frame rata is 29fps,nx only 21fps.

I’m sure that mipi signal is 30fps by using scope to measure.

OK, Could you verify by v4l2-ctl simple pipeline.

v4l2-ctl --stream-mmap

Hi,Shane

v4l2-ctl --stream-mmap needs no /dev/video*?

below is test result

nvidia@nvidia:~$ v4l2-ctl --stream-mmap
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.09 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.04 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.03 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.02 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps

hello,

what is the meaning of --stream-mmap.

update,
run v4l2-ctl --stream-mmap first,
and then restart our camera app, frame rate reached 30fps.

That’s could be some setting didn’t set well by your APP.
–stream-mmap means using memory map