diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2018-05-03 11:06:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-09 16:32:11 -0400 |
commit | e30681bc19bf1fc72953cd4ee23c374caa449591 (patch) | |
tree | c8fae4071e78ca6235e86717bea8e4b1c35962e9 /drivers | |
parent | dde67d50ef0a5597ede14e9d1a689940713f380e (diff) | |
download | lwn-e30681bc19bf1fc72953cd4ee23c374caa449591.tar.gz lwn-e30681bc19bf1fc72953cd4ee23c374caa449591.zip |
media: imx: add 16-bit grayscale support
Since commit 50b0f0aee839 ("gpu: ipu-csi: add 10/12-bit grayscale
support to mbus_code_to_bus_cfg") the IPU CSI can be configured to
capture 10-bit and 12-bit grayscale formats, expanded to 16-bit
grayscale, in bayer/generic data mode.
This patch adds support for V4L2_PIX_FMT_Y16 captured from sensors
that provide MEDIA_BUS_FMT_Y10_1X10 or MEDIA_BUS_FMT_Y12_1X12 data.
Cc: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Steve Longerbeam <steve_longerbeam@mentor.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/imx/imx-media-csi.c | 1 | ||||
-rw-r--r-- | drivers/staging/media/imx/imx-media-utils.c | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c index 16cab40156ca..1112d8f67a18 100644 --- a/drivers/staging/media/imx/imx-media-csi.c +++ b/drivers/staging/media/imx/imx-media-csi.c @@ -409,6 +409,7 @@ static int csi_idmac_setup_channel(struct csi_priv *priv) case V4L2_PIX_FMT_SGBRG16: case V4L2_PIX_FMT_SGRBG16: case V4L2_PIX_FMT_SRGGB16: + case V4L2_PIX_FMT_Y16: burst_size = 4; passthrough = true; passthrough_bits = 16; diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c index fab98fc0d6a0..7ec2db84451c 100644 --- a/drivers/staging/media/imx/imx-media-utils.c +++ b/drivers/staging/media/imx/imx-media-utils.c @@ -168,6 +168,15 @@ static const struct imx_media_pixfmt rgb_formats[] = { .cs = IPUV3_COLORSPACE_RGB, .bpp = 8, .bayer = true, + }, { + .fourcc = V4L2_PIX_FMT_Y16, + .codes = { + MEDIA_BUS_FMT_Y10_1X10, + MEDIA_BUS_FMT_Y12_1X12, + }, + .cs = IPUV3_COLORSPACE_RGB, + .bpp = 16, + .bayer = true, }, /*** * non-mbus RGB formats start here. NOTE! when adding non-mbus |