Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not see grey pixel formate on R35.4.1 #131

Open
Ray9090 opened this issue Jan 24, 2025 · 2 comments
Open

Can not see grey pixel formate on R35.4.1 #131

Ray9090 opened this issue Jan 24, 2025 · 2 comments

Comments

@Ray9090
Copy link

Ray9090 commented Jan 24, 2025

I am using R354.1 on Jetson Orin Nano Devkit using Yocto build tools and IMX 252 camera. I found out there is only one-pixel format. First, I tried to set it from the terminal 'v4l2-ctl -d /dev/video0 --set-fmt-video=pixelformat=GREY'. Later I see in tegra234-camera-vc-mipi-cam.dtsi, the pixel_phase = "rggb";

I have set it to 'grey' and flashed the image, but it stuck on the flashing process.

Should not there be a formate list? (like mention as Image Streaming in GREY, Y10, Y12, SRGGB8, SRGGB10, SRGGB12, SGBRG8, SGBRG10, SGBRG12 format). If not, then did I do right?

@Ray9090
Copy link
Author

Ray9090 commented Jan 28, 2025

Sometimes, it flashed but the vc driver can not initialized and got this

root@jetson-orin-nano-devkit-nvme:~# dmesg | grep vc_mipi
[ 5.031067] vc_mipi 9-001a: vc_probe(): Probing UNIVERSAL VC MIPI Driver (v0.18.0)
[ 5.406598] vc_mipi 9-001a: vc_init_io(): Init trigger and flash mode
[ 5.420527] vc_mipi 9-001a: vc_init_frmfmt(): Init frame (width: 2048, height: 1536, fps: 0)
[ 5.420534] vc_mipi 9-001a: vc_init_binning(): Init binning modes
[ 5.450963] vc_mipi 9-001a: Unsupported pixel format
[ 5.455950] vc_mipi 9-001a: Failed to read mode0 image props
[ 5.461727] vc_mipi 9-001a: Could not initialize sensor properties.
[ 5.468026] vc_mipi 9-001a: Failed to initialize vc_mipi
[ 5.473538] vc_mipi 9-001a: vc_probe(): Tegra camera device registration failed
[ 5.486434] vc_mipi 10-001a: vc_probe(): Probing UNIVERSAL VC MIPI Driver (v0.18.0)
[ 5.877066] vc_mipi 10-001a: vc_init_io(): Init trigger and flash mode
[ 5.897016] vc_mipi 10-001a: vc_init_frmfmt(): Init frame (width: 2048, height: 1536, fps: 0)
[ 5.905329] vc_mipi 10-001a: vc_init_binning(): Init binning modes
[ 5.917056] vc_mipi 10-001a: Unsupported pixel format
[ 5.922303] vc_mipi 10-001a: Failed to read mode0 image props
[ 5.927905] vc_mipi 10-001a: Could not initialize sensor properties.
[ 5.934292] vc_mipi 10-001a: Failed to initialize vc_mipi
[ 5.939631] vc_mipi 10-001a: vc_probe(): Tegra camera device registration failed

@bazo80
Copy link
Collaborator

bazo80 commented Feb 19, 2025

Hello @Ray9090 ,

sorry for the late response.
The v4l2-ctl call

v4l2-ctl --list-formats-ext

will only show the formats which are defined in the device-tree modeX.

For the IMX252 you could extend your dtsi settings by two additional modes

                                mode0 {

...
//                                        mode_type                = "bayer";
//                                        pixel_phase              = "rggb";
                                        csi_pixel_bit_depth      = "10";
                                        pixel_t                  = "y10";
...
                                };

                                mode1 {
...
//                                        mode_type                = "bayer";
//                                        pixel_phase              = "rggb";
                                        csi_pixel_bit_depth      = "12";
                                        pixel_t                  = "y12";
...
                                };

                                mode2 {
...
//                                        mode_type                = "bayer";
//                                        pixel_phase              = "rggb";
                                        csi_pixel_bit_depth      = "8";
                                        pixel_t                  = "gray";
...
                                };

Although the pixel_t is marked as deprecated in the NVIDIAs developer guide, it is still in use. The csi_pixel_bit_depth is an obligation, but the mode_type and the pixel_phase can be left out when the pixel_t is given.

My IMX568 output:

vc@nvidia:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'GREY' (8-bit Greyscale)
		Size: Discrete 2464x2064
			Interval: Discrete infs (0.000 fps)
	[1]: 'Y10 ' (10-bit Greyscale)
		Size: Discrete 2464x2064
			Interval: Discrete infs (0.000 fps)
	[2]: 'Y12 ' (12-bit Greyscale)
		Size: Discrete 2464x2064
			Interval: Discrete infs (0.000 fps)

Be aware, the --list-formats-ext call doesn't reflect the modeX order.

After that dtsi changes you can call:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=2048,height=1536,pixelformat="GREY" --stream-mmap
v4l2-ctl -d /dev/video0 --set-fmt-video=width=2048,height=1536,pixelformat="Y10 " --stream-mmap
v4l2-ctl -d /dev/video0 --set-fmt-video=width=2048,height=1536,pixelformat="Y12 " --stream-mmap

best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants