lkml.org 
[lkml]   [2020]   [Jul]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC PATCH v5 13/14] media: tegra-video: Add CSI MIPI pads calibration
From
Date
27.07.2020 23:57, Sowjanya Komatineni пишет:
> + /*
> + * TRM has incorrectly documented to wait for done status from
> + * calibration logic after CSI interface power on.
> + * As per the design, calibration results are latched and applied
> + * to the pads only when the link is in LP11 state which will happen
> + * during the sensor stream-on.
> + * CSI subdev stream-on triggers start of MIPI pads calibration.
> + * Wait for calibration to finish here after sensor subdev stream-on
> + * and in case of sensor stream-on failure, cancel the calibration.
> + */
> subdev = on ? src_subdev : csi_subdev;
> ret = v4l2_subdev_call(subdev, video, s_stream, on);
> - if (ret < 0 && ret != -ENOIOCTLCMD)
> + if (ret < 0 && ret != -ENOIOCTLCMD) {

I assume -ENOIOCTLCMD means that camera wasn't turned ON, so why
-ENOIOCTLCMD is special?

> + if (on && csi_chan->mipi)
> + tegra_mipi_cancel_calibration(csi_chan->mipi);
> return ret;
> + }
> +
> + if (on && csi_chan->mipi) {

Does finish_calibration() really need to be called for ret=-ENOIOCTLCMD?

Shouldn't it be cancel_calibration( for the -ENOIOCTLCMD?

> + ret = tegra_mipi_finish_calibration(csi_chan->mipi);
> + if (ret < 0)
> + dev_err(csi_chan->csi->dev,
> + "MIPI calibration failed: %d\n", ret);

Doesn't v4l2_subdev_call(OFF) need to be invoked here on error?

> + return ret;
> + }
>
> return 0;
> }

\
 
 \ /
  Last update: 2020-07-28 12:31    [W:0.142 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site