We want to validate CSI RAW8 camera setting, and use Pi Camera imx219 as source.
But I can’t get frame data with my modifications to sensor setting and pixel format for Tegra.
Need your advise to set RAW8 to work. Thanks.
Here are my modifications:
+++ b/hardware/nvidia/platform/t19x/jakku/kernel-dts/common/tegra194-camera-rbpcv2-imx219.dtsi
@@ -823,7 +823,7 @@
*/
num_csi_lanes = <4>;
max_lane_speed = <1500000>;
- min_bits_per_pixel = <10>;
+ min_bits_per_pixel = <8>;
kernel/nvidia/drivers/media/i2c/imx219_mode_tbls.h
@@ -189,8 +189,8 @@ static imx219_reg imx219_mode_1920x1080_30fps[] = {
- {0x018C, 0x0A},
- {0x018D, 0x0A},
+ {0x018C, 0x08},
+ {0x018D, 0x08},
/* clocks dividers */
- {0x0309, 0x0A},
+ {0x0309, 0x08},
kernel/nvidia/drivers/media/platform/tegra/camera/sensor_common.c
@@ -197,7 +197,9 @@ static int extract_pixel_format(
{
size_t size = strnlen(pixel_t, OF_MAX_STR_LEN);
- if (strncmp(pixel_t, "bayer_bggr10", size) == 0)
+ if (strncmp(pixel_t, "bayer_rggb", size) == 0)
+ *format = V4L2_PIX_FMT_SRGGB8;
+ else if (strncmp(pixel_t, "bayer_bggr10", size) == 0)
*format = V4L2_PIX_FMT_SBGGR10;
I can see RAW8 in v4l2 info:
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, imx219 9-0010
Bus info : platform:15c10000.vi:0
Driver version: 4.9.201
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
Width/Height : 3264/2464
Pixel Format : 'RGGB'
Field : None
Bytes per Line : 3264
Size Image : 8042496
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
I use below CMD to capture frame data:
v4l2-ctl -d /dev/video0 --set-fmt-video=width=3264,height=2464,pixelformat=RGGB --stream-mmap --stream-count=30
It will cause kernel panic:
panic_on_imx219_raw8.txt (20.2 KB)
If I set embedded_metadata_height = “0”, it won’t cause panic, but I still can’t get frame data with endless “discarding frame” messages.