diff options
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-0850-staging-vc04_services-isp-Add-monochrome-image-forma.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-0850-staging-vc04_services-isp-Add-monochrome-image-forma.patch | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-0850-staging-vc04_services-isp-Add-monochrome-image-forma.patch b/target/linux/bcm27xx/patches-5.4/950-0850-staging-vc04_services-isp-Add-monochrome-image-forma.patch new file mode 100644 index 0000000000..849417f6ae --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-0850-staging-vc04_services-isp-Add-monochrome-image-forma.patch @@ -0,0 +1,92 @@ +From ef305037fd7423386d3a59b640114bdff67d824f Mon Sep 17 00:00:00 2001 +From: Dave Stevenson <dave.stevenson@raspberrypi.com> +Date: Wed, 6 May 2020 18:11:14 +0100 +Subject: [PATCH] staging: vc04_services: isp: Add monochrome image + formats + +Adds support for monochrome image formats in the various +MIPI packings. + +Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com> +--- + .../bcm2835-isp/bcm2835_isp_fmts.h | 52 ++++++++++++++++++- + .../vc04_services/vchiq-mmal/mmal-encodings.h | 7 +++ + 2 files changed, 58 insertions(+), 1 deletion(-) + +--- a/drivers/staging/vc04_services/bcm2835-isp/bcm2835_isp_fmts.h ++++ b/drivers/staging/vc04_services/bcm2835-isp/bcm2835_isp_fmts.h +@@ -328,7 +328,57 @@ static const struct bcm2835_isp_fmt supp + .colorspace = V4L2_COLORSPACE_RAW, + .step_size = 2, + }, { +- /* ISP statistics format */ ++ /* 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, ++ .colorspace = V4L2_COLORSPACE_RAW, ++ .step_size = 2, ++ }, { ++ /* 10 bit */ ++ .fourcc = V4L2_PIX_FMT_Y10P, ++ .depth = 10, ++ .bytesperline_align = 32, ++ .flags = 0, ++ .mmal_fmt = MMAL_ENCODING_Y10P, ++ .size_multiplier_x2 = 2, ++ .colorspace = V4L2_COLORSPACE_RAW, ++ .step_size = 2, ++ }, { ++ /* 12 bit */ ++ .fourcc = V4L2_PIX_FMT_Y12P, ++ .depth = 12, ++ .bytesperline_align = 32, ++ .flags = 0, ++ .mmal_fmt = MMAL_ENCODING_Y12P, ++ .size_multiplier_x2 = 2, ++ .colorspace = V4L2_COLORSPACE_RAW, ++ .step_size = 2, ++ }, { ++ /* 14 bit */ ++ .fourcc = V4L2_PIX_FMT_Y14P, ++ .depth = 14, ++ .bytesperline_align = 32, ++ .flags = 0, ++ .mmal_fmt = MMAL_ENCODING_Y14P, ++ .size_multiplier_x2 = 2, ++ .colorspace = V4L2_COLORSPACE_RAW, ++ .step_size = 2, ++ }, { ++ /* 16 bit */ ++ .fourcc = V4L2_PIX_FMT_Y16, ++ .depth = 16, ++ .bytesperline_align = 32, ++ .flags = 0, ++ .mmal_fmt = MMAL_ENCODING_Y16, ++ .size_multiplier_x2 = 2, ++ .colorspace = V4L2_COLORSPACE_RAW, ++ .step_size = 2, ++ }, { + .fourcc = V4L2_META_FMT_BCM2835_ISP_STATS, + .mmal_fmt = MMAL_ENCODING_BRCM_STATS, + /* The rest are not valid fields for stats. */ +--- a/drivers/staging/vc04_services/vchiq-mmal/mmal-encodings.h ++++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-encodings.h +@@ -102,6 +102,13 @@ + #define MMAL_ENCODING_BAYER_SGRBG16 MMAL_FOURCC('G', 'R', '1', '6') + #define MMAL_ENCODING_BAYER_SRGGB16 MMAL_FOURCC('R', 'G', '1', '6') + ++/* MIPI packed monochrome images */ ++#define MMAL_ENCODING_GREY MMAL_FOURCC('G', 'R', 'E', 'Y') ++#define MMAL_ENCODING_Y10P MMAL_FOURCC('Y', '1', '0', 'P') ++#define MMAL_ENCODING_Y12P MMAL_FOURCC('Y', '1', '2', 'P') ++#define MMAL_ENCODING_Y14P MMAL_FOURCC('Y', '1', '4', 'P') ++#define MMAL_ENCODING_Y16 MMAL_FOURCC('Y', '1', '6', ' ') ++ + /** An EGL image handle + */ + #define MMAL_ENCODING_EGL_IMAGE MMAL_FOURCC('E', 'G', 'L', 'I') |