diff options
author | Laurent Pinchart | 2022-06-14 20:10:51 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab | 2022-07-17 12:09:07 +0100 |
commit | 4fd1e6a9abb3b6bb923df17da2afb710746f3963 (patch) | |
tree | 06170a9888b137d3f5e19d66bc1a55f84ae1ce2a /drivers | |
parent | 8082e2f4994d2ce1ac0ac8d6182e10f3835207c4 (diff) |
media: rkisp1: isp: Start CSI-2 receiver before ISP
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@ideasonboard.com>
Reviewed-by: Dafna Hirschfeld <dafna@fastmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/platform/rockchip/rkisp1/rkisp1-isp.c | 11 |
1 files 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 c05148dd32c0..81c4eb48baab 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); |