i.MX8 MQ 使用ov5640 sensor ,无法修改 图像输出格式pixelformat和分辨率

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8 MQ 使用ov5640 sensor ,无法修改 图像输出格式pixelformat和分辨率

Jump to solution
1,987 Views
zhouqi
Contributor II

Dear all:

    本人在使用imx8mq mipi csi2接口采集图像,sensor是 ov5640相机,使用的bsp是4.14.98-imx_4.14.98_2.0.0_ga,编写测试程序测试yuyv 640*480图像输出是正常,但是除此之外,其他所有的分辨率和图像格式修改后都无法正常输出。fmtdesc显示目前只支持yuyv的格式,我不知道是哪里出了问题。

    关于ov5640的设备树的配置如下:

ov5640_mipi: ov5640_mipi@3c {
compatible = "ovti,ov5640_mipi";
reg = <0x3c>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi1_pwn>, <&pinctrl_csi1_rst>;
clocks = <&clk IMX8MQ_CLK_CLKO2>;
clock-names = "csi_mclk";
assigned-clocks = <&clk IMX8MQ_CLK_CLKO2>;
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_200M>;
assigned-clock-rates = <0>, <20000000>;
csi_id = <0>;
pwn-gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
rst-gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
mclk = <20000000>;
mclk_source = <0>;
port {
ov5640_mipi1_ep: endpoint {
remote-endpoint = <&mipi1_sensor_ep>;
};
};
};

 

下面是我的一些调试打印:
[ OK ] crop set
[ OK ] crop get 2nd: crop.type =1 crop.get left=0, top=0, width=0, height=0

[ OK ] parm set
[ OK ] parm get 2nd: type=1, capability=4097, capturemode=0, extendedmode=0, readbuffers=0, numerator=1, denominator=30

[ OK ] fmtdesc: Support format:
0.YUYV 4:2:2

[ ERROR ] /dev/video0 does not support fmt: 1st get, ret = -1
[ ERROR ] /dev/video0 does not support fmt: set, ret = -1

[ end ] return ret = -6

 

 

ov5640的驱动代码如附件:

我在probe函数中,做了如下修改,也没用,输出依然是yuyv格式

#if 0
//base
sensor->pix.pixelformat = V4L2_PIX_FMT_YUYV;
sensor->pix.width = 640;
sensor->pix.height = 480;
#else
//changed
sensor->pix.pixelformat = V4L2_PIX_FMT_RGB24;
sensor->pix.width = 640;
sensor->pix.height = 480;
#endif

 

请大家帮我看看哪里有问题。

谢谢~~~

 

   

 

Tags (2)
0 Kudos
1 Solution
4 Replies
1,978 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi zhou

 

我看了一下驱动程序,ov5640mipi_v2的参数设置是通过init_device函数里的

ret = ov5640_init_mode(sensor, frame_rate, ov5640_mode_INIT,
			       ov5640_mode_INIT);

其中传入的参数是ov的默认模式,你可以参考ov5640_init_mode函数里的以下部分设置你想要的参数并下载进去。我们支持的参数都在c文件开头定义了。

if (mode == ov5640_mode_INIT) {
		pModeSetting = ov5640_init_setting_30fps_VGA;
		ArySize = ARRAY_SIZE(ov5640_init_setting_30fps_VGA);

		sensor->pix.width = 640;
		sensor->pix.height = 480;
		retval = ov5640_download_firmware(sensor, pModeSetting,
						  ArySize);
		if (retval < 0)
			goto err;

		pModeSetting = ov5640_setting_30fps_VGA_640_480;
		ArySize = ARRAY_SIZE(ov5640_setting_30fps_VGA_640_480);
		retval = ov5640_download_firmware(sensor, pModeSetting,
						  ArySize);

 Best Regards

Zhiming

0 Kudos
1,937 Views
zhouqi
Contributor II

Hi zhiming

     thank you very much for your answer.

    我的问题依然未解决,依然无法让相机输出RGB格式的图像。

    我通过ioctl(fd, VIDIOC_S_FMT, &fmt) 让相机输出RGB565格式的图像,但是ioctl返回失败,

    我也在下面的初始化寄存器数组中,修改0x4300、0x501f的寄存器值后也依然无法输出RGB565格式。

static struct reg_value ov5640_init_setting_30fps_VGA[] = {

{0x3103, 0x11, 0, 0}, {0x3008, 0x82, 0, 5}, {0x3008, 0x42, 0, 0},
{0x3103, 0x03, 0, 0}, {0x3017, 0x00, 0, 0}, {0x3018, 0x00, 0, 0},
{0x3034, 0x18, 0, 0}, {0x3035, 0x14, 0, 0}, {0x3036, 0x38, 0, 0},
{0x3037, 0x13, 0, 0}, {0x3108, 0x01, 0, 0}, {0x3630, 0x36, 0, 0},
{0x3631, 0x0e, 0, 0}, {0x3632, 0xe2, 0, 0}, {0x3633, 0x12, 0, 0},
{0x3621, 0xe0, 0, 0}, {0x3704, 0xa0, 0, 0}, {0x3703, 0x5a, 0, 0},
{0x3715, 0x78, 0, 0}, {0x3717, 0x01, 0, 0}, {0x370b, 0x60, 0, 0},
{0x3705, 0x1a, 0, 0}, {0x3905, 0x02, 0, 0}, {0x3906, 0x10, 0, 0},
{0x3901, 0x0a, 0, 0}, {0x3731, 0x12, 0, 0}, {0x3600, 0x08, 0, 0},
{0x3601, 0x33, 0, 0}, {0x302d, 0x60, 0, 0}, {0x3620, 0x52, 0, 0},
{0x371b, 0x20, 0, 0}, {0x471c, 0x50, 0, 0}, {0x3a13, 0x43, 0, 0},
{0x3a18, 0x00, 0, 0}, {0x3a19, 0xf8, 0, 0}, {0x3635, 0x13, 0, 0},
{0x3636, 0x03, 0, 0}, {0x3634, 0x40, 0, 0}, {0x3622, 0x01, 0, 0},
{0x3c01, 0xa4, 0, 0}, {0x3c04, 0x28, 0, 0}, {0x3c05, 0x98, 0, 0},
{0x3c06, 0x00, 0, 0}, {0x3c07, 0x08, 0, 0}, {0x3c08, 0x00, 0, 0},
{0x3c09, 0x1c, 0, 0}, {0x3c0a, 0x9c, 0, 0}, {0x3c0b, 0x40, 0, 0},
{0x3820, 0x41, 0, 0}, {0x3821, 0x07, 0, 0}, {0x3814, 0x31, 0, 0},
{0x3815, 0x31, 0, 0}, {0x3800, 0x00, 0, 0}, {0x3801, 0x00, 0, 0},
{0x3802, 0x00, 0, 0}, {0x3803, 0x04, 0, 0}, {0x3804, 0x0a, 0, 0},
{0x3805, 0x3f, 0, 0}, {0x3806, 0x07, 0, 0}, {0x3807, 0x9b, 0, 0},
{0x3808, 0x02, 0, 0}, {0x3809, 0x80, 0, 0}, {0x380a, 0x01, 0, 0},
{0x380b, 0xe0, 0, 0}, {0x380c, 0x07, 0, 0}, {0x380d, 0x68, 0, 0},
{0x380e, 0x03, 0, 0}, {0x380f, 0xd8, 0, 0}, {0x3810, 0x00, 0, 0},
{0x3811, 0x10, 0, 0}, {0x3812, 0x00, 0, 0}, {0x3813, 0x06, 0, 0},
{0x3618, 0x00, 0, 0}, {0x3612, 0x29, 0, 0}, {0x3708, 0x64, 0, 0},
{0x3709, 0x52, 0, 0}, {0x370c, 0x03, 0, 0}, {0x3a02, 0x03, 0, 0},
{0x3a03, 0xd8, 0, 0}, {0x3a08, 0x01, 0, 0}, {0x3a09, 0x27, 0, 0},
{0x3a0a, 0x00, 0, 0}, {0x3a0b, 0xf6, 0, 0}, {0x3a0e, 0x03, 0, 0},
{0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
{0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0}, {0x3000, 0x00, 0, 0},
{0x3002, 0x1c, 0, 0}, {0x3004, 0xff, 0, 0}, {0x3006, 0xc3, 0, 0},
{0x300e, 0x45, 0, 0}, {0x302e, 0x08, 0, 0},
#if 0
{0x4300, 0x30, 0, 0},//YUV422
{0x501f, 0x00, 0, 0}, //YUV422
#else
{0x4300, 0x60, 0, 0},//RGB565
{0x501f, 0x01, 0, 0}, //RGB565
#endif
{0x4713, 0x03, 0, 0}, {0x4407, 0x04, 0, 0},
{0x440e, 0x00, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
{0x4837, 0x0a, 0, 0}, {0x4800, 0x04, 0, 0}, {0x3824, 0x02, 0, 0},
{0x5000, 0xa7, 0, 0}, {0x5001, 0xa3, 0, 0}, {0x5180, 0xff, 0, 0},
{0x5181, 0xf2, 0, 0}, {0x5182, 0x00, 0, 0}, {0x5183, 0x14, 0, 0},
{0x5184, 0x25, 0, 0}, {0x5185, 0x24, 0, 0}, {0x5186, 0x09, 0, 0},
{0x5187, 0x09, 0, 0}, {0x5188, 0x09, 0, 0}, {0x5189, 0x88, 0, 0},
{0x518a, 0x54, 0, 0}, {0x518b, 0xee, 0, 0}, {0x518c, 0xb2, 0, 0},
{0x518d, 0x50, 0, 0}, {0x518e, 0x34, 0, 0}, {0x518f, 0x6b, 0, 0},
{0x5190, 0x46, 0, 0}, {0x5191, 0xf8, 0, 0}, {0x5192, 0x04, 0, 0},
{0x5193, 0x70, 0, 0}, {0x5194, 0xf0, 0, 0}, {0x5195, 0xf0, 0, 0},
{0x5196, 0x03, 0, 0}, {0x5197, 0x01, 0, 0}, {0x5198, 0x04, 0, 0},
{0x5199, 0x6c, 0, 0}, {0x519a, 0x04, 0, 0}, {0x519b, 0x00, 0, 0},
{0x519c, 0x09, 0, 0}, {0x519d, 0x2b, 0, 0}, {0x519e, 0x38, 0, 0},
{0x5381, 0x1e, 0, 0}, {0x5382, 0x5b, 0, 0}, {0x5383, 0x08, 0, 0},
{0x5384, 0x0a, 0, 0}, {0x5385, 0x7e, 0, 0}, {0x5386, 0x88, 0, 0},
{0x5387, 0x7c, 0, 0}, {0x5388, 0x6c, 0, 0}, {0x5389, 0x10, 0, 0},
{0x538a, 0x01, 0, 0}, {0x538b, 0x98, 0, 0}, {0x5300, 0x08, 0, 0},
{0x5301, 0x30, 0, 0}, {0x5302, 0x10, 0, 0}, {0x5303, 0x00, 0, 0},
{0x5304, 0x08, 0, 0}, {0x5305, 0x30, 0, 0}, {0x5306, 0x08, 0, 0},
{0x5307, 0x16, 0, 0}, {0x5309, 0x08, 0, 0}, {0x530a, 0x30, 0, 0},
{0x530b, 0x04, 0, 0}, {0x530c, 0x06, 0, 0}, {0x5480, 0x01, 0, 0},
{0x5481, 0x08, 0, 0}, {0x5482, 0x14, 0, 0}, {0x5483, 0x28, 0, 0},
{0x5484, 0x51, 0, 0}, {0x5485, 0x65, 0, 0}, {0x5486, 0x71, 0, 0},
{0x5487, 0x7d, 0, 0}, {0x5488, 0x87, 0, 0}, {0x5489, 0x91, 0, 0},
{0x548a, 0x9a, 0, 0}, {0x548b, 0xaa, 0, 0}, {0x548c, 0xb8, 0, 0},
{0x548d, 0xcd, 0, 0}, {0x548e, 0xdd, 0, 0}, {0x548f, 0xea, 0, 0},
{0x5490, 0x1d, 0, 0}, {0x5580, 0x02, 0, 0}, {0x5583, 0x40, 0, 0},
{0x5584, 0x10, 0, 0}, {0x5589, 0x10, 0, 0}, {0x558a, 0x00, 0, 0},
{0x558b, 0xf8, 0, 0}, {0x5800, 0x23, 0, 0}, {0x5801, 0x14, 0, 0},
{0x5802, 0x0f, 0, 0}, {0x5803, 0x0f, 0, 0}, {0x5804, 0x12, 0, 0},
{0x5805, 0x26, 0, 0}, {0x5806, 0x0c, 0, 0}, {0x5807, 0x08, 0, 0},
{0x5808, 0x05, 0, 0}, {0x5809, 0x05, 0, 0}, {0x580a, 0x08, 0, 0},
{0x580b, 0x0d, 0, 0}, {0x580c, 0x08, 0, 0}, {0x580d, 0x03, 0, 0},
{0x580e, 0x00, 0, 0}, {0x580f, 0x00, 0, 0}, {0x5810, 0x03, 0, 0},
{0x5811, 0x09, 0, 0}, {0x5812, 0x07, 0, 0}, {0x5813, 0x03, 0, 0},
{0x5814, 0x00, 0, 0}, {0x5815, 0x01, 0, 0}, {0x5816, 0x03, 0, 0},
{0x5817, 0x08, 0, 0}, {0x5818, 0x0d, 0, 0}, {0x5819, 0x08, 0, 0},
{0x581a, 0x05, 0, 0}, {0x581b, 0x06, 0, 0}, {0x581c, 0x08, 0, 0},
{0x581d, 0x0e, 0, 0}, {0x581e, 0x29, 0, 0}, {0x581f, 0x17, 0, 0},
{0x5820, 0x11, 0, 0}, {0x5821, 0x11, 0, 0}, {0x5822, 0x15, 0, 0},
{0x5823, 0x28, 0, 0}, {0x5824, 0x46, 0, 0}, {0x5825, 0x26, 0, 0},
{0x5826, 0x08, 0, 0}, {0x5827, 0x26, 0, 0}, {0x5828, 0x64, 0, 0},
{0x5829, 0x26, 0, 0}, {0x582a, 0x24, 0, 0}, {0x582b, 0x22, 0, 0},
{0x582c, 0x24, 0, 0}, {0x582d, 0x24, 0, 0}, {0x582e, 0x06, 0, 0},
{0x582f, 0x22, 0, 0}, {0x5830, 0x40, 0, 0}, {0x5831, 0x42, 0, 0},
{0x5832, 0x24, 0, 0}, {0x5833, 0x26, 0, 0}, {0x5834, 0x24, 0, 0},
{0x5835, 0x22, 0, 0}, {0x5836, 0x22, 0, 0}, {0x5837, 0x26, 0, 0},
{0x5838, 0x44, 0, 0}, {0x5839, 0x24, 0, 0}, {0x583a, 0x26, 0, 0},
{0x583b, 0x28, 0, 0}, {0x583c, 0x42, 0, 0}, {0x583d, 0xce, 0, 0},
{0x5025, 0x00, 0, 0}, {0x3a0f, 0x30, 0, 0}, {0x3a10, 0x28, 0, 0},
{0x3a1b, 0x30, 0, 0}, {0x3a1e, 0x26, 0, 0}, {0x3a11, 0x60, 0, 0},
{0x3a1f, 0x14, 0, 0}, {0x3008, 0x42, 0, 0}, {0x3c00, 0x04, 0, 300},
};

    麻烦帮我看一下,这是怎么回事或者能提供排查方法嘛,现在我没有任何头绪,万分感谢

0 Kudos
1,930 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport
0 Kudos
1,913 Views
zhouqi
Contributor II

Hi zhiming

   很感谢你快速的回复,也很抱歉现在才回复你。

   我认真的看了那篇帖子,也试了论坛里很多关于RGB相关的配置,在ipu_bg_overlay_sdc.c, mx6s_capture.c, ov5640_mipi_v2.c, mxc_mipi_csi.c中做了相应的RGB格式配置的添加,从添加的内核打印来看,的确成功地输出了RGB格式的内容,但是当我把rgb转成BMP格式,显示到屏幕发现图片有很多问题,我不知道是哪里配置有问题,生成的图片已经上传附件。修改的部分也贴在下面。

--- a/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c
+++ b/drivers/media/platform/mxc/capture/ipu_bg_overlay_sdc.c
@@ -48,7 +48,9 @@ static void csi_buf_work_func(struct work_struct *work)
task.input.paddr = cam->vf_bufs[1];
task.input.width = cam->crop_current.width;
task.input.height = cam->crop_current.height;
- task.input.format = IPU_PIX_FMT_UYVY;
+ //task.input.format = IPU_PIX_FMT_UYVY;
+ //task.input.format = IPU_PIX_FMT_RGB565;//zp
+ task.input.format = IPU_PIX_FMT_RGB24;//zp

task.output.paddr = offset;
task.output.width = cam->overlay_fb->var.xres;
@@ -241,7 +243,9 @@ static int csi_enc_setup(cam_data *cam)
goto out_1;
}

- pixel_fmt = IPU_PIX_FMT_UYVY;
+ //pixel_fmt = IPU_PIX_FMT_UYVY;
+ //pixel_fmt = IPU_PIX_FMT_RGB565;//zp
+ pixel_fmt = IPU_PIX_FMT_RGB24;//zp
err = ipu_init_channel_buffer(
cam->ipu, chan, IPU_OUTPUT_BUFFER, pixel_fmt,
cam->crop_current.width, cam->crop_current.height,

 

--- a/drivers/media/platform/mxc/capture/mxc_mipi_csi.c
+++ b/drivers/media/platform/mxc/capture/mxc_mipi_csi.c
@@ -331,6 +331,10 @@ static const struct csis_pix_format mipi_csis_formats[] = {
.code = MEDIA_BUS_FMT_SBGGR8_1X8,
.fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW8,
.data_alignment = 8,
+ }, {
+ .code = MEDIA_BUS_FMT_RGB888_2X12_BE,
+ .fmt_reg = MIPI_CSIS_ISPCFG_FMT_RAW12,
+ .data_alignment = 24,
}
};

--- a/drivers/media/platform/mxc/capture/ov5640_mipi_v2.c
+++ b/drivers/media/platform/mxc/capture/ov5640_mipi_v2.c
@@ -177,8 +177,15 @@ static struct reg_value ov5640_init_setting_30fps_VGA[] = {
{0x3a0d, 0x04, 0, 0}, {0x3a14, 0x03, 0, 0}, {0x3a15, 0xd8, 0, 0},
{0x4001, 0x02, 0, 0}, {0x4004, 0x02, 0, 0}, {0x3000, 0x00, 0, 0},
{0x3002, 0x1c, 0, 0}, {0x3004, 0xff, 0, 0}, {0x3006, 0xc3, 0, 0},
- {0x300e, 0x45, 0, 0}, {0x302e, 0x08, 0, 0}, {0x4300, 0x30, 0, 0},
- {0x501f, 0x00, 0, 0}, {0x4713, 0x03, 0, 0}, {0x4407, 0x04, 0, 0},
+ {0x300e, 0x45, 0, 0}, {0x302e, 0x08, 0, 0},
+#if 1
+ {0x4300, 0x30, 0, 0},//YUV422
+ {0x501f, 0x00, 0, 0}, //YUV422
+#else
+ {0x4300, 0x23, 0, 0},//RGB888
+ {0x501f, 0x01, 0, 0}, //RGB
+#endif
+ {0x4713, 0x03, 0, 0}, {0x4407, 0x04, 0, 0},
{0x440e, 0x00, 0, 0}, {0x460b, 0x35, 0, 0}, {0x460c, 0x22, 0, 0},
{0x4837, 0x0a, 0, 0}, {0x4800, 0x04, 0, 0}, {0x3824, 0x02, 0, 0},

@@ -1718,9 +1830,17 @@ static int ov5640_probe(struct i2c_client *client,

sensor->io_init = ov5640_reset;
sensor->i2c_client = client;
+#if 0
+ //base
sensor->pix.pixelformat = V4L2_PIX_FMT_YUYV;
sensor->pix.width = 640;
sensor->pix.height = 480;
+#else
+ //changed
+ sensor->pix.pixelformat = V4L2_PIX_FMT_RGB24;
+ sensor->pix.width = 640;
+ sensor->pix.height = 480;
+#endif
sensor->streamcap.capability = V4L2_MODE_HIGHQUALITY |
V4L2_CAP_TIMEPERFRAME;
sensor->streamcap.capturemode = 0;

 

 

--- a/drivers/media/platform/mxc/capture/mx6s_capture.c
+++ b/drivers/media/platform/mxc/capture/mx6s_capture.c
@@ -138,6 +138,7 @@
#define BIT_CSI_ENABLE (0x1 << 31)
#define BIT_MIPI_DATA_FORMAT_RAW8 (0x2a << 25)
#define BIT_MIPI_DATA_FORMAT_RAW10 (0x2b << 25)
+#define BIT_MIPI_DATA_FORMAT_RAW12 (0x2c << 25)
#define BIT_MIPI_DATA_FORMAT_YUV422_8B (0x1e << 25)
#define BIT_MIPI_DATA_FORMAT_MASK (0x3F << 25)
#define BIT_MIPI_DATA_FORMAT_OFFSET 25
@@ -256,6 +257,24 @@ static struct mx6s_fmt formats[] = {
.mbus_code = MEDIA_BUS_FMT_UYVY8_2X8,
.bpp = 2,
}, {
+ .name = "RAWRGB8 (SBGGR8)",
+ .fourcc = V4L2_PIX_FMT_SBGGR8,
+ .pixelformat = V4L2_PIX_FMT_SBGGR8,
+ .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8,
+ .bpp = 1,
+ },{
+ .name = "RGB565 (RGB565)",
+ .fourcc = V4L2_PIX_FMT_RGB565,
+ .pixelformat = V4L2_PIX_FMT_RGB565,
+ .mbus_code = MEDIA_BUS_FMT_RGB565_2X8_LE,
+ .bpp = 2,
+ }, {
+ .name = "RGB888 (RGB888)",
+ .fourcc = V4L2_PIX_FMT_RGB24,
+ .pixelformat = V4L2_PIX_FMT_RGB24,
+ .mbus_code = MEDIA_BUS_FMT_RGB888_2X12_BE,
+ .bpp = 2,
+ }, {
.name = "YUYV-16",
.fourcc = V4L2_PIX_FMT_YUYV,
.pixelformat = V4L2_PIX_FMT_YUYV,
@@ -267,12 +286,6 @@ static struct mx6s_fmt formats[] = {
.pixelformat = V4L2_PIX_FMT_YUV32,
.mbus_code = MEDIA_BUS_FMT_AYUV8_1X32,
.bpp = 4,
- }, {
- .name = "RAWRGB8 (SBGGR8)",
- .fourcc = V4L2_PIX_FMT_SBGGR8,
- .pixelformat = V4L2_PIX_FMT_SBGGR8,
- .mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8,
- .bpp = 1,
}
};

@@ -842,9 +855,12 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
}

switch (csi_dev->fmt->pixelformat) {
+ case V4L2_PIX_FMT_RGB24: //zp
+ case V4L2_PIX_FMT_RGB565:
case V4L2_PIX_FMT_YUV32:
case V4L2_PIX_FMT_SBGGR8:
width = pix->width;
+ printk("#zp: %s: case is RGB\n", __func__);
break;
case V4L2_PIX_FMT_UYVY:
case V4L2_PIX_FMT_YUYV:
@@ -853,6 +869,8 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
else
/* For parallel 8-bit sensor input */
width = pix->width * 2;
+
+ printk("#zp: %s: case is YUV\n", __func__);
break;
default:
pr_debug(" case not supported\n");
@@ -877,6 +895,9 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
case V4L2_PIX_FMT_SBGGR8:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW8;
break;
+ case V4L2_PIX_FMT_RGB24:
+ cr18 |= BIT_MIPI_DATA_FORMAT_RAW12;
+ break;
default:
pr_debug(" fmt not supported\n");
return -EINVAL;

0 Kudos