1 From 253dd469e6403b6c2afd25d4f8338a0c1588583f Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Thu, 3 Oct 2019 13:45:51 +0100
4 Subject: [PATCH] media: bcm2835-unicam: Add support for luma/greyscale
7 Add support for V4L2_PIX_FMT_GREY, V4L2_PIX_FMT_Y10P,
8 V4L2_PIX_FMT_Y10, and V4L2_PIX_FMT_Y12 image formats from the
9 appropriate mediabus formats advertised by sensors.
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
13 .../media/platform/bcm2835/bcm2835-unicam.c | 21 ++++++++++++++++++-
14 1 file changed, 20 insertions(+), 1 deletion(-)
16 --- a/drivers/media/platform/bcm2835/bcm2835-unicam.c
17 +++ b/drivers/media/platform/bcm2835/bcm2835-unicam.c
18 @@ -307,12 +307,31 @@ static const struct unicam_fmt formats[]
19 .code = MEDIA_BUS_FMT_SRGGB14_1X14,
25 * 16 bit Bayer formats could be supported, but there is no CSI2
26 * data_type defined for raw 16, and no sensors that produce it at
30 + /* Greyscale formats */
31 + .fourcc = V4L2_PIX_FMT_GREY,
32 + .code = MEDIA_BUS_FMT_Y8_1X8,
36 + .fourcc = V4L2_PIX_FMT_Y10P,
37 + .repacked_fourcc = V4L2_PIX_FMT_Y10,
38 + .code = MEDIA_BUS_FMT_Y10_1X10,
42 + /* NB There is no packed V4L2 fourcc for this format. */
43 + .repacked_fourcc = V4L2_PIX_FMT_Y12,
44 + .code = MEDIA_BUS_FMT_Y12_1X12,
50 struct unicam_dmaqueue {