提交 2a9c226d 编写于 作者: L Laurent Pinchart 提交者: Mauro Carvalho Chehab

media: imx: imx7-media-csi: Support clamping Y10 and Y12 to Y8

10-bit and 12-bit greyscale input data to the CSI can be written as
8-bit data to memory. Support this.
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: NRui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: NHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
上级 b1f240ee
......@@ -804,6 +804,14 @@ static int imx7_csi_configure(struct imx7_csi *csi)
case V4L2_PIX_FMT_YUYV:
cr18 |= BIT_MIPI_DATA_FORMAT_YUV422_8B;
break;
case V4L2_PIX_FMT_GREY:
if (in_code == MEDIA_BUS_FMT_Y8_1X8)
cr18 |= BIT_MIPI_DATA_FORMAT_RAW8;
else if (in_code == MEDIA_BUS_FMT_Y10_1X10)
cr18 |= BIT_MIPI_DATA_FORMAT_RAW10;
else
cr18 |= BIT_MIPI_DATA_FORMAT_RAW12;
break;
case V4L2_PIX_FMT_Y10:
cr18 |= BIT_MIPI_DATA_FORMAT_RAW10;
cr1 |= BIT_PIXEL_BIT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册