mirror of https://gitee.com/openkylin/linux.git
media: imx: imx6-media-csi: Replace Y16 with Y10 and Y12
The driver doesn't really support V4L2_PIX_FMT_Y16, as there's no 16-bit greyscale media bus code defined by the kernel. It (ab)uses the format to capture 10-bit and 12-bit greyscale formats. Fix it to properly support MEDIA_BUS_FMT_Y10_1X10 and MEDIA_BUS_FMT_Y12_1X12 instead. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com> Acked-by: Steve Longerbeam <slongerbeam@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
f7b8488bd3
commit
8f1973023e
|
@ -457,7 +457,8 @@ static int csi_idmac_setup_channel(struct csi_priv *priv)
|
||||||
case V4L2_PIX_FMT_SGBRG16:
|
case V4L2_PIX_FMT_SGBRG16:
|
||||||
case V4L2_PIX_FMT_SGRBG16:
|
case V4L2_PIX_FMT_SGRBG16:
|
||||||
case V4L2_PIX_FMT_SRGGB16:
|
case V4L2_PIX_FMT_SRGGB16:
|
||||||
case V4L2_PIX_FMT_Y16:
|
case V4L2_PIX_FMT_Y10:
|
||||||
|
case V4L2_PIX_FMT_Y12:
|
||||||
burst_size = 8;
|
burst_size = 8;
|
||||||
passthrough_bits = 16;
|
passthrough_bits = 16;
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -166,11 +166,14 @@ static const struct imx_media_pixfmt rgb_formats[] = {
|
||||||
.bpp = 8,
|
.bpp = 8,
|
||||||
.bayer = true,
|
.bayer = true,
|
||||||
}, {
|
}, {
|
||||||
.fourcc = V4L2_PIX_FMT_Y16,
|
.fourcc = V4L2_PIX_FMT_Y10,
|
||||||
.codes = {
|
.codes = {MEDIA_BUS_FMT_Y10_1X10},
|
||||||
MEDIA_BUS_FMT_Y10_1X10,
|
.cs = IPUV3_COLORSPACE_RGB,
|
||||||
MEDIA_BUS_FMT_Y12_1X12,
|
.bpp = 16,
|
||||||
},
|
.bayer = true,
|
||||||
|
}, {
|
||||||
|
.fourcc = V4L2_PIX_FMT_Y12,
|
||||||
|
.codes = {MEDIA_BUS_FMT_Y12_1X12},
|
||||||
.cs = IPUV3_COLORSPACE_RGB,
|
.cs = IPUV3_COLORSPACE_RGB,
|
||||||
.bpp = 16,
|
.bpp = 16,
|
||||||
.bayer = true,
|
.bayer = true,
|
||||||
|
|
Loading…
Reference in New Issue