diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2022-05-10 03:06:45 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-07-08 18:02:57 +0100 |
commit | 44737d2ac4e03138527c6acd26db96405cbca1ca (patch) | |
tree | 16a353a420d4c6d905266997c7dc821bf05608ec /drivers/staging/media/imx | |
parent | a61bfe662591ad22eab136b82725db1f023ecdea (diff) | |
download | linux-stable-44737d2ac4e03138527c6acd26db96405cbca1ca.tar.gz linux-stable-44737d2ac4e03138527c6acd26db96405cbca1ca.tar.bz2 linux-stable-44737d2ac4e03138527c6acd26db96405cbca1ca.zip |
media: staging: media: imx: imx7-media-csi: Drop IC support from imx7_csi_try_colorimetry()
The imx7_csi_try_colorimetry() function supports the unrelated image
converter hardware as it originates from shared helpers. Drop that.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Rui Miguel Silva <rmfrfs@gmail.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/staging/media/imx')
-rw-r--r-- | drivers/staging/media/imx/imx7-media-csi.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c index fd4db66ccb36..5f346a2e83c9 100644 --- a/drivers/staging/media/imx/imx7-media-csi.c +++ b/drivers/staging/media/imx/imx7-media-csi.c @@ -2031,13 +2031,8 @@ out_unlock: * parameters based on the colorspace if they are uninitialized. * * tryfmt->code must be set on entry. - * - * If this format is destined to be routed through the Image Converter, - * Y`CbCr encoding must be fixed. The IC supports only BT.601 Y`CbCr - * or Rec.709 Y`CbCr encoding. */ -static void imx7_csi_try_colorimetry(struct v4l2_mbus_framefmt *tryfmt, - bool ic_route) +static void imx7_csi_try_colorimetry(struct v4l2_mbus_framefmt *tryfmt) { const struct imx7_csi_pixfmt *cc; bool is_rgb = false; @@ -2069,16 +2064,9 @@ static void imx7_csi_try_colorimetry(struct v4l2_mbus_framefmt *tryfmt, tryfmt->xfer_func = V4L2_MAP_XFER_FUNC_DEFAULT(tryfmt->colorspace); - if (ic_route) { - if (tryfmt->ycbcr_enc != V4L2_YCBCR_ENC_601 && - tryfmt->ycbcr_enc != V4L2_YCBCR_ENC_709) - tryfmt->ycbcr_enc = V4L2_YCBCR_ENC_601; - } else { - if (tryfmt->ycbcr_enc == V4L2_YCBCR_ENC_DEFAULT) { - tryfmt->ycbcr_enc = - V4L2_MAP_YCBCR_ENC_DEFAULT(tryfmt->colorspace); - } - } + if (tryfmt->ycbcr_enc == V4L2_YCBCR_ENC_DEFAULT) + tryfmt->ycbcr_enc = + V4L2_MAP_YCBCR_ENC_DEFAULT(tryfmt->colorspace); if (tryfmt->quantization == V4L2_QUANTIZATION_DEFAULT) tryfmt->quantization = @@ -2135,7 +2123,7 @@ static int imx7_csi_try_fmt(struct imx7_csi *csi, return -EINVAL; } - imx7_csi_try_colorimetry(&sdformat->format, false); + imx7_csi_try_colorimetry(&sdformat->format); return 0; } |