aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/platform/rockchip/isp1/capture.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/platform/rockchip/isp1/capture.c')
-rw-r--r--drivers/media/platform/rockchip/isp1/capture.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/media/platform/rockchip/isp1/capture.c b/drivers/media/platform/rockchip/isp1/capture.c
index b44a057ca553..0880eb1add22 100644
--- a/drivers/media/platform/rockchip/isp1/capture.c
+++ b/drivers/media/platform/rockchip/isp1/capture.c
@@ -653,6 +653,7 @@ static int rkisp1_config_dcrop(struct rkisp1_stream *stream, bool async)
/* configure scale unit */
static int rkisp1_config_rsz(struct rkisp1_stream *stream, bool async)
{
+ pr_info("%s: %d\n", __func__, __LINE__);
struct rkisp1_device *dev = stream->ispdev;
struct v4l2_pix_format_mplane output_fmt = stream->out_fmt;
struct capture_fmt *output_isp_fmt = &stream->out_isp_fmt;
@@ -661,6 +662,7 @@ static int rkisp1_config_rsz(struct rkisp1_stream *stream, bool async)
struct v4l2_rect in_y, in_c, out_y, out_c;
u32 xsubs_in, ysubs_in, xsubs_out, ysubs_out;
+ pr_info("%s: %d\n", __func__, __LINE__);
if (input_isp_fmt->fmt_type == FMT_BAYER)
goto disable;
@@ -670,6 +672,7 @@ static int rkisp1_config_rsz(struct rkisp1_stream *stream, bool async)
out_y.width = output_fmt.width;
out_y.height = output_fmt.height;
+ pr_info("%s: %d\n", __func__, __LINE__);
/* The size of Cb,Cr are related to the format */
if (mbus_code_xysubs(input_isp_fmt->mbus_code, &xsubs_in, &ysubs_in)) {
v4l2_err(&dev->v4l2_dev, "Not xsubs/ysubs found\n");
@@ -678,6 +681,7 @@ static int rkisp1_config_rsz(struct rkisp1_stream *stream, bool async)
in_c.width = in_y.width / xsubs_in;
in_c.height = in_y.height / ysubs_in;
+ pr_info("%s: %d\n", __func__, __LINE__);
if (output_isp_fmt->fmt_type == FMT_YUV) {
fcc_xysubs(output_isp_fmt->fourcc, &xsubs_out, &ysubs_out);
out_c.width = out_y.width / xsubs_out;
@@ -690,6 +694,7 @@ static int rkisp1_config_rsz(struct rkisp1_stream *stream, bool async)
if (in_c.width == out_c.width && in_c.height == out_c.height)
goto disable;
+ pr_info("%s: %d\n", __func__, __LINE__);
/* set RSZ input and output */
v4l2_dbg(1, 1, &dev->v4l2_dev,
"stream %d rsz/scale: %dx%d -> %dx%d\n",
@@ -699,17 +704,21 @@ static int rkisp1_config_rsz(struct rkisp1_stream *stream, bool async)
"chroma scaling %dx%d -> %dx%d\n",
in_c.width, in_c.height, out_c.width, out_c.height);
+ pr_info("%s: %d\n", __func__, __LINE__);
/* calculate and set scale */
config_rsz(stream, &in_y, &in_c, &out_y, &out_c, async);
- if (1)
- dump_rsz_regs(stream);
+// if (1)
+// dump_rsz_regs(stream);
+ pr_info("%s: %d\n", __func__, __LINE__);
return 0;
disable:
+ pr_info("%s: %d\n", __func__, __LINE__);
disable_rsz(stream, async);
+ pr_info("%s: %d\n", __func__, __LINE__);
return 0;
}
@@ -1188,15 +1197,18 @@ static int rkisp1_stream_start(struct rkisp1_stream *stream)
bool async = false;
int ret;
+ pr_info("%s: %d\n", __func__, __LINE__);
if (other->state == RKISP1_STATE_STREAMING)
async = true;
+ pr_info("%s: %d\n", __func__, __LINE__);
ret = rkisp1_config_rsz(stream, async);
if (ret < 0) {
v4l2_err(v4l2_dev, "config rsz failed with error %d\n", ret);
return ret;
}
+ pr_info("%s: %d\n", __func__, __LINE__);
/*
* can't be async now, otherwise the latter started stream fails to
* produce mi interrupt.
@@ -1207,6 +1219,7 @@ static int rkisp1_stream_start(struct rkisp1_stream *stream)
return ret;
}
+ pr_info("%s: %d\n", __func__, __LINE__);
return rkisp1_start(stream);
}
@@ -1233,6 +1246,7 @@ rkisp1_start_streaming(struct vb2_queue *queue, unsigned int count)
goto destroy_dummy_buf;
}
+ pr_info("%s: %d\n", __func__, __LINE__);
/* configure stream hardware to start */
ret = rkisp1_stream_start(stream);
if (ret < 0) {
@@ -1240,11 +1254,13 @@ rkisp1_start_streaming(struct vb2_queue *queue, unsigned int count)
goto close_pipe;
}
+ pr_info("%s: %d\n", __func__, __LINE__);
/* start sub-devices */
ret = dev->pipe.set_stream(&dev->pipe, true);
if (ret < 0)
goto stop_stream;
+ pr_info("%s: %d\n", __func__, __LINE__);
ret = media_pipeline_start(&node->vdev.entity, &dev->pipe.pipe);
if (ret < 0) {
v4l2_err(&dev->v4l2_dev, "start pipeline failed %d\n", ret);
@@ -1725,6 +1741,7 @@ void rkisp1_mi_isr(struct rkisp1_stream *stream)
void __iomem *base = stream->ispdev->base_addr;
u32 val;
+ pr_info("%s: %d\n", __func__, __LINE__);
stream->ops->clr_frame_end_int(base);
if (stream->ops->is_frame_end_int_masked(base)) {
val = mi_get_masked_int_status(base);