linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: staging/imx: fill vb2_v4l2_buffer sequence entry
@ 2018-03-13 20:00 Peter Seiderer
  2018-03-13 22:03 ` Steve Longerbeam
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Peter Seiderer @ 2018-03-13 20:00 UTC (permalink / raw)
  To: linux-media
  Cc: devel, Greg Kroah-Hartman, linux-kernel, Peter Seiderer,
	Philipp Zabel, Steve Longerbeam, Mauro Carvalho Chehab

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 drivers/staging/media/imx/imx-media-csi.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/staging/media/imx/imx-media-csi.c b/drivers/staging/media/imx/imx-media-csi.c
index 5a195f80a24d..3a6a645b9dce 100644
--- a/drivers/staging/media/imx/imx-media-csi.c
+++ b/drivers/staging/media/imx/imx-media-csi.c
@@ -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;
@@ -234,8 +235,11 @@ static void csi_vb2_buf_done(struct csi_priv *priv)
 	struct vb2_buffer *vb;
 	dma_addr_t phys;
 
+	priv->frame_sequence++;
+
 	done = priv->active_vb2_buf[priv->ipu_buf_num];
 	if (done) {
+		done->vbuf.sequence = priv->frame_sequence;
 		vb = &done->vbuf.vb2_buf;
 		vb->timestamp = ktime_get_ns();
 		vb2_buffer_done(vb, priv->nfb4eof ?
@@ -543,6 +547,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;
 
-- 
2.16.2

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-03-14  8:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 20:00 [PATCH] media: staging/imx: fill vb2_v4l2_buffer sequence entry Peter Seiderer
2018-03-13 22:03 ` Steve Longerbeam
2018-03-13 22:24   ` Peter Seiderer
2018-03-13 22:27     ` Steve Longerbeam
2018-03-14  5:36 ` Greg Kroah-Hartman
2018-03-14  8:31 ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).