MLK-19362: media: csi: Fix "Hresponse" and "Rx fifo overflow" camera errors
authorMirela Rabulea <mirela.rabulea@nxp.com>
Wed, 12 Sep 2018 08:50:54 +0000 (11:50 +0300)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
When the register setting for fifo_send_level is set to high, some residual
data of a frame which cannot fill up to the send_level, will be sent with
the next frame data. In this case, for CSI receive dma, sometimes,
the vertical blanking is too short to finish the storage of the previous
frame before the next frame start, depending on the system bandwidth.

Tested on imx8mq-evk rev B4 and B3, with OV5640 camera.

This patch was proposed by Tom Zheng <haidong.zheng@nxp.com>

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robby Cai <robby.cai@nxp.com>
drivers/media/platform/imx8/mxc-mipi-csi2_yav.c

index e16746e..abeb382 100644 (file)
@@ -406,11 +406,10 @@ static int mipi_csi2_set_fmt(struct v4l2_subdev *sd,
 
        if (fmt->format.width * fmt->format.height > 720 * 480) {
                csi2dev->hs_settle = rxhs_settle[1];
-               csi2dev->send_level = 0x300;
        } else {
                csi2dev->hs_settle = rxhs_settle[0];
-               csi2dev->send_level = 0x240;
        }
+       csi2dev->send_level = 64;
 
        return v4l2_subdev_call(sensor_sd, pad, set_fmt, NULL, fmt);
 }