On 1/10/19 2:54 AM, Philipp Zabel wrote:
On Wed, 2019-01-09 at 11:21 -0800, Steve Longerbeam wrote:
<snip>
why not just use "if (priv->active_output_pad == CSI_SRC_PAD_DIRECT) ..." ?
While both source pad links are disabled, whether or not IC burst
alignment is applied would depend on hidden state. This should be
consistent, regardless of previously enabled source pad links.
Yes good point.
We could achieve that with your suggested change if csi_link_setup()
would always set active_output_pad = CSI_SRC_PAD_IDMAC when disabling
source pad links:
----------8<----------
diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index dd911313fca2..e593fd7774ff 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -1000,6 +1000,8 @@ static int csi_link_setup(struct media_entity *entity,
v4l2_ctrl_handler_free(&priv->ctrl_hdlr);
v4l2_ctrl_handler_init(&priv->ctrl_hdlr, 0);
priv->sink = NULL;
+ /* do not apply IC burst alignment in csi_try_crop */
+ priv->active_output_pad = CSI_SRC_PAD_IDMAC;
Yes that will work. But I also notice priv->active_output_pad is not
even being initialized. Do you mind including that as well, e.g
initialize to CSI_SRC_PAD_IDMAC in imx_csi_probe().
Thanks Philipp.
Steve