Commit d40577c7 authored by Enrico Scholz's avatar Enrico Scholz

media:mx6s_capture: support some more bayer formats

parent 6a3faae0
......@@ -269,11 +269,77 @@ static struct mx6s_fmt formats[] = {
.mbus_code = MEDIA_BUS_FMT_AYUV8_1X32,
.bpp = 4,
}, {
.name = "RAWRGB8 (SBGGR8)",
.name = "SBGGR8",
.fourcc = V4L2_PIX_FMT_SBGGR8,
.pixelformat = V4L2_PIX_FMT_SBGGR8,
.mbus_code = MEDIA_BUS_FMT_SBGGR8_1X8,
.bpp = 1,
}, {
.name = "SBGGR10",
.fourcc = V4L2_PIX_FMT_SBGGR10,
.pixelformat = V4L2_PIX_FMT_SBGGR10,
.mbus_code = MEDIA_BUS_FMT_SBGGR10_1X10,
.bpp = 2,
}, {
.name = "SBGGR12",
.fourcc = V4L2_PIX_FMT_SBGGR12,
.pixelformat = V4L2_PIX_FMT_SBGGR12,
.mbus_code = MEDIA_BUS_FMT_SBGGR12_1X12,
.bpp = 2,
}, {
.name = "SGRBG8",
.fourcc = V4L2_PIX_FMT_SGRBG8,
.pixelformat = V4L2_PIX_FMT_SGRBG8,
.mbus_code = MEDIA_BUS_FMT_SGRBG8_1X8,
.bpp = 1,
}, {
.name = "SGRBG10",
.fourcc = V4L2_PIX_FMT_SGRBG10,
.pixelformat = V4L2_PIX_FMT_SGRBG10,
.mbus_code = MEDIA_BUS_FMT_SGRBG10_1X10,
.bpp = 2,
}, {
.name = "SGRBG12",
.fourcc = V4L2_PIX_FMT_SGRBG12,
.pixelformat = V4L2_PIX_FMT_SGRBG12,
.mbus_code = MEDIA_BUS_FMT_SGRBG12_1X12,
.bpp = 2,
}, {
.name = "SGBRG8",
.fourcc = V4L2_PIX_FMT_SGBRG8,
.pixelformat = V4L2_PIX_FMT_SGBRG8,
.mbus_code = MEDIA_BUS_FMT_SGBRG8_1X8,
.bpp = 1,
}, {
.name = "SGBRG10",
.fourcc = V4L2_PIX_FMT_SGBRG10,
.pixelformat = V4L2_PIX_FMT_SGBRG10,
.mbus_code = MEDIA_BUS_FMT_SGBRG10_1X10,
.bpp = 2,
}, {
.name = "SGBRG12",
.fourcc = V4L2_PIX_FMT_SGBRG12,
.pixelformat = V4L2_PIX_FMT_SGBRG12,
.mbus_code = MEDIA_BUS_FMT_SGBRG12_1X12,
.bpp = 2,
}, {
.name = "SRGGB8",
.fourcc = V4L2_PIX_FMT_SRGGB8,
.pixelformat = V4L2_PIX_FMT_SRGGB8,
.mbus_code = MEDIA_BUS_FMT_SRGGB8_1X8,
.bpp = 1,
}, {
.name = "SRGGB10",
.fourcc = V4L2_PIX_FMT_SRGGB10,
.pixelformat = V4L2_PIX_FMT_SRGGB10,
.mbus_code = MEDIA_BUS_FMT_SRGGB10_1X10,
.bpp = 2,
}, {
.name = "SRGGB12",
.fourcc = V4L2_PIX_FMT_SRGGB12,
.pixelformat = V4L2_PIX_FMT_SRGGB12,
.mbus_code = MEDIA_BUS_FMT_SRGGB12_1X12,
.bpp = 2,
}, {
.name = "Grey8 (Y8)",
.fourcc = V4L2_PIX_FMT_GREY,
......@@ -864,6 +930,9 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
case V4L2_PIX_FMT_GREY:
case V4L2_PIX_FMT_YUV32:
case V4L2_PIX_FMT_SBGGR8:
case V4L2_PIX_FMT_SGRBG8:
case V4L2_PIX_FMT_SGBRG8:
case V4L2_PIX_FMT_SRGGB8:
width = pix->width;
break;
case V4L2_PIX_FMT_Y10:
......@@ -897,12 +966,23 @@ static int mx6s_configure_csi(struct mx6s_csi_dev *csi_dev)
cr18 |= BIT_MIPI_DATA_FORMAT_YUV422_8B;
break;
case V4L2_PIX_FMT_SBGGR8:
case V4L2_PIX_FMT_SGRBG8:
case V4L2_PIX_FMT_SGBRG8:
case V4L2_PIX_FMT_SRGGB8:
case V4L2_PIX_FMT_GREY:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW8;
break;
case V4L2_PIX_FMT_SBGGR10:
case V4L2_PIX_FMT_SGRBG10:
case V4L2_PIX_FMT_SGBRG10:
case V4L2_PIX_FMT_SRGGB10:
case V4L2_PIX_FMT_Y10:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW10;
break;
case V4L2_PIX_FMT_SBGGR12:
case V4L2_PIX_FMT_SGRBG12:
case V4L2_PIX_FMT_SGBRG12:
case V4L2_PIX_FMT_SRGGB12:
case V4L2_PIX_FMT_Y12:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW12;
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment