v4l2 utility checks from the driver side, normally checking with camera_common_frmfmt to report the sensor capability to user-space.
please give it a try to revise the driver definition as same as your sensor output accordingly.
I am always very grateful for your quick responses.
There is progress while debugging.
After setting lane_polarity = “2”
SOF,EOF,FS,FE received.
However, the error below still exists.
After searching the forum, it was said that it was an issue related to sensor settings.
I need your help.
Please tell us what the problem is in the error message below and the attached log.
46.173222] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 46.208080] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 46.243003] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
FYI, we’ve review your waveform measurement, and it looks correct.
please see-also Topic 295598 and Topic 292692,
such white line corruption is JP-6 release version known issue. it’s under investigation now.
the abnormal frame should only repo’ed via VI mode, it should not seen by going through LibArgus.
or, it could also be workaround by dropping some frames, i.e. --stream-skip options.
for instance, issue gone if you try skip frames (as many as possible) to dump a raw file via v4l2. $ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-skip=999 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=/tmp/frame1920x1080.raw
regrading to your half frame capture results. is the sensor side outputting with interlace mode?
please try double check the setting to configure as progressive video for verification.
Hello Jerry Chang
IThank you for your prompt response each time.
I have confirmed that MIPI data is being received correctly. However, because the Data Type (DT) does not match, the screen cannot be captured correctly. To set the MIPI DT to RAW8 and capture images, I want to set the camera’s image format to GRAY8, Y8, or Y16. However, when I set the DT accordingly and add the code *format = V4L2_PIX_FMT_GREY; in the extract_pixel_format function of W:\Linux_for_Tegra\source\nvidia-oot\drivers\media\platform\tegra\camera\sensor_common.c, the camera fails to probe and the system crashes.
How can I change the image format to GRAY8, Y8, or Y16? I have checked existing resources but was unable to apply them as there was no soc_mediabus.c file.
Here are the resources I referred to:
Issue with video format and data type in camera driver development
please check my previous comments, and confirm it’s outputting with progressive mode.
re-cap as below…
the failure message… [ 11.549755] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
that’s due to a kernel NULL pointer, which might due to you’ve a NULL, or not exist property in the sensor device tree.
there’re mode_type, csi_pixel_bit_depth and pixel_phase to report the sensor mode type.
but… what’s your real sensor output format types.
you should configure device tree settings as same as your sensor capability.
Hello Jerry Chang
My sensor is progress output that I confirm.
In Our mipi side, DT is set as raw8,.
Previous output image was setted DT as YUV422.
But the setting is not correct.
So I want to use raw8 DT which like GRAY8, Y8, Y16.
But to apply GRAY8,Y8,Y16, I realized that I have to change the source code.
Could you let me know modification points.
In dts, dtsi, and source code
Thank you and best regard!
it’s v4l to check camera_common_frmfmt of your sensor drvier, and report the supported format.
and… it’s using the format by parsing your sensor device tree.
for instance, it’s device tree property, mode_type, pixel_phase, csi_pixel_bit_depth to composed sensor mode type.
here’s an example with IMX274’s RGGB10 mappings.
you may dig into below kernel sources, $public_sources/kernel_src/hardware/nvidia/platform/t23x/common/kernel-dts/t234-common-modules/tegra234-camera-imx274-dual.dtsi
I am connecting Orin NX CSI 2 (Index starts from 0) to my deserializer 2(Index starts from 1)
I have modified the DTS file as attached, and when I capture with the following command for device0:
gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw,format=GRAY8,width=3840,height=1024’ ! filesink location=./test.yuv
I get the following error message. Could you please advise what this error code means and what actions I should take? Attached are the DTS file and the entire log.
I am always grateful for your prompt response.
[ 42.308675] imx390 2-001c: imx390_start_streaming Unicam2_Prepare is_fisrt 1
[ 42.308677] write_96712_by_table enter
[ 43.427786] imx390 2-001c: imx390_start_streaming: write_96712_by_table Unicam1_Prepare success
[ 43.427796] write_96712_by_table enter
[ 43.555993] imx390 2-001c: imx390_start_streaming: write_96712_by_table Unicam1_Streamon success
Redistribute latency…
[ 45.027989] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 45.028017] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 45.029441] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 47.587986] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 47.588015] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 47.589425] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 50.148146] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 50.148179] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 50.149748] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 52.708158] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 52.708190] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 52.709440] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 55.267994] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 55.268025] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 55.269454] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 57.827986] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 57.828015] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 57.829453] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 60.387996] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 60.388027] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 60.389448] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
^Chandling interrupt.
it’s the failure of DPHY deskew calibration has not complete on data-lane and clock-lane.
according to SerDes Pixel Clock section, skew calibration is required if sensor or deserializer is using DPHY, and the output data rate is > 1.5Gbps.
are you able to fetch camera stream via v4l2 IOCTL now?
for instance, $ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=300
BTW,
what’s the channel property as below has defined.
it seems you’ve these two IMX390s configure to the same channel = "a";
for instance,
if I understand your configuration correctly according to above.
you should have two IMX390s they’re sharing same serdes-csi-link, which should be "a".
Hello Jerry Chang.
Thank you for prompt response.
I changed the dts file according to your advice.
But error message still same.
Our system is below
Currently I testing DSER_A1 connecting to CSI2.
Could you check my dts file whether correct or not?
Thank you for advance your prompt response.
Thank you for your support.
Now I can capture 2cam on CSI2.
I changed both DT and source code.
I would like to close this issue.
If another issue occurred I will open another issue