MIPI CSi frame rate issue

@JerryChang @ShaneCCC Can anybody help me?

I notice there are some different. For CHANSEL_LOAD_FRAMED channel switch 0x00 to 0x01 for frame:3. Is that the root cause?
I don’t know the meaning of channel:0xXX frame:X. Where I can fount relative info and how to debug it?

tag:CHANSEL_PXL_SOF channel:0x00 frame:3
tag:ATOMP_FS channel:0x00 frame:3
tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:3 
tag:CHANSEL_PXL_EOF channel:0x00 frame:3
tag:ATOMP_FE channel:0x00 frame:3
tag:CHANSEL_PXL_SOF channel:0x00 frame:1
tag:ATOMP_FS channel:0x00 frame:1
tag:CHANSEL_LOAD_FRAMED channel:0x01 frame:1
tag:CHANSEL_PXL_EOF channel:0x00 frame:1
tag:ATOMP_FE channel:0x00 frame:1

hello 53216142,

according to >>> nvhost_syncpt_wait_timeout_ext cost about 75999ns
this means your frame duration is around 76ms, hence your frame-rate is around 13-fps.

your tracing message shows the signaling was correct.
you might need to co-work with your hardware engineer to probe the signaling of TI964 to check and compare the timing, thanks

@JerryChang Thanks for your reply.
I assume TI964 mipi timing meet the spec, since TI964 is already used widely with imx6 etc CPU.
And we also measure TI964 mipi timing, and don’t see any exception. You can find the signal picture at #20

My tracing message show SOF->FS->LOAD_FRAMED->EOF->FE can be detected TX2. But TX2 still report rtos_queue_peek_from_isr_failed error. I guess half irq report isr_failed and half irq passed.

That is the reason why nvhost_syncpt_wait_timeout_ext cost 75999ns.

Is that possible there are some tolerance gap between TX2 and TI964?

Can you also teach me how to debug rtos_queue_peek_from_isr_failed, and where I can found those error message source code? Now I can dig function rtcpu_trace_event etc. But I still have no idea where is tracepoint and what kinds of TX2 VI/NVHOST/etc hardware register I should mointor.

Can you give me more detail debug code?

@JerryChang TI964 mipi Date Lane framerate is correct. 25fps measured by SCOPE

hello 53216142,

BTW, may I know what’s your device tree settings.
for example, could you please share the properties settings, such as pixel clock, mclk, mclk_multiplier.
those settings were also related to frame-rate.
thanks

Hello JerryChang,

Our driver is fake one. That means our driver doesn’t operate any hardware registers. We just use the OV490 and TI964 default settings.

Does pixel clock, mclk, mclk_multiplier items will affect TX2 side, since I use the fake driver?

Anyway here is my relative DTS file part.

i2c@3180000 {
        ov490_d@3d {
			status = "okay";

			devnode = "video0";
			compatible = "nvidia,ov490";
			reg = <0x5c>;
			//compatible = "nvidia,imx219";
			//reg = <0x10>;

			clocks = <&tegra_car TEGRA186_CLK_EXTPERIPH1>;
			clock-names = "extperiph1";
			mclk = "extperiph1";
            reset-gpios = <&tegra_main_gpio CAM0_RST_L GPIO_ACTIVE_HIGH>;
            pwdn-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;


			physical_w = "5.095";
			physical_h = "4.930";

			sensor_model ="imx219";
            mode0 { // IMX219_MODE_1920X1080
                mclk_khz = "24000";
                mclk_multiplier = "25";
                pix_clk_hz = "182400000";
                //pix_clk_hz = "170000000";

                num_lanes = "4";
                tegra_sinterface = "serial_e";
                discontinuous_clk = "yes";
                cil_settletime = "40";
                pixel_t = "bayer_rggb";
                readout_orientation = "270";
                inherent_gain = "1";

                //active_w = "1920";
                //active_h = "1080";
                active_w = "1280";
                active_h = "720";

                line_length = "1920";
                dpcm_enable = "false";

                min_gain_val = "1";
                max_gain_val = "16";
                min_hdr_ratio = "1";
                max_hdr_ratio = "64";
                min_framerate = "1";
                max_framerate = "30";
                min_exp_time = "11";
                max_exp_time = "683709";
                //embedded_metadata_height = "2";
            };
            mode1 { // IMX219_MODE_1280X720
                mclk_khz = "24000";
                mclk_multiplier = "25";
                pix_clk_hz = "182400000";
                //pix_clk_hz = "170000000";

                num_lanes = "4";
                tegra_sinterface = "serial_e";
                discontinuous_clk = "yes";
                cil_settletime = "40";
                pixel_t = "bayer_rggb";
                readout_orientation = "270";
                inherent_gain = "1";

                active_w = "1280";
                active_h = "720";

                line_length = "1920";
                dpcm_enable = "false";
                //line_length = "1752";

                min_gain_val = "1";
                max_gain_val = "16";
                min_hdr_ratio = "1";
                max_hdr_ratio = "64";
                min_framerate = "1";
                max_framerate = "60";
                //min_exp_time = "16";
                min_exp_time = "13";
                max_exp_time = "683709";
                //embedded_metadata_height = "2";
            };
            mode2 { // IMX219_MODE_640X480

                mclk_khz = "24000";
                mclk_multiplier = "25.0";
                pix_clk_hz = "182400000";

                num_lanes = "4";
                tegra_sinterface = "serial_e";
                discontinuous_clk = "yes";
                cil_settletime = "40";
                pixel_t = "bayer_rggb";
                readout_orientation = "270";
                inherent_gain = "1";

                active_w = "640";
                active_h = "480";

                line_length = "1920";
                dpcm_enable = "false";

                min_gain_val = "1.0";
                max_gain_val = "16";
                min_hdr_ratio = "1";
                max_hdr_ratio = "64";
                min_framerate = "1";
                max_framerate = "90";
                //min_exp_time = "22";
                min_exp_time = "11";
                max_exp_time = "358733";
                //embedded_metadata_height = "2";
            };

hello 53216142,

actually, you should configure the signal properties settings correctly,
since kernel drivers refer to these and configure the clock rates dynamically.
thanks

Thanks for you reply.

Where I should to check? TX2 side or 964 side?

You mean kernel drivers, can you specify more ?

@53216142 did you ever figure out how to debug or find root source of rtos_queue_peek_from_isr_failed? I’m bringing up a yuv camera and see the same issue in jetpack 4.2.x

I should also say I’ve looked at the trace log and see frames skipped.

via the trace log the time between the two frames does look correct.

We have prepared a project which detects a particular object and uniquely keeps a count of it through out the video-feed. We have a setup where the camera is facing the laptop which plays a video on loop, the problem that we’re facing is, after a certain duration the count of the object keeps on decreases at a random interval. Lets say initially its around 300 after couple of days its around 100 and as mentioned above it is detecting and counting the same object with the same looped video.

The project has Jetson TX2 with MIPI CSI Camera along with latest Jetpack and TensorRT.

Is there any issue with the hardware’s used?
Is FPS a key aspect? its around 10. Is it ok?
Does anything in our setup is causing the above mentioned issue?
Will FPS count decrease after certain period of time due to hardware limitation ? Is there any such possibility?

Thanks in advance.