summaryrefslogtreecommitdiff
path: root/drivers/media/platform
diff options
context:
space:
mode:
authorPhilipp Zabel <p.zabel@pengutronix.de>2015-01-23 19:51:27 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-02-02 15:25:36 +0300
commitf4706d6e6d2d174af156b56d08cfca35121ac7cc (patch)
tree67a030987ee8079c4b75f591efcc77773ce807e0 /drivers/media/platform
parent6dd5ef5bddd51258f229974a25c8a7bb5617332f (diff)
downloadlinux-f4706d6e6d2d174af156b56d08cfca35121ac7cc.tar.xz
[media] coda: issue seq_end_work during stop_streaming
This patch queues seq_end_work and flushes the queue during stop_streaming and clears the ctx->initialized flag. This allows to start streaming again after stopping streaming without releasing the context. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r--drivers/media/platform/coda/coda-common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index de8ad49ac6ca..490b933ad616 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1323,6 +1323,10 @@ static void coda_stop_streaming(struct vb2_queue *q)
if (!ctx->streamon_out && !ctx->streamon_cap) {
struct coda_buffer_meta *meta;
+ if (ctx->ops->seq_end_work) {
+ queue_work(dev->workqueue, &ctx->seq_end_work);
+ flush_work(&ctx->seq_end_work);
+ }
mutex_lock(&ctx->bitstream_mutex);
while (!list_empty(&ctx->buffer_meta_list)) {
meta = list_first_entry(&ctx->buffer_meta_list,
@@ -1333,6 +1337,7 @@ static void coda_stop_streaming(struct vb2_queue *q)
mutex_unlock(&ctx->bitstream_mutex);
kfifo_init(&ctx->bitstream_fifo,
ctx->bitstream.vaddr, ctx->bitstream.size);
+ ctx->initialized = 0;
ctx->runcounter = 0;
ctx->aborting = 0;
}