diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2013-09-19 03:53:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-10-28 13:20:48 -0400 |
commit | 84e680980917df60210af713e39400752dc4763d (patch) | |
tree | f2a011411af8c4cb3b7e18c2b5fca0239b62045c | |
parent | d7bb0ce8884b3515abd8d4dc3e3500f9a9beeab6 (diff) |
[media] v4l2-mem2mem: clear m2m queue ready counter in v4l2_m2m_streamoff
v4l2_m2m_streamoff drops the list of ready buffers but failed to reset the
num_rdy counter to zero. This would lead to v4l2_m2m_num_src/dst_bufs_ready
reporting wrong values after streamoff.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/v4l2-core/v4l2-mem2mem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index 8f116c2642db..796de3349303 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c | |||
@@ -488,6 +488,7 @@ int v4l2_m2m_streamoff(struct file *file, struct v4l2_m2m_ctx *m2m_ctx, | |||
488 | /* Drop queue, since streamoff returns device to the same state as after | 488 | /* Drop queue, since streamoff returns device to the same state as after |
489 | * calling reqbufs. */ | 489 | * calling reqbufs. */ |
490 | INIT_LIST_HEAD(&q_ctx->rdy_queue); | 490 | INIT_LIST_HEAD(&q_ctx->rdy_queue); |
491 | q_ctx->num_rdy = 0; | ||
491 | spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); | 492 | spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); |
492 | 493 | ||
493 | if (m2m_dev->curr_ctx == m2m_ctx) { | 494 | if (m2m_dev->curr_ctx == m2m_ctx) { |