diff options
author | Jai Luthra <j-luthra@ti.com> | 2023-01-04 11:44:02 +0530 |
---|---|---|
committer | Vignesh Raghavendra <vigneshr@ti.com> | 2023-01-04 18:57:45 +0530 |
commit | 8d6187be90a2f6f8d849a5830ce360e3241f7436 (patch) | |
tree | 36a98d3fb67e324418460f5db0f528776d41510c /drivers/media | |
parent | d6a00ef7576cab3eac0b09816dfb699264fe02f8 (diff) |
media: ti: j721e-csi2rx: Fix YUV422 formats
For CSI-2 the correct formats to use for YUV422 are of the form 1x16 as
it is a serial protocol. The formats of the form 2x8 are used for
parallel protocols like DVP.
Add support for the 1x16 formats and make it the default. We still keep
around the 2x8 formats to avoid any regressions.
Signed-off-by: Jai Luthra <j-luthra@ti.com>
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c index c2f5fb177e70..fadb309163f3 100644 --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c @@ -166,6 +166,34 @@ static const struct ti_csi2rx_fmt formats[] = { .bpp = 16, .size = SHIM_DMACNTX_SIZE_8, }, { + .fourcc = V4L2_PIX_FMT_YUYV, + .code = MEDIA_BUS_FMT_YUYV8_1X16, + .colorspace = V4L2_COLORSPACE_SRGB, + .csi_df = CSI_DF_YUV422, + .bpp = 16, + .size = SHIM_DMACNTX_SIZE_8, + }, { + .fourcc = V4L2_PIX_FMT_UYVY, + .code = MEDIA_BUS_FMT_UYVY8_1X16, + .colorspace = V4L2_COLORSPACE_SRGB, + .csi_df = CSI_DF_YUV422, + .bpp = 16, + .size = SHIM_DMACNTX_SIZE_8, + }, { + .fourcc = V4L2_PIX_FMT_YVYU, + .code = MEDIA_BUS_FMT_YVYU8_1X16, + .colorspace = V4L2_COLORSPACE_SRGB, + .csi_df = CSI_DF_YUV422, + .bpp = 16, + .size = SHIM_DMACNTX_SIZE_8, + }, { + .fourcc = V4L2_PIX_FMT_VYUY, + .code = MEDIA_BUS_FMT_VYUY8_1X16, + .colorspace = V4L2_COLORSPACE_SRGB, + .csi_df = CSI_DF_YUV422, + .bpp = 16, + .size = SHIM_DMACNTX_SIZE_8, + }, { .fourcc = V4L2_PIX_FMT_SBGGR8, .code = MEDIA_BUS_FMT_SBGGR8_1X8, .colorspace = V4L2_COLORSPACE_SRGB, @@ -1108,7 +1136,7 @@ static int _ti_csi2rx_sd_set_routing(struct v4l2_subdev *sd, const struct v4l2_mbus_framefmt format = { .width = 640, .height = 480, - .code = MEDIA_BUS_FMT_UYVY8_2X8, + .code = MEDIA_BUS_FMT_UYVY8_1X16, .field = V4L2_FIELD_NONE, .colorspace = V4L2_COLORSPACE_SRGB, .ycbcr_enc = V4L2_YCBCR_ENC_601, |