[PATCH 19/55] media: rkisp1: isp: Start CSI-2 receiver before ISP

Dafna Hirschfeld dafna at fastmail.com
Fri Jun 24 20:51:50 PDT 2022


On 15.06.2022 04:10, Paul Elder wrote:
>From: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>
>Make sure the ISP is ready to receive data before starting the CSI-2
>receiver by starting it first. Similarly, stop the CSI-2 receiver before
>the ISP when stopping streaming.
>
>Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

Reviewed-by Dafna Hirschfeld <dafna at fastmail.com>

>---
> drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
>index 5eabb321e320..0e68c8d53404 100644
>--- a/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
>+++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c
>@@ -771,8 +771,9 @@ static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable)
> 		v4l2_subdev_call(rkisp1->active_sensor->sd, video, s_stream,
> 				 false);
>
>-		rkisp1_isp_stop(rkisp1);
> 		rkisp1_mipi_csi2_stop(&rkisp1->csi);
>+		rkisp1_isp_stop(rkisp1);
>+
> 		return 0;
> 	}
>
>@@ -794,11 +795,13 @@ static int rkisp1_isp_s_stream(struct v4l2_subdev *sd, int enable)
> 	if (ret)
> 		goto mutex_unlock;
>
>+	rkisp1_isp_start(rkisp1);
>+
> 	ret = rkisp1_mipi_csi2_start(&rkisp1->csi, rkisp1->active_sensor);
>-	if (ret)
>+	if (ret) {
>+		rkisp1_isp_stop(rkisp1);
> 		goto mutex_unlock;
>-
>-	rkisp1_isp_start(rkisp1);
>+	}
>
> 	ret = v4l2_subdev_call(rkisp1->active_sensor->sd, video, s_stream,
> 			       true);
>-- 
>2.30.2
>



More information about the Linux-rockchip mailing list