I checked the bsp source code, current bsp doesn't support raw 12
"https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/staging/media/imx/imx8-isi-cap.c?h...
so try to add raw format in the driver
struct mxc_isi_fmt mxc_isi_out_formats[] = {
.memplanes = 1,
.colplanes = 1,
.mbus_code = MEDIA_BUS_FMT_RGB888_1X24,
+ }, {
+ .name = "RAW12",
+ .fourcc = V4L2_PIX_FMT_SBGGR12,
+ .depth = { 16 },
+ .color = MXC_ISI_OUT_FMT_RAW16,
+ .memplanes = 1,
+ .colplanes = 1,
+ .mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12,
}
};
struct mxc_isi_fmt mxc_isi_src_formats[] = {
.depth = { 32 },
.memplanes = 1,
.colplanes = 1,
+ }, {
+ .name = "RAW12",
+ .fourcc = V4L2_PIX_FMT_SBGGR12,
+ .depth = { 12 },
+ .memplanes = 1,
+ .colplanes = 1,
}
};
struct mxc_isi_fmt *mxc_isi_get_src_fmt(struct v4l2_subdev_format *sd_fmt)
sd_fmt->format.code == MEDIA_BUS_FMT_YVYU8_2X8 ||
sd_fmt->format.code == MEDIA_BUS_FMT_AYUV8_1X32 ||
sd_fmt->format.code == MEDIA_BUS_FMT_UYVY8_2X8 ||
- sd_fmt->format.code == MEDIA_BUS_FMT_YUYV8_2X8)
- index = 1;
- else
- index = 0;
+ sd_fmt->format.code == MEDIA_BUS_FMT_YUYV8_2X8) {
+ index = 1;
+ } else if (sd_fmt->format.code == MEDIA_BUS_FMT_ARGB8888_1X32 ||
+ sd_fmt->format.code == MEDIA_BUS_FMT_RGB888_1X24 ||
+ sd_fmt->format.code == MEDIA_BUS_FMT_BGR888_1X24 ||
+ sd_fmt->format.code == MEDIA_BUS_FMT_RGB565_1X16) {
+ index = 0;
+ } else {
+ index = 2;
+ }
return &mxc_isi_src_formats[index];
}