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?
Hello ,
Any further updates on this topic. I am also facing the same issue with imx8-isi-cap.
Regards,
Akhil
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.
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?