TX1 image capture (cudaHistogram ) halts in full resolution

Hello,

We are using the Jetson TX1 Development kit along with the IMX 377 sensor kit for Leopard imaging. We have the TX1 running JetPack 3.1 image with the drivers provided by Leopard imaging integrated.

When trying to run the cudaHistogram sample of the ArgusLib at 1920x1080 resolution the sample is runs well.

When the resolution is increased to 4104x3046 (imaxx377 maximum) the sample always freezes after acquisition of the 63rd frame.

We see that the problem occurs at the line below.

cuResult = cuEGLStreamConsumerAcquireFrame(&cudaConnection, &cudaResource, &cudaStream, -1);

Any ideas how to debug the issue or a a solution ? This is critical for our application as we need to acquire images and run algorithms in maximum resolution using CUDA.

Thank you in advance for your assistance.

Hi pavlos,
Does standard 4K 3840x2160 work?
Does other Argus samples work in the resolution?

@pavlos
Does it freezes at 63rd frame every time?

Hello,

For the maximum resolution it always freezes at the same frame.

Let me run some tests with other resolutions and get back to you.

Hello again,

I tried standard 4K resolution and it works fine.

It always gets stuck on the 63rd frame on maximum resolution. Is it possible that the TX1 cannot support such resolutions for fast frame capture ?

Hi pavlos,
Have you tried tegra_multimedia_api\samples\10_camera_recording ?
Please run with ‘-d 5 -r 4104x3046’

Also are you able to run v4l2-ctl command in 4104x3046?

Hello again,

I tried the camera_recording and v4l2-ctl apps with full resolution and we are having issues as well.

Looking deeper into the IMX377 driver that was supplied by Leopard imaging I noticed the following.

In the imx377.c file I have the definitions below.

#define IMX377_DEFAULT_WIDTH 4104
#define IMX377_DEFAULT_HEIGHT 3062

In the imx377_mode_tbls.h file I have

/*

  • imx377 crop(refer to datasheet) register configuration with
  • 1920x1080 resolution 30fps, raw10 data and mipi four lane output
    */
    static imx377_reg imx377_3840X3046_crop_30fps

static const struct camera_common_frmfmt imx377_frmfmt = {
{{4104, 3046}, imx377_30fps, 1, 0,
IMX377_MODE_3840X3046_CROP_30FPS},
};

And finally in the imx377 dtsi file I have

mode0 {/mode IMX377_MODE_4104X3046_CROP_30FPS/
mclk_khz = “24000”;
num_lanes = “4”;
tegra_sinterface = “serial_a”;
discontinuous_clk = “yes”;
dpcm_enable = “false”;
cil_settletime = “0”;
dynamic_pixel_bit_depth = “12”;
csi_pixel_bit_depth = “12”;
mode_type = “bayer”;
pixel_phase = “rggb”;

active_w = "4104";
active_h = "3046";
readout_orientation = "0";
line_length = "6000";
inherent_gain = "1";
mclk_multiplier = "100";
pix_clk_hz = "576000000";

min_gain_val = "0"; 
max_gain_val = "1957"; 
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "1.5";
max_framerate = "30";
min_exp_time = "83";
max_exp_time = "66600";
embedded_metadata_height = "2";

};

Right now I am a bit confused as to what the default or maximum resolution the camera driver supports.

Do the above seem correct to you or should I contact Leopard imaging for more information ?

hello pavlos.stavrou,

  1. you should also check the sensor specification for total data rate.
    please also refer to below formula for the pixel clock,
pixel clock = mclk * PLL Multipler
  1. could you please share the commands you’re used.

Hello,

  1. Do you believe that the pixel clock is set too high or too low ? I am trying to undestand the reasoning behind this. Do you think that the problem occurs due to low bandwidth ?

  2. I tried the camera_recording sample with the arguments you suggested.

Then I run :
v4l2-ctl --set-fmt-video=width=4104,height=3046,pixelformat=RG12 --stream-mmap -set-ctrl=sensor_mode=0 --stream-count=100 -d /dev/video0

hello pavlos.stavrou,

please check [NVIDIA Tegra Linux Driver Package]-> [Release 28.2 Development Guide]-> [Camera Development]-> [Sensor Driver Programming Guide] for the properties descriptions.

you should following the sensor specification to configure the pixel clock, it’s general formula in comment #8
you may also contact your sensor vendor for more details.

BTW, did you mean you also gets stuck on the 63rd frame with below command?

v4l2-ctl --set-fmt-video=width=4104,height=3046,pixelformat=RG12 --stream-mmap -set-ctrl=sensor_mode=0 --stream-count=100 -d /dev/video0

I will review the sensor driver programming guide and get back to you.

Yes with v4l2-ctl command it gets stuck again.

We have another issue with the same setup that is reported here :

[url]https://devtalk.nvidia.com/default/topic/1042749/jetson-tx1/cuda-histogram-sample-consumes-too-much-memory/[/url]

Could they be related ?

hello pavlos.stavrou,

please check the [Camera Architecture Stack] from [NVIDIA Tegra Linux Driver Package]-> [Release 28.2 Development Guide]-> [Camera Development]-> [Camera Software Development Solution]
v4l2-ctl and argus were going through different path.
since you’re not able to launch it via v4l2 standard control with full resolution, it should not be related to Topic 1042749
please review your sensor device tree settings, they should follow the sensor specification.
thanks