-
Notifications
You must be signed in to change notification settings - Fork 31
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't set "gray", "y10" or "y12" pixel formats in device tree modes if LINUX_VERSION >= 500 #52
Comments
Hello @taldhous-imetrum, you are right, the multiple modes are necessary for the newer v4l2 versions in order to switch the formats. The former v4l2 versions could set different formats without having multiple device-tree modes. Your proposal of taking the pixel_t into the jetpack 5 versions sounds reasonable. It would simplify the dtsi at this point. But on the other hand, if the pixel_t variable will be discontinued by nvidia one day, there must be an additional patch in order to ensure the functionalty in future. We would like to discuss your proposal internally. Thank you :) |
On NVIDIA L4T 32.7.3 with my modified device tree with multiple modes, the system registers the IMX250 camera correctly, and v4l2-ctl lists available formats:
and is able to grab a valid image:
On NVIDIA L4T 35.3.1, everything behaves as above, but the saved image is corrupt and cannot be used. |
Did you speed up the clock settings?
This script is residing in the target folder of the project and should be copied to your device (necessary for L4T35.x versions). |
Perfect! I had not run that script. Doing so fixes my problem on L4T 35.3.1. To satisfy my curiosity, why is this script needed on L4T 35.x but not earlier versions? Many thanks! |
There is a bunch of threads in the nvidia board dealing with this topic. |
In order to have a choice of image formats for a connected camera in V4L2, I have found that there have to be multiple modes in the device tree - one for each image format supported by the camera. The formats included in the modes are listed by the command
Is this expected behaviour?
In the mode section of the device tree, before Linux V500, the field pixel_t was used to specify the image format. After Linux V500 this was split into three fields, "mode_type", "pixel_phase" and "csi_pixel_bit_depth".
It is not possible to specify the pixel formats "gray", "y10" or "y12" using the new fields "mode_type", "pixel_phase" and "csi_pixel_bit_depth" because in the code*, they are combined into a pixel format string that contains an underscore character. (The above example would be "bayer_rggb10".) The field "csi_pixel_bit_depth" is required by other code so must be present.
The code will prefer to read the "pixel_t" if it is present, so a work around seems to be to include both the "pixel_t" fields
and the other fields:
ret = sprintf(pix_format, "%s_%s%d", mode_str, phase_str, depth);
The text was updated successfully, but these errors were encountered: