diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2018-01-22 11:16:32 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-21 12:10:24 -0400 |
commit | b1e064c25e8fce911d0d9b8a9cca1d3183cd7130 (patch) | |
tree | c54e4ff020c499cba9d3f10d2456511e66b06204 /drivers/staging | |
parent | be2068bf648fd47a042a25fe998a3c7456101ae6 (diff) | |
download | op-kernel-dev-b1e064c25e8fce911d0d9b8a9cca1d3183cd7130.zip op-kernel-dev-b1e064c25e8fce911d0d9b8a9cca1d3183cd7130.tar.gz |
media: imx: add 8-bit grayscale support
The IPUv3 code has 8-bit grayscale capture support.
Enable imx-media to use it.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/imx/imx-media-csi.c | 1 | ||||
-rw-r--r-- | drivers/staging/media/imx/imx-media-utils.c | 8 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 5a195f8..1aa2be8 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -400,6 +400,7 @@ static int csi_idmac_setup_channel(struct csi_priv *priv) case V4L2_PIX_FMT_SGBRG8: case V4L2_PIX_FMT_SGRBG8: case V4L2_PIX_FMT_SRGGB8: + case V4L2_PIX_FMT_GREY: burst_size = 16; passthrough = true; passthrough_bits = 8; diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c index 8920f9b..40bcb8f 100644 --- a/drivers/staging/media/imx/imx-media-utils.c +++ b/drivers/staging/media/imx/imx-media-utils.c @@ -93,7 +93,7 @@ static const struct imx_media_pixfmt rgb_formats[] = { .bpp = 32, .ipufmt = true, }, - /*** raw bayer formats start here ***/ + /*** raw bayer and grayscale formats start here ***/ { .fourcc = V4L2_PIX_FMT_SBGGR8, .codes = {MEDIA_BUS_FMT_SBGGR8_1X8}, @@ -162,6 +162,12 @@ static const struct imx_media_pixfmt rgb_formats[] = { .cs = IPUV3_COLORSPACE_RGB, .bpp = 16, .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_GREY, + .codes = {MEDIA_BUS_FMT_Y8_1X8}, + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 8, + .bayer = true, }, /*** * non-mbus RGB formats start here. NOTE! when adding non-mbus |