|
@@ -111,6 +111,7 @@ struct csi_priv {
|
|
|
struct v4l2_ctrl_handler ctrl_hdlr;
|
|
|
|
|
|
int stream_count; /* streaming counter */
|
|
|
+ u32 frame_sequence; /* frame sequence counter */
|
|
|
bool last_eof; /* waiting for last EOF at stream off */
|
|
|
bool nfb4eof; /* NFB4EOF encountered during streaming */
|
|
|
struct completion last_eof_comp;
|
|
@@ -237,12 +238,14 @@ static void csi_vb2_buf_done(struct csi_priv *priv)
|
|
|
done = priv->active_vb2_buf[priv->ipu_buf_num];
|
|
|
if (done) {
|
|
|
done->vbuf.field = vdev->fmt.fmt.pix.field;
|
|
|
+ done->vbuf.sequence = priv->frame_sequence;
|
|
|
vb = &done->vbuf.vb2_buf;
|
|
|
vb->timestamp = ktime_get_ns();
|
|
|
vb2_buffer_done(vb, priv->nfb4eof ?
|
|
|
VB2_BUF_STATE_ERROR : VB2_BUF_STATE_DONE);
|
|
|
}
|
|
|
|
|
|
+ priv->frame_sequence++;
|
|
|
priv->nfb4eof = false;
|
|
|
|
|
|
/* get next queued buffer */
|
|
@@ -546,6 +549,7 @@ static int csi_idmac_start(struct csi_priv *priv)
|
|
|
|
|
|
/* init EOF completion waitq */
|
|
|
init_completion(&priv->last_eof_comp);
|
|
|
+ priv->frame_sequence = 0;
|
|
|
priv->last_eof = false;
|
|
|
priv->nfb4eof = false;
|
|
|
|