Hi all,
Given:
L4T - 35.4.1
JetPack 5.1.2
Ubuntu 18.04 x64 LTS
Jetson Orin NX 16 GB
We have a 10 bit monochrome camera sensor. Of course under NDA. I2C & GPIO’s is managed from user space linux. Linux driver without I2C, in *dtsi file settings added:
dynamic_pixel_bit_depth = "10";
csi_pixel_bit_depth = "10";
mode_type = "gray";
pixel_phase = "y10";
In JetPack_5.1.2_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/platform/tegra/camera/camera_common.c I added
static const struct camera_common_colorfmt camera_common_color_fmts[] = {
...
{
MEDIA_BUS_FMT_Y10_1X10,
V4L2_COLORSPACE_RAW,
V4L2_PIX_FMT_Y10,
},
{
MEDIA_BUS_FMT_Y12_1X12,
V4L2_COLORSPACE_RAW,
V4L2_PIX_FMT_Y12,
},
};
in JetPack_5.1.2_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/platform/tegra/camera/sensor_common.c
static int extract_pixel_format(const char *pixel_t, u32 *format)
{
…
else if (strncmp(pixel_t, "y10", size) == 0)
*format = V4L2_PIX_FMT_Y10;
else if (strncmp(pixel_t, "y12", size) == 0)
*format = V4L2_PIX_FMT_Y12;
}
in /JetPack_5.1.2_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/platform/tegra/camera/vi/vi2_formats.h
static const struct tegra_video_format vi2_video_formats[] = {
…
TEGRA_VIDEO_FORMAT(RAW10, 10, Y10_1X10, 2, 1, T_R16_I,RAW10, Y10, "GRAY10"),
TEGRA_VIDEO_FORMAT(RAW12, 12, Y12_1X12, 2, 1, T_R16_I,RAW12, Y12, "GRAY12"),
}
in /JetPack_5.1.2_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/platform/tegra/camera/vi/vi4_formats.h
static const struct tegra_video_format vi4_video_formats[] = {
…
TEGRA_VIDEO_FORMAT(RAW10, 10, Y10_1X10, 2, 1, T_R16_I,RAW10, Y10, "GRAY10"),
TEGRA_VIDEO_FORMAT(RAW12, 12, Y12_1X12, 2, 1, T_R16_I,RAW12, Y12, "GRAY12"),
}
in /JetPack_5.1.2_Linux_JETSON_ORIN_NX_TARGETS/Linux_for_Tegra/sources/kernel/nvidia/drivers/media/platform/tegra/camera/vi/vi5_formats.h
static const struct tegra_video_format vi5_video_formats[] = {
…
TEGRA_VIDEO_FORMAT(RAW10, 10, Y10_1X10, 2, 1, T_R16,RAW10, Y10, "GRAY10"),
TEGRA_VIDEO_FORMAT(RAW12, 12, Y12_1X12, 2, 1, T_R16,RAW12, Y12, "GRAY12"),
}
When running the camera driver sudo insmod nv_*.ko, in dmesg the following errors appear:
Unsupported pixel format
Failed to read mode0 image props
Could not initialize sensor properties.
What needs to be added to make the errors disappear and the pixel format Y10 appear correctly?
Maybe the pixel format should be explicitly specified in the Linux driver?
Sorry, how to move the topic to Jetson Orin NX?
Thanks!