I.MX8MP camera capture lose first frame

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I.MX8MP camera capture lose first frame

1,986 次查看
btogorean
Contributor II

Hi NXP community,

I'm working on bringing-up a MIPI camera using a NXP I.MX8MP based platform.

The linux kernel is based on imx_5.4.70_2.3.0 with some changes to support RAW12, the format my camera is putting out.

I'm using just ISI CH0 for capture with CSC and cropping bypassed. The width of output image is 4096 pixels so ISI CH1 is disabled and chain buffering is enabled.

Now the problem I'm seeing is that first frame captured by the camera is dropped. If I'm queuing 10 buffers through V4L2 and using one-shot mode of the camera to trigger 10 frames, only 9 buffers will be populated.

After activating debug prints I saw that at CSI2 PHY level there are received 10 Start of Frames with 10 corresponding End of Frame but first frame is dropped in imx8-isi-cap. There is also a discard mechanism in before mentioned driver that engages for first frame.

Now my question is this a bug or what's the reason of that DMA allocation and discarding of first data buffer?

0 项奖励
回复
5 回复数

1,488 次查看
akhilnarayanan
Contributor I

Hello , 

Any further updates on this topic. I am also facing the same issue with imx8-isi-cap.

Regards, 

Akhil

 

0 项奖励
回复

1,266 次查看
alexander_qiao
Contributor I

me too.

I review the imx8-isi-cap.c.

The first node in out_active list is discard,so the first frame will be discard.

static int cap_vb2_start_streaming(struct vb2_queue *q, unsigned int count)
{
	.....
        .....
	/* ISI channel output buffer 1 */
	buf = list_first_entry(&isi_cap->out_discard, struct mxc_isi_buffer, list);
	buf->v4l2_buf.sequence = 0;
	vb2 = &buf->v4l2_buf.vb2_buf;
	vb2->state = VB2_BUF_STATE_ACTIVE;
	mxc_isi_channel_set_outbuf(mxc_isi, buf);
	list_move_tail(isi_cap->out_discard.next, &isi_cap->out_active);

        ......
        ......
}

 

Hope it will be helpful to you.

0 项奖励
回复

1,937 次查看
joanxie
NXP TechSupport
NXP TechSupport

what's your camera resolution and frame rate you set?

 

0 项奖励
回复

1,933 次查看
btogorean
Contributor II

Camera has 4096x256 pixels resolution with RAW12 format and the frame rate is 30 FPS.

0 项奖励
回复

1,925 次查看
joanxie
NXP TechSupport
NXP TechSupport

I searched but I didn't find anything bug report about this, could you reproduce this issue on imx8mp board with other camera which can be supported by current bsp? like ov2775 or basler?

when you find this issue, did you get any error message? if yes, pls send it to me, and what dts file and driver you use for your camera?

0 项奖励
回复