staging: vc04_services: codec: Add support for mono formats
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Wed, 1 Jul 2020 09:38:12 +0000 (10:38 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Thu, 2 Jul 2020 14:35:32 +0000 (15:35 +0100)
The firmware ISP component now allows for processing of mono
images, so add those formats for use by the simple ISP device.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/staging/vc04_services/bcm2835-codec/bcm2835-v4l2-codec.c

index 2391d58..b9415f3 100644 (file)
@@ -344,6 +344,47 @@ static const struct bcm2835_codec_fmt supported_formats[] = {
                .size_multiplier_x2     = 2,
                .is_bayer               = true,
        }, {
+               /* Monochrome MIPI formats */
+               /* 8 bit */
+               .fourcc                 = V4L2_PIX_FMT_GREY,
+               .depth                  = 8,
+               .bytesperline_align     = 32,
+               .flags                  = 0,
+               .mmal_fmt               = MMAL_ENCODING_GREY,
+               .size_multiplier_x2     = 2,
+       }, {
+               /* 10 bit */
+               .fourcc                 = V4L2_PIX_FMT_Y10P,
+               .depth                  = 10,
+               .bytesperline_align     = 32,
+               .flags                  = 0,
+               .mmal_fmt               = MMAL_ENCODING_Y10P,
+               .size_multiplier_x2     = 2,
+       }, {
+               /* 12 bit */
+               .fourcc                 = V4L2_PIX_FMT_Y12P,
+               .depth                  = 12,
+               .bytesperline_align     = 32,
+               .flags                  = 0,
+               .mmal_fmt               = MMAL_ENCODING_Y12P,
+               .size_multiplier_x2     = 2,
+       }, {
+               /* 14 bit */
+               .fourcc                 = V4L2_PIX_FMT_Y14P,
+               .depth                  = 14,
+               .bytesperline_align     = 32,
+               .flags                  = 0,
+               .mmal_fmt               = MMAL_ENCODING_Y14P,
+               .size_multiplier_x2     = 2,
+       }, {
+               /* 16 bit */
+               .fourcc                 = V4L2_PIX_FMT_Y16,
+               .depth                  = 16,
+               .bytesperline_align     = 32,
+               .flags                  = 0,
+               .mmal_fmt               = MMAL_ENCODING_Y16,
+               .size_multiplier_x2     = 2,
+       }, {
                /* Compressed formats */
                .fourcc                 = V4L2_PIX_FMT_H264,
                .depth                  = 0,