mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 20:37:27 +00:00
[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>
This commit is contained in:
parent
6dd5ef5bdd
commit
f4706d6e6d
@ -1323,6 +1323,10 @@ static void coda_stop_streaming(struct vb2_queue *q)
|
|||||||
if (!ctx->streamon_out && !ctx->streamon_cap) {
|
if (!ctx->streamon_out && !ctx->streamon_cap) {
|
||||||
struct coda_buffer_meta *meta;
|
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);
|
mutex_lock(&ctx->bitstream_mutex);
|
||||||
while (!list_empty(&ctx->buffer_meta_list)) {
|
while (!list_empty(&ctx->buffer_meta_list)) {
|
||||||
meta = list_first_entry(&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);
|
mutex_unlock(&ctx->bitstream_mutex);
|
||||||
kfifo_init(&ctx->bitstream_fifo,
|
kfifo_init(&ctx->bitstream_fifo,
|
||||||
ctx->bitstream.vaddr, ctx->bitstream.size);
|
ctx->bitstream.vaddr, ctx->bitstream.size);
|
||||||
|
ctx->initialized = 0;
|
||||||
ctx->runcounter = 0;
|
ctx->runcounter = 0;
|
||||||
ctx->aborting = 0;
|
ctx->aborting = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user