Commit 44737d2a authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab

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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarRui Miguel Silva <rmfrfs@gmail.com>
Tested-by: default avatarAlexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent a61bfe66
...@@ -2031,13 +2031,8 @@ static int imx7_csi_get_fmt(struct v4l2_subdev *sd, ...@@ -2031,13 +2031,8 @@ static int imx7_csi_get_fmt(struct v4l2_subdev *sd,
* parameters based on the colorspace if they are uninitialized. * parameters based on the colorspace if they are uninitialized.
* *
* tryfmt->code must be set on entry. * 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, static void imx7_csi_try_colorimetry(struct v4l2_mbus_framefmt *tryfmt)
bool ic_route)
{ {
const struct imx7_csi_pixfmt *cc; const struct imx7_csi_pixfmt *cc;
bool is_rgb = false; bool is_rgb = false;
...@@ -2069,16 +2064,9 @@ static void imx7_csi_try_colorimetry(struct v4l2_mbus_framefmt *tryfmt, ...@@ -2069,16 +2064,9 @@ static void imx7_csi_try_colorimetry(struct v4l2_mbus_framefmt *tryfmt,
tryfmt->xfer_func = tryfmt->xfer_func =
V4L2_MAP_XFER_FUNC_DEFAULT(tryfmt->colorspace); V4L2_MAP_XFER_FUNC_DEFAULT(tryfmt->colorspace);
if (ic_route) { if (tryfmt->ycbcr_enc == V4L2_YCBCR_ENC_DEFAULT)
if (tryfmt->ycbcr_enc != V4L2_YCBCR_ENC_601 && tryfmt->ycbcr_enc =
tryfmt->ycbcr_enc != V4L2_YCBCR_ENC_709) V4L2_MAP_YCBCR_ENC_DEFAULT(tryfmt->colorspace);
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->quantization == V4L2_QUANTIZATION_DEFAULT) if (tryfmt->quantization == V4L2_QUANTIZATION_DEFAULT)
tryfmt->quantization = tryfmt->quantization =
...@@ -2135,7 +2123,7 @@ static int imx7_csi_try_fmt(struct imx7_csi *csi, ...@@ -2135,7 +2123,7 @@ static int imx7_csi_try_fmt(struct imx7_csi *csi,
return -EINVAL; return -EINVAL;
} }
imx7_csi_try_colorimetry(&sdformat->format, false); imx7_csi_try_colorimetry(&sdformat->format);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment