hi:
我添加了一个raw8的设备树然后驱动报错,
dynamic_pixel_bit_depth = "8"; \
csi_pixel_bit_depth = "8"; \
mode_type = "bayer"; \
pixel_phase = "grbg"; \
[ 230.955669] zedx 9-0020: Driver Version : v1.4.3
[ 230.955746] extract_pixel_format: Need to extend formatbayer_grbg8
[ 230.955747] zedx 9-0020: Unsupported pixel format
[ 230.955748] zedx 9-0020: Failed to read mode0 image props
[ 230.955749] zedx 9-0020: Could not initialize sensor properties.
[ 230.955750] zedx 9-0020: Failed to initialize video1
[ 230.955751] zedx 9-0020: tegra camera driver registration failed
[ 230.955768] zedx: probe of 9-0020 failed with error -22
[ 230.956131] zedx 9-0028: Driver Version : v1.4.3
[ 230.956165] extract_pixel_format: Need to extend formatbayer_grbg8
[ 230.956166] zedx 9-0028: Unsupported pixel format
[ 230.956167] zedx 9-0028: Failed to read mode0 image props
[ 230.956167] zedx 9-0028: Could not initialize sensor properties.
[ 230.956168] zedx 9-0028: Failed to initialize video0
[ 230.956169] zedx 9-0028: tegra camera driver registration failed
[ 230.956180] zedx: probe of 9-0028 failed with error -22
做了如下修改,验证加载驱动之后,内核就崩溃了,帮忙看看是哪里少添加了,谢谢
--- a/nvidia-oot/drivers/media/platform/tegra/camera/camera_common.c
+++ b/nvidia-oot/drivers/media/platform/tegra/camera/camera_common.c
@@ -89,6 +89,11 @@ static const struct camera_common_colorfmt camera_common_color_fmts[] = {
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SBGGR10,
},
+ {
+ MEDIA_BUS_FMT_SGRBG8_1X8,
+ V4L2_COLORSPACE_SRGB,
+ V4L2_PIX_FMT_SBGGR8,
+ },
{
--- a/nvidia-oot/drivers/media/platform/tegra/camera/sensor_common.c
+++ b/nvidia-oot/drivers/media/platform/tegra/camera/sensor_common.c
@@ -303,6 +303,8 @@ static int extract_pixel_format(
*format = V4L2_PIX_FMT_SBGGR10;
else if (strncmp(pixel_t, "bayer_rggb8", size) == 0)
*format = V4L2_PIX_FMT_SRGGB8;
+ else if (strncmp(pixel_t, "bayer_grbg8", size) == 0)
+ *format = V4L2_PIX_FMT_SGRBG8;