Jetson orgin nano -about imx219 dtb

My board is Jetson Origin Nano, and the sensor module is imx219. If I want to change the supported resolution, what file should I modify? Is it tegra234-camera-rbpcv2-imx219.dtsi. But what files should I replace in the/boot/directory after finishing

ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

[0]: 'RG10' (10-bit Bayer RGRG/GBGB)
	Size: Discrete 3280x2464
		Interval: Discrete 0.048s (21.000 fps)
	Size: Discrete 3280x1848
		Interval: Discrete 0.036s (28.000 fps)
	Size: Discrete 1920x1080
		Interval: Discrete 0.033s (30.000 fps)
	Size: Discrete 1640x1232
		Interval: Discrete 0.033s (30.000 fps)
	Size: Discrete 1280x720
		Interval: Discrete 0.017s (60.000 fps)

For example, I now want mode 0 to change from 3280x2464 to 3000x2000

hello 2668729889,

you should update two files, (1) sensor device tree, and (2) sensor mode table.
for instance,
(1) $public_sources/kernel_src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-camera-rbpcv2-imx219.dtsi
(2) $public_sources/kernel_src/kernel/nvidia/drivers/media/i2c/imx219_mode_tbls.h

may I have actual use-case to revise the sensor init settings?

please also aware that…
besides modify the pixel active region, (i.e. active_w, and active_h). you should also update… line_length, pix_clk_hz, min_exp_time, max_exp_time…etc (both of the (1) sensor device tree, and (2) sensor mode table.) to avoid potential issues.

May I ask what the function of the file tegra234-camera-rbpcv2-imx219.dtsi is?

Before seeing your reply, I have made modifications tegra234-camera-rbpcv2-imx219.dtsi,and will generate the file kernel_tegra234-p3767-0003-p3768-0000-a0.dtb copy to the/boot/dts directory of the development board.
Then use v4l2 ctl – list formats ext d/dev/video0 to check the supported resolutions, and there has been no significant change.

With your help,modified imx219_mode_tbls.h, then replaced nv_ Imx219.ko, the supported resolution has changed

[0]: 'RG10' (10-bit Bayer RGRG/GBGB)

and if i want to change RG10 to RG12,what file i need to change

hello 2668729889,

FYI,
v4l2 standard controls basically parse the sensor driver capability, which checking the sensor kernel mode definition to report the supported formats.
it depends-on your own use-case, please refer to Camera Architecture Stack, you don’t need to bother sensor mode settings in the device tree if you only works with vl42src,
however, if you need camera use-case works with nvarguscamerasrc, you’ll need to have those mode settings as same as your driver definition.

please see-also Device Properties for the csi_pixel_bit_depth.

1 Like

Hello, I have encountered the same issue as this post, but it seems that it has not been resolved

v4l2-ctl -d /dev/video0 --set-fmt-video=width=3280,height=2464,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test1.raw

then I use another command such as :

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test2.raw

those two finnal " testx.raw " are same , the “width” and “height” parameters seem unable to change the final raw data .
It puzzles me a lot.

hello 2668729889,

there’s an optional device tree property, use_sensor_mode_id.
you may enable mode selection via v4l pipeline with adding use_sensor_mode_id = "true"; in DT property.
for instance,
here’s sample pipeline, $ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=RG10 --set-ctrl bypass_mode=0 --set-ctrl sensor_mode=4 --stream-mmap --stream-count=100
it’s --set-ctrl sensor_mode=4 to select 4th sensor mode for streaming, please also note that width/height setting must identical with 4th mode definition.

1 Like

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