diff mbox series

[3/3] media: imx: imx7_mipi_csis: Ensure pads are connected

Message ID 20210319011735.26846-4-laurent.pinchart@ideasonboard.com (mailing list archive)
State New
Headers show
Series staging: media: imx: imx7_mipi_csis: miscellaneous fixes | expand

Commit Message

Laurent Pinchart March 19, 2021, 1:17 a.m. UTC
The CSI-2 receiver requires both its sink pad and its source pad to be
connected through enabled links in order to be started. Ensure this by
setting the MEDIA_PAD_FL_MUST_CONNECT flag on both pads.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Rui Miguel Silva March 19, 2021, 10:28 a.m. UTC | #1
Hi Laurent,
Thanks for the all series.
On Fri, Mar 19, 2021 at 03:17:35AM +0200, Laurent Pinchart wrote:
> The CSI-2 receiver requires both its sink pad and its source pad to be
> connected through enabled links in order to be started. Ensure this by
> setting the MEDIA_PAD_FL_MUST_CONNECT flag on both pads.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>

------
Cheers,
     Rui

> ---
>  drivers/staging/media/imx/imx7-mipi-csis.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
> index 21774f3e66e0..025fdc488bd6 100644
> --- a/drivers/staging/media/imx/imx7-mipi-csis.c
> +++ b/drivers/staging/media/imx/imx7-mipi-csis.c
> @@ -1065,8 +1065,10 @@ static int mipi_csis_subdev_init(struct v4l2_subdev *mipi_sd,
>  
>  	v4l2_set_subdevdata(mipi_sd, &pdev->dev);
>  
> -	state->pads[CSIS_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
> -	state->pads[CSIS_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
> +	state->pads[CSIS_PAD_SINK].flags = MEDIA_PAD_FL_SINK
> +					 | MEDIA_PAD_FL_MUST_CONNECT;
> +	state->pads[CSIS_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE
> +					   | MEDIA_PAD_FL_MUST_CONNECT;
>  	return media_entity_pads_init(&mipi_sd->entity, CSIS_PADS_NUM,
>  				      state->pads);
>  }
> -- 
> Regards,
> 
> Laurent Pinchart
>
diff mbox series

Patch

diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
index 21774f3e66e0..025fdc488bd6 100644
--- a/drivers/staging/media/imx/imx7-mipi-csis.c
+++ b/drivers/staging/media/imx/imx7-mipi-csis.c
@@ -1065,8 +1065,10 @@  static int mipi_csis_subdev_init(struct v4l2_subdev *mipi_sd,
 
 	v4l2_set_subdevdata(mipi_sd, &pdev->dev);
 
-	state->pads[CSIS_PAD_SINK].flags = MEDIA_PAD_FL_SINK;
-	state->pads[CSIS_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE;
+	state->pads[CSIS_PAD_SINK].flags = MEDIA_PAD_FL_SINK
+					 | MEDIA_PAD_FL_MUST_CONNECT;
+	state->pads[CSIS_PAD_SOURCE].flags = MEDIA_PAD_FL_SOURCE
+					   | MEDIA_PAD_FL_MUST_CONNECT;
 	return media_entity_pads_init(&mipi_sd->entity, CSIS_PADS_NUM,
 				      state->pads);
 }